Debian Error No Display Specified
Contents |
Powered by phpBB Forum Software © phpBB Group
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow
Linux Error No Display Specified
the company Business Learn more about hiring developers or posting ads with us Stack xming error no display specified Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community
Error: Cannot Open Display:
of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How can I specify a display? up vote 35 down vote favorite 16 When I run some http://forums.debian.net/viewtopic.php?f=30&t=114817 programs over SSH, such as firefox &, I get an error Error: no display specified I would like to open many displays, still showing the stdout of each program. Initial Question: How can I specify the display to get a many-displayed program? Pablo Santa Cruz gives me the following code as a solution. I do not understand it. $ export DISPLAY=yourmachine.yourdomain.com:0.0 $ firefox & What are yourmachine and yourdomain.com in the command? http://stackoverflow.com/questions/784404/how-can-i-specify-a-display x11 share|improve this question edited Jul 25 at 9:26 Yuan Wen 434219 asked Apr 24 '09 at 3:36 Masi 32.5k110334518 add a comment| 6 Answers 6 active oldest votes up vote 44 down vote accepted The way that X works is the same as the way any network program works. You have a server of some description (in this case, the X display server) which runs on a specific machine, and you have X clients (like firefox) that try to connect to that server to get their information displayed. Often (on "home" machines), the client and server run on the same box and there's only one server, but X is powerful enough that this doesn't need to happen. It was built with the server/client separation built in from the start. This allows you to do such wondrous things such as log on to your box (in text mode) halfway around the planet, tell it that the display server is the box you're currently on and, voila, the windows suddenly start appearing locally. In order for a client to interact with a user, it needs to know how to find the server. There are a number of ways to do this. Many clients allow the -display or --displayoption to specify it: xeyes -display paxbox1
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us http://askubuntu.com/questions/417111/open-firefox-from-bash-file-error-no-display-specified Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up error no and rise to the top Open firefox from bash file “Error: no display specified” up vote 3 down vote favorite I need to open a browser and access my server with the ip address 1.2.3.4. First I ping my server and if the ping did not fail I launch the home page in a browser. For this I have written a bash file as follows: # add ip / error no display hostname separated by white space myHost=1.2.3.4 # no ping request COUNT=1 count=$(ping -c $COUNT $myHost | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }') if [ $count -eq 0 ]; then # 100% failed echo "Host : $myHost is down (ping failed) at $(date)" else firefox $myHost fi But I am getting an error message Error: no display specified. Firefox is not launching. What am I doing wrong. This file is getting called every 5 minutes using a cronjob. The cronjob seems to be working fine. Any help is appreciated. Thanks, Pre bash firefox cron share|improve this question edited Sep 13 '15 at 7:11 pl_rock 4,09841829 asked Feb 6 '14 at 6:48 Pre 18113 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted You have to specify the display. Add this to your script before running firefox export DISPLAY=:0 your script would be like: #add ip / hostname separated by white space myHost=1.2.3.4 export DISPLAY=:0 # no ping request COUNT=1 count=$(ping -c $COUNT $myHost | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }') if [ $count -eq 0 ]; then # 100% failed echo "Host