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 can't figure out .. I exported DISPLAY variable, but that don't work.

I have computer with ubuntu 11.10 on it. Computer have display. On display i am showing pictures in slideshow. So i connect via scp to computer and copy new pictures or delete some pics via cron job. I want to restart slideshow. Basically i need to run program from console in display.

Maybe i can run it via cron job ... ? Thanks.

share|improve this question
The DISPLAY variable should work, as long as the user has the right permissions. Please give more details as to what happens when it "doesn't work" (errors messages?). – Klox Jan 17 '12 at 17:17
export | grep DISPLAY declare -x DISPLAY=":0.0" gnome-terminal No protocol specified Failed to parse arguments: Cannot open display: – Guntis Jan 17 '12 at 18:06
up vote 1 down vote accepted

Based on this discussion, I'm guessing that your hostname doesn't match the permissions controlled by xhost. as a test, try sudo xhost + then launch your program to see if this is the right track. If so, you'll have to decide if you want to leave access control off or if you want to play with xhost to fine tune it.

It could be that ssh'ing from another computer is influencing the hostname xhost is checking, so if you set up xhost correctly you may need to add your ssh client's IP address.

share|improve this answer

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.