8

So normally people ask how to forward x11 to the local machine, but rather I want to leave the application running on the remote box's desktop.

So let say I ssh from a windows machine (using putty) and run xclock & disown. If I then walked over to my desktop and look at the screen and see xclock running on the linux machine.

Any way to do that? Using Mint 13.

5
  • I know you can do it with command line processes with either nohup or start-stop-daemon but I don't know how to do it with graphical programs. Actually, this probably isn't relevant because you don't mention hanging up the connection. Commented Aug 20, 2012 at 15:29
  • 2
    superuser.com/questions/230138/… Commented Aug 20, 2012 at 15:29
  • any concerns with using Remote Desktop? Commented Aug 20, 2012 at 15:30
  • try setting the DISPLAY environment variable. I don't remember how to enumerate displays but the main desktop is (typically) 0:0 Commented Aug 20, 2012 at 15:34
  • This is more a Super User question Commented Aug 21, 2012 at 16:01

5 Answers 5

6

This works for me once I'm ssh'd in:

export DISPLAY=:0; nohup <command> &>/dev/null &

For example:

export DISPLAY=:0; nohup iceweasel &>/dev/null &
Sign up to request clarification or add additional context in comments.

Comments

3

When you're ssh'd in normally, set the DISPLAY variable with export DISPLAY=0:0 (0:0 being the display of the target box), and then you can run your command as you normally would. If you want to be able to close the ssh session, prepend the command with nohup: nohup ./yourcommand > dev/null.

Comments

0

h4bo --> That worked. just had to make the script.

First part of learning ssh stuff. Now instead of leaving teamviewer (a remote desktop program) open all the time, I can launch when I need it and then use it.

Comments

0

i guess

nohup ssh -X <ip address> <application name>

Comments

0

I recently had to do some python tkinter development on a Raspberry Pi with Thonny, where I wanted the tkinter graphics to show on the Pi's X server. For this specific purpose, I created a /usr/bin/pythonx script which simply consisted of:

#!/bin/bash
DISPLAY=:0 python "$@"

This wrapping technique works when Thonny ssh's into the Pi where the user is also logged in at the GUI desktop, as the ssh user has access to the .Xauthority data needed to send X client requests (application) to the server (GUI).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.