Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm logged into my Ubuntu 11.04 box using SSH, and I need to start a program - but it is a Windows GUI program which runs under WINE.

How can I start the program from the SSH terminal so that it opens on the desktop, and then stays open even after I log out of SSH.

share|improve this question
up vote 3 down vote accepted

The general way to start a graphical program from a remote machine:

  1. On the target machine run xhost +. (You'll need to do this from a terminal, or from a login script.)

  2. from a remote client, SSH into the target machine and run nohup program & where "program" is the program as you would run it if you were sitting at the target machine.

share|improve this answer
-1 (if I could) for xhost +. That is just terrible. – Sardathrion Aug 22 '11 at 9:07

If you want the program forwarded to your Display connect with ssh -X.

But I guess you want to start the program on the remote display?

  1. Use screen to keep the program open.

  2. Start the program with the right user and DISPLAY variable of the running X-Session.

For example:

xterm -display :1000.0


DISPLAY=:1000.0 xterm

This should work with Wine as well.

share|improve this answer

Make sure you have sshd set up so that it allows X11 forwarding.

Then, just start your GUI as per normal (nohup if you want it to run after you log out) and it will appear on your machine.

Edit: if you wanted this to run from an icon (see comment) then you can alias the icon command to

ssh 'nohup MyProgram &'

Or just create a small shell script (called ~/bin/ on the remote host with this in it:

nohup MyProgram & 2>&1 $HOME/.nohupp.log

and invoke with

ssh ~/bin/
share|improve this answer
I don't want to have the program running on my remote terminal, I actually want it to start up on my server as though I had double-clicked the icon. – Ozzah Aug 22 '11 at 11:30
I am not sure I understand: you want a programme installed on a remote server to run on your desktop and not on the remote server? I have edited my answer to add a icon-like script. – Sardathrion Aug 22 '11 at 11:36
No, it's not a remote server. The machine is at home and I am at work. I want to start a program on the server as though I was at home sitting in front of the computer, double-clicking the icon on the desktop, however I am not at home, I logged into the terminal via SSH. – Ozzah Aug 22 '11 at 13:58
To be clear: on your work machine (aka local) you want an icon that once clicked will start a programme on your home machine (aka remote) but display it on your work machine (aka local). You home machine (aka remote) will run the programme but you can interact with the GUI displayed on your work machine (aka local). If that is so, then change the icon to run the shh command above. – Sardathrion Aug 22 '11 at 14:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.