LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   X11Forwarding - could not open display on headless server (https://www.linuxquestions.org/questions/linux-general-1/x11forwarding-could-not-open-display-on-headless-server-4175505717/)

niteshadw 05-21-2014 10:01 PM

X11Forwarding - could not open display on headless server
 
Hello,

I'm trying to forward virt-manager running on a headless CentOS 6.5 server. The host has X11Forwarding yes and X11DisplayOffset 10 both uncommented in sshd_conf Also, the $DISPLAY variable on the headless server does not return anything. I'm guessing it's missing the display because when I execute the following command, I get the errors:

PHP Code:

ssh -X root@headless_srvr virt-manager
root
@headless_srvr's password: 
X11 forwarding request failed on channel 0
Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-manager.py", line 383, in <module>
    main()
  File "/usr/share/virt-manager/virt-manager.py", line 286, in main
    raise gtk_error
RuntimeError: could not open display 


I was wondering how can I setup X11Forwarding over SSH from a headless server to a host running an OS with Gnome.

Thank you in advance!

eklavya 05-22-2014 12:21 AM

Try to set
Quote:

X11DisplayOffset 10
as commented and
Quote:

X11UseLocalhost no
as uncommented.

Did you restart ssh daemon after making changes in sshd_confing?

If you are still facing problem, try to install following packages.
Quote:

yum install xorg-x11-xauth

niteshadw 05-22-2014 09:05 PM

Hi,

Thanks for the reply. I set "X11UseLocalhost no", installed the package and restarted the service and now it works! Thank you! I'm not sure if it's the setting or the package but it works now!


All times are GMT -5. The time now is 10:36 PM.