Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

After searching and searching without any luck I'm hoping someone here can enlighten me.

I have a PC (Ubuntu with encrypted home dir). I wake this PC up from a shell script on my phone, the PC shows the login screen.

I do not physically log in to the PC.

I run another shell script on my phone where:

  • I connect through SSH
  • decrypt my user's home dir
  • export DISPLAY=:0.0
  • launch app

the script completes and exits.

The app is successfully launched because when I manually log in on the PC in the morning and do a ps -ef it shows the process.The thing is however I can't see the GUI. I have to kill the process and start the app again.

I think it has something to do with the fact that there is no GUI session when starting the app over SSH so DISPLAY doesn't matter.

If I manually log in first and then run a script from my phone which:

  • I connect through SSH
  • export DISPLAY=:0.0
  • launch app

the script completes and exits, and I see the GUI of the application showing up on my PC.

share|improve this question
The DISPLAY variable should be set if the SSH session has X enabled. You might be overwriting it and pointing it back to the desktop. If you log in with SSH -X, what does echo $DISPLAY show? – Peter Westlake Aug 16 '12 at 11:11
Do you want the app UI to appear on the phone or on the desktop? – Thor Aug 16 '12 at 11:29
thanks both for the reply! – thewiep Aug 16 '12 at 18:30
@PeterWestlake it shows localhost:10.0 I didn't know about -X, this looks really useful! – thewiep Aug 16 '12 at 18:38
You should be able to do this with a vncserver, it packaged for most GNU/Linux flavors. – Thor Aug 16 '12 at 20:31

Your Answer


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

Browse other questions tagged or ask your own question.