Firefox Ubuntu Error No Display Specified
Contents |
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 Learn more about Stack Overflow the company Business Learn more
Error: Cannot Open Display
about hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask error no display specified firefox centos Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up
Error Cannot Open Display 0.0 Firefox
Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Open firefox from bash file “Error: no display specified” up vote 3 down vote favorite I need error no display specified selenium 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 / 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 firefox error no display specified redhat [ $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,22141829 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 : $myHost is down (ping failed) at $(date)" else firefox $myHost fi share|improve this answer answered Feb 6 '14 at 6:53 Maythux 31.7k1999156 I tried adding export DISPLAY=:0, but now it is showing an error : 'No protocol specified. Error: cannot open display: :0'. What am I missing? –Pre Feb 6 '14 at 7:17 reboot and then try again –Ma
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 the company Business Learn more about hiring developers
How To Set X11 Display Variable In Linux
or posting ads with us Unix & Linux Questions Tags Users Badges Unanswered Ask Question _ error: cannot open display: 0:0 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
Set Display Linux
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 and rise to the top why won't x11 display work through ssh login? up vote 3 down http://askubuntu.com/questions/417111/open-firefox-from-bash-file-error-no-display-specified vote favorite 2 I have logged in to a remote server and am trying to display an x application(e.g. firefox). but an error message appears. the below are my attempts to open firefox Black@Black-PC ~ $ ssh -X kwagjj@$labserver -p 122 [kwagjj@James5 ~]$ firefox Error: no display specified [kwagjj@James5 ~]$ exit logout Connection to 143.248.146.204 closed. Black@Black-PC ~ $ ssh -Y kwagjj@$labserver -p 122 [kwagjj@James5 ~]$ firefox Error: no display specified [kwagjj@James5 ~]$ I used -X, -Y because I read somewhere that http://unix.stackexchange.com/questions/138936/why-wont-x11-display-work-through-ssh-login these two options are related with credentials regarding X11 and these switches will do the job for me. Even without the -X, -Y switches, my attempt failed. What does the 'no display speicified' error mean? P.S. The weird thing is that if I connect to the remote server through my PUTTY and repeat the command 'firefox' it works?!?!(firefox is displayed on local computer) P.S. my local computer is Windows 7 so I have Xming running on background in order to allow X11 display. As for the attempt written on the upper part, the commands were typed in at Cygwin terminal. ssh x11 cygwin share|improve this question edited Jun 24 '14 at 23:37 Gilles 371k696751126 asked Jun 24 '14 at 12:43 kwagjj 61121021 Have you tried to display something locally from your Cygwin terminal? For example, you could find a local X utility such as xclock and run it to see what happens. If you cannot display locally, the remote display won't work. You may also need the X server for Cygwin. –unxnut Jun 24 '14 at 12:51 1 @unxnut as you've pointed out, my DISPLAY variable wasn't set. so I set it up with export DISPLAY=:0.0' and executed xclock` and the xclock appeared. But when I then logged in to the remote server via ssh, and tried xclock again, it says Error: Can't open display: –kwagjj Jun 24 '14 at 12:59 add a comment| 3 Answers 3 active oldest votes
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 the company Business Learn more about hiring http://superuser.com/questions/770392/ssh-from-windows-to-linux-vm-cannot-invoke-firefox-no-display-specified developers or posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power users. 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 and rise to the top SSH from Windows to Linux VM. Cannot invoke firefox: no display specified up vote 0 down vote favorite 1 error no I have been at this for the past two days and still no luck. $ firefox Error: no display specified $ firefox & [1] 25977 Error:no display specified ^C ^C [1]+ Exit 1 I am on a Windows7 machine and I'm trying to get Firefox to open on the CentOS machine, but be displayed on my current screen (Windows 7). When typing firefox in terminal, I am getting the following error: Error: cannot open display: localhost:0.0 To setup the display error no display I used the command $ export DISPLAY=localhost:0.0 Some site suggested using the following, but it didn't work either: $ export DISPLAY=:0.0 Do I really need Xming? Does anyone know of reliable resources so I can get a better knowledge concerning running applications (e.g. router traffic graphers, Apache, a simple index.html page) off of a virtual machine to be viewed on my desktop via PuTTY? I really do not want to download Xming or an X server. Is this necessary? I understand when I am run the command firefox or firefox & the server looks for a GUI however it is not "pointed" at my desktop. I have used the command export. linux firefox ssh putty share|improve this question edited Jun 18 '14 at 14:09 Jawa 2,81582032 asked Jun 18 '14 at 13:40 PhiL 314 add a comment| 2 Answers 2 active oldest votes up vote 0 down vote accepted If the CentOS machine is remote, you have to specify your IP address where you have X server (i.e. XMing) running when doing "export DISPLAY". Also, you must have the X11 port opened as well. Your firewall rules may be blocking it, so the best alternative is to use "ssh x11 forwarding" in your ssh client. That will set DISPLAY environment variable upon connection automatically, so the only thing you have to do on your Windows 7 machine is to install the X server (XMing). For example, if you use P