Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

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
1  
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

 
discard

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

Browse other questions tagged or ask your own question.