oio11: (Default)
[personal profile] oio11
xhost+ : How to Fix “Cannot Open Display” Error While Launching GUI on Remote Server

 
 

Question:

When I try to launch any GUI application on 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 open display: 


I get similar message when I try to open any GUI application. For example, launching Oracle Installer on remote server also gives the “cannot open display” error.
Answer: You can fix the “cannot open display” error 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 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 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.

http://www.thegeekstuff.com/2010/06/xhost-cannot-open-display/
(will be screened)
(will be screened if not validated)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org

October 2025

S M T W T F S
   1234
567891011
12131415161718
19202122 232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 5th, 2026 10:33 pm
Powered by Dreamwidth Studios