- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- cannot open display on remote machine
Operating System - Linux
1819791
Members
3282
Online
109607
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2009 04:16 AM
тАО05-17-2009 04:16 AM
i am not able to open display on a remote machine.
this is what i have been trying
[arvind@laptop ~]$ ssh root@192.168.5.223
root@192.168.5.223's password:
Last login: Sun May 17 02:27:41 2009 from 192.168.5.13
[root@localhost ~]# pwd
/root
[root@localhost ~]# export DISPLAY=:0.0
[root@localhost ~]# xhost +
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
xhost: unable to open display ":0.0"
[root@localhost ~]# export DISPLAY=192.168.5.13:0.0
[root@localhost ~]# xhost +
xhost: unable to open display "192.168.5.13:0.0"
[root@localhost ~]# xclock &
[1] 3555
[root@localhost ~]# Error: Can't open display: 192.168.5.13:0.0
[1]+ Exit 1 xclock
[root@localhost ~]#
kindly let me know where i am going wrong.
if i do a ssh -X root@192.168.5.223
things work fine. but not this way.
i mainly want this to work because i am trying to install Oracle on virtuozzo containers (similar to solaris containers) where in i am not able to get the display going either on a remote machine. ssh -X is not working on containers.
please help
this is what i have been trying
[arvind@laptop ~]$ ssh root@192.168.5.223
root@192.168.5.223's password:
Last login: Sun May 17 02:27:41 2009 from 192.168.5.13
[root@localhost ~]# pwd
/root
[root@localhost ~]# export DISPLAY=:0.0
[root@localhost ~]# xhost +
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
xhost: unable to open display ":0.0"
[root@localhost ~]# export DISPLAY=192.168.5.13:0.0
[root@localhost ~]# xhost +
xhost: unable to open display "192.168.5.13:0.0"
[root@localhost ~]# xclock &
[1] 3555
[root@localhost ~]# Error: Can't open display: 192.168.5.13:0.0
[1]+ Exit 1 xclock
[root@localhost ~]#
kindly let me know where i am going wrong.
if i do a ssh -X root@192.168.5.223
things work fine. but not this way.
i mainly want this to work because i am trying to install Oracle on virtuozzo containers (similar to solaris containers) where in i am not able to get the display going either on a remote machine. ssh -X is not working on containers.
please help
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2009 04:59 AM
тАО05-17-2009 04:59 AM
Solution
I think there are several problems in your attempt:
1.)
"xhost +" tells the X server (on your laptop) to disable X11 protocol security. The problem is, it uses the X11 protocol to do that. You can use "xhost +" only if X11 protocol access is already allowed. In other words, if you want to use "xhost +", enter the command on your laptop _before_ ssh'ing to the remote host.
Or enter the "xhost +" command in another local terminal window on your laptop: it is not connection-specific, but takes effect on your entire X11 session.
2.)
With this command sequence:
ssh root@192.168.5.223
export DISPLAY=:0.0
... you are asking the X applications to connect to the display of the 192.168.5.223 machine, not to the display of your laptop.
If 192.168.5.223 is a rack-mounted server, it may not even *have* a graphical display installed. The error message 'Xlib: connection to ":0.0" refused by server' indicates there is no local X server running on 192.168.5.223.
So, assuming that 192.168.5.13 is the IP address of your laptop, the correct command sequence would be:
[arvind@laptop ~]$ xhost +
[arvind@laptop ~]$ ssh root@192.168.5.223
[root@localhost ~]# export DISPLAY=192.168.5.13:0.0
[root@localhost ~]# xclock &
The first command tells your laptop to accept unauthenticated remote X11 connections, the second is a standard ssh command, and the third tells the X applications on the remote host to send their windows to the display of your laptop.
But it still might fail, because...
3.)
Most Linux distributions will disallow all unencrypted remote X11 connections by default. This is done by adding "-nolisten tcp" to the startup options of the X server. You would have to find out how the X server is started on your laptop and remove this option, then restart your X display manager (logging out and back in will not be sufficient).
If your laptop has an iptables firewall configured, you would also have to allow incoming access to TCP port 6000.
My suggestion:
If ssh -X is not working on virtuozzo containers, you should find out why and fix it. The most common reason is that /etc/ssh/sshd_config in the remote machine/container has X11Forwarding disabled by default. Change it to "X11Forwarding yes", restart sshd and try connecting again.
Using "ssh -X" is not only more secure, it is often actually *easier* than the old-style procedure.
MK
1.)
"xhost +" tells the X server (on your laptop) to disable X11 protocol security. The problem is, it uses the X11 protocol to do that. You can use "xhost +" only if X11 protocol access is already allowed. In other words, if you want to use "xhost +", enter the command on your laptop _before_ ssh'ing to the remote host.
Or enter the "xhost +" command in another local terminal window on your laptop: it is not connection-specific, but takes effect on your entire X11 session.
2.)
With this command sequence:
ssh root@192.168.5.223
export DISPLAY=:0.0
... you are asking the X applications to connect to the display of the 192.168.5.223 machine, not to the display of your laptop.
If 192.168.5.223 is a rack-mounted server, it may not even *have* a graphical display installed. The error message 'Xlib: connection to ":0.0" refused by server' indicates there is no local X server running on 192.168.5.223.
So, assuming that 192.168.5.13 is the IP address of your laptop, the correct command sequence would be:
[arvind@laptop ~]$ xhost +
[arvind@laptop ~]$ ssh root@192.168.5.223
[root@localhost ~]# export DISPLAY=192.168.5.13:0.0
[root@localhost ~]# xclock &
The first command tells your laptop to accept unauthenticated remote X11 connections, the second is a standard ssh command, and the third tells the X applications on the remote host to send their windows to the display of your laptop.
But it still might fail, because...
3.)
Most Linux distributions will disallow all unencrypted remote X11 connections by default. This is done by adding "-nolisten tcp" to the startup options of the X server. You would have to find out how the X server is started on your laptop and remove this option, then restart your X display manager (logging out and back in will not be sufficient).
If your laptop has an iptables firewall configured, you would also have to allow incoming access to TCP port 6000.
My suggestion:
If ssh -X is not working on virtuozzo containers, you should find out why and fix it. The most common reason is that /etc/ssh/sshd_config in the remote machine/container has X11Forwarding disabled by default. Change it to "X11Forwarding yes", restart sshd and try connecting again.
Using "ssh -X" is not only more secure, it is often actually *easier* than the old-style procedure.
MK
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2009 09:34 AM
тАО05-17-2009 09:34 AM
Re: cannot open display on remote machine
thank you..
i did the X11Forwarding to yes
and also i had to install a package xorg-x11-xauth
i got an error
debug1: Remote: No xauth program; cannot forward with spoofing.
and found the workaround here
http://www.redhat.com/magazine/026dec06/features/tips_tricks/?intcmp=bcm_edmsept_007
thank you for your help again
i did the X11Forwarding to yes
and also i had to install a package xorg-x11-xauth
i got an error
debug1: Remote: No xauth program; cannot forward with spoofing.
and found the workaround here
http://www.redhat.com/magazine/026dec06/features/tips_tricks/?intcmp=bcm_edmsept_007
thank you for your help again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2009 09:03 PM
тАО05-17-2009 09:03 PM
Re: cannot open display on remote machine
Hello
do you have reflection X manager installed?
Select > Linux
Methord > Open SSH
type hostname & password,
you should able to get display from remote machine,
thanks,
do you have reflection X manager installed?
Select > Linux
Methord > Open SSH
type hostname & password,
you should able to get display from remote machine,
thanks,
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP