Error Cannot Determine X Display For Gui To Display On
Contents |
a remote server, I'm getting the "cannot open display:" error, as shown below. How do I fix this? For example, while launching the gedit on remote server, I got the following message. (gedit:3658): Gtk-WARNING **: cannot cannot open display linux open display: I get similar message when I try to open any GUI application. For
Cannot Open Display Ubuntu
example, launching Oracle Installer on remote server also gives the "cannot open display" error. Answer: You can fix the "cannot open display" error gedit gtk-warning cannot open display by following the xhost procedure mentioned in this article. 1. Allow clients to connect from any host using xhost+ Execute the following command to disable the access control, by which you can allow clients to connect from any xhost unable to open display redhat host. $ xhost + access control disabled, clients can connect from any host 2. Enable X11 forwarding While doing ssh use the option -X to enable X11 forwarding. $ ssh username@hostname -X Enable trusted X11 forwarding, by using the -Y option, $ ssh username@hostname -Y 3. Open GUI applications in that host After opening ssh connection to the remote host as explained above, you can open any GUI application which will open it without any issue. If
Xhost Unable To Open Display Ubuntu
you still get the "cannot open display" error, set the DISPLAY variable as shown below. $ export DISPLAY='IP:0.0' Note: IP is the local workstation's IP where you want the GUI application to be displayed. Tweet >Add your comment If you enjoyed this article, you might also like.. 50 Linux Sysadmin Tutorials 50 Most Frequently Used Linux Commands (With Examples) Top 25 Best Linux Performance Monitoring and Debugging Tools Mommy, I found it! – 15 Practical Linux Find Command Examples Linux 101 Hacks 2nd Edition eBook Awk Introduction – 7 Awk Print Examples Advanced Sed Substitution Examples 8 Essential Vim Editor Navigation Fundamentals 25 Most Frequently Used Linux IPTables Rules Examples Turbocharge PuTTY with 12 Powerful Add-Ons Tagged as: export DISPLAY, xhost+ Command, xhost+ Examples { 11 comments… add one } hari June 25, 2010, 9:10 am is # xhost - will block from using X server from remote login to this system? for ex: system1 # xhost - system2 # ssh -X system1 system1 # gedit new.txt it opening a new file, it not blocking X server. Link Jeff June 25, 2010, 9:39 am love this site, love these articles but xhost? pfft! hari, when you're X11 forwarding, you aren't using xhost for X authentication. the client is using xauth authentication mechanism. the server and client share a secret "cookie"(xauth list to see yours)…. google xauth howt
Architecture X display manager Reinstallation of X11 and Gnome Desktop in RHEL "init: Id "x" respawning too fast: disabled for 5 minutes." Configuration Fonts in X Exporting_display Xdefaults Using xauth Too high refresh rate ot too high resolution XDMCP vnc Cygwin/X X11 security Tips e233 cannot open display gvim History Humor Etc The X Window uses a client/server-architecture (and the server is your workstation to gtk warning cannot open display ubuntu which you are exporting the session). It can use a number of transport protocols, including Unix sockets and TCP/IP sockets. Which mechanism is used,
Closed Display
is determined by the format of the DISPLAY environment variable. When DISPLAY does not contain a hostname, e.g. it is set to :0, Unix sockets will be used. When it does contain a hostname, e.g. it is set to http://www.thegeekstuff.com/2010/06/xhost-cannot-open-display/ localhost:0.0, the X client application will try to connect to the server (even localhost as in the example) via TCP/IP sockets X has an authentication mechanism, which decides whether a client is allowed to connect to a server. As the Internet has become an increasingly hostile environment, it has become good practice to only open up services to the Internet when they are really needed. Recently in some Linux distributions, X is by default configured to listen only http://www.softpanorama.org/Xwindows/Troubleshooting/can_not_open_display.shtml to localhost. That means that default X settings become more and more defensive and thus without tuning there are more and more reasons why remote communications attempts using X initially will fail. That's why the first time you try to run a remote X application on modern Linux distributions, it usually does not work. The most common error message by far is "Can't open display". In this case an X client application, for example xterm, reports an error Can't open display on startup, for instance xterm Xt error: Can't open display: localhost:0.0 The first thing to try is to ensure that you used a correct sequence of commands. One typical mistake is you use like xhost + on the client instead of the server (your workstation). If you have problems the first thing to do is to see the value of the variable DISPLAY on the client. If it is not set at all or set incorrectly you need to fix that, for example export DISPLAY=10.10.10.1:0.0 The second step to check is whether X11 server itself is accessible from the client. If firewall on the server is enables it can block X11 session. You better exclude firewall from the possible causes first. You can see this by using nmap. If port 177 (UDP) or port 6000 (TCP) are blocked you need to fix this first. The next step is to check /var/log/messages on the
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 http://superuser.com/questions/340304/ssh-launch-gui-programs-on-remote-screen-not-x-display about hiring 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: http://serverfault.com/questions/357261/cant-start-remote-gui-programs-on-centos-6 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: launch GUI programs on remote screen, not X display up vote 7 down open display vote favorite 3 The problem Most people want to connect to a server over ssh with the "-X" option in order to run GUI programs on the remote host using the display of the client. I would like to run GUI programs on the physical monitor attached to the server. Is this possible ? Let me be more specific: My situation is the following: I have a workstation without a keyboard or mouse, but it has a monitor cannot open display connected to it. I would like to SSH to it with my laptop and be able to launch some graphical program, such as xeyes or ssvnc and have it appear on the workstation's monitor. [xapple@laptop ~]$ ssh workstation Last login: Mon Sep 26 20:03:35 2011 from laptop [xapple@workstation ~]$ export DISPLAY=:0 [xapple@workstation ~]$ xeyes No protocol specified Error: Can't open display: :0 Edit: extra information I should maybe explain a few things more clearly: I have sudo access on the workstation, I can install anything if needed. The workstation is running the GNOME user interface. Before disconnecting the keyboard and mouse from the workstation, I logged into a GNOME session. One can therefor see my GNOME desktop on the workstation's monitor currently. I don't wish to run programs from my laptop on the workstation. I would like to run workstation programs on the workstation. The xeyes or whatever executable is found on the remote server and should be run on the remote server's monitor I understand that performing this will leave me in a situation where my cursor will not be connected to the interface. I don't be able to click on things. That's ok. Any help greatly appreciated ! linux ssh display xorg share|improve this question edited Sep 28 '11 at 11:46 asked Sep 27 '11 at 7:44 xApple 235239 Did you executed xhost + on your server? –karlphi
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 about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. 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 Can't start remote GUI programs on CentOS 6 [closed] up vote 1 down vote favorite 3 I have set ForwardX11 yes in /etc/ssh/ssh_config which normally enables me to open GUI programs on CentOS5 by ssh -X server But doing the same on CentOS6 I get # firefox -no-remote Error: no display specified # What could be wrong? Update Have tried the following # firefox -no-remote Error: no display specified # echo $DISPLAY # export DISPLAY=localhost:0.0 # echo $DISPLAY localhost:0.0 # firefox -no-remote Error: cannot open display: localhost:0.0 # Update 2 ~$ echo $DISPLAY :0.0 ~$ export DISPLAY=localhost:0.0 ~$ ssh -X root@net2 [root@net2 ~]# xclock Error: Can't open display: [root@net2 ~]# linux centos share|improve this question edited Feb 7 '12 at 10:10 asked Feb 6 '12 at 15:59 Sandra 3,6861856116 closed as off-topic by Magellan, Jenny D, mdpc, Nathan C, Scott Pack Oct 11 '13 at 0:57 This question appears to be off-topic. The users who voted to close gave this specific reason:"Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – Magellan, Jenny D, mdpc, Nathan C, Scott PackIf this question can be reworded to fit the rules in the help center, please edit the question. add a comment| 2 Answers 2 active oldest votes up vote 9 down vote accepted After changing the ForwardX11 to yes, have you restarted the sshd server? That is, by typi