[SOLVED ] Problem with forwarding X
[SOLVED ] Problem with forwarding X
Hi All.
I have a little problem that probably is easy to solve but i can not figure it out.
Previously i had a testing machine with X11 configured and i was connecting the machine via putty. Everything was working fine. After putting the machine into production without any graphical interface installed the problem occured. I think i have something wrong with putty configuration or ssh configuration. When i ssh to the server i try to launch any graphcal application (virt-manager for example), i got this:
Traceback (most recent call last):
File "/usr/share/virt-manager/virt-manager.py", line 376, in ?
_show_startup_error(str(run_e), "".join(traceback.format_exc()))
File "/usr/share/virt-manager/virt-manager.py", line 52, in _show_startup_error
import gtk
File "/usr/lib64/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 76, in ?
_init()
File "/usr/lib64/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 64, in _init
_gtk.init_check()
RuntimeError: could not open display
I did not have this problem before putting the server into production.
I suspect that this is caused by login procedure. It has changed sience putting it into production. Previously i had straight root login via ssh. Now i have to login with my normal account after that i am able to su into root. Could you point me what i have to change (or redirect the display variable) to get this X11 forwarding work via putty?
Thank You
I have a little problem that probably is easy to solve but i can not figure it out.
Previously i had a testing machine with X11 configured and i was connecting the machine via putty. Everything was working fine. After putting the machine into production without any graphical interface installed the problem occured. I think i have something wrong with putty configuration or ssh configuration. When i ssh to the server i try to launch any graphcal application (virt-manager for example), i got this:
Traceback (most recent call last):
File "/usr/share/virt-manager/virt-manager.py", line 376, in ?
_show_startup_error(str(run_e), "".join(traceback.format_exc()))
File "/usr/share/virt-manager/virt-manager.py", line 52, in _show_startup_error
import gtk
File "/usr/lib64/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 76, in ?
_init()
File "/usr/lib64/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 64, in _init
_gtk.init_check()
RuntimeError: could not open display
I did not have this problem before putting the server into production.
I suspect that this is caused by login procedure. It has changed sience putting it into production. Previously i had straight root login via ssh. Now i have to login with my normal account after that i am able to su into root. Could you point me what i have to change (or redirect the display variable) to get this X11 forwarding work via putty?
Thank You
Re: Problem with forwarding X
Assuming that you have your ssh forwarding set up correctly, you will need to have the package xorg-x11-xauth installed on the server to use X. You probably need to run virt-manager as your own userid - it should prompt for the root password when you do so. Once you have xorg-x11-xauth installed, logout and back in again and you should see something like this
[code]
$ echo $DISPLAY
localhost:10.0
[/code]
If you don't see anything when you run the echo then X11 forwarding will not work. If you switch to another user then it's likely not to work.
[code]
$ echo $DISPLAY
localhost:10.0
[/code]
If you don't see anything when you run the echo then X11 forwarding will not work. If you switch to another user then it's likely not to work.
Re: Problem with forwarding X
Hi,
Thanks for replay.
rpm -qa | grep -i x11
xorg-x11-xauth-1.0.1-2.1
xorg-x11-filesystem-7.1-2.fc6
xorg-x11-xfs-1.0.2-4
xorg-x11-font-utils-7.1-2
libX11-1.0.3-11.el5
libX11-1.0.3-11.el5
echo $DISPLAY
localhost:10.0
When i launch the virt-manager from root :
The application 'virt-manager.py' lost its connection to the display localhost:10.0;
most likely the X server was shut down or you killed/destroyed
the application.
When i launch it from my user account nothing happens. NO error is being displayed and no manager appears.
X11 forwarding is enabled and putty is set properly.
Thx
Thanks for replay.
rpm -qa | grep -i x11
xorg-x11-xauth-1.0.1-2.1
xorg-x11-filesystem-7.1-2.fc6
xorg-x11-xfs-1.0.2-4
xorg-x11-font-utils-7.1-2
libX11-1.0.3-11.el5
libX11-1.0.3-11.el5
echo $DISPLAY
localhost:10.0
When i launch the virt-manager from root :
The application 'virt-manager.py' lost its connection to the display localhost:10.0;
most likely the X server was shut down or you killed/destroyed
the application.
When i launch it from my user account nothing happens. NO error is being displayed and no manager appears.
X11 forwarding is enabled and putty is set properly.
Thx
Re: Problem with forwarding X
I just tried it here over ssh and I ran virt-manager as myself. It did appear to hang but after about 15 seconds I got a pop-up prompt asking me for the root password. My connection to the server is pretty fast so maybe it might take longer. The password prompt is done using a different package but I can't find out what that is with a quick search
Re: Problem with forwarding X
Hi Trevor,
It's strange. I tested exactly same settings on test server. Everything works fine. When i go to the production it does not work. The only difference between them is that on testing i have straight root login and on production i have to log into user and then su -.
Any ideas?
It's strange. I tested exactly same settings on test server. Everything works fine. When i go to the production it does not work. The only difference between them is that on testing i have straight root login and on production i have to log into user and then su -.
Any ideas?
Re: Problem with forwarding X
I can understand it not working when you su to root first as connections to the X server from different users are not allowed by default. The bit I do not understand is why you do not see a password prompt when running it as a normal user.
Re: Problem with forwarding X
Ah OK. did not get you previously.
The same situation with system-config-lvm :/
Here is the part of sshd_config :
# Accept locale-related environment variables
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
X11Forwarding yes
X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no
#ChrootDirectory none
Not sure what i could mess here up :/
Everything look fine here for me.
The same situation with system-config-lvm :/
Here is the part of sshd_config :
# Accept locale-related environment variables
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
X11Forwarding yes
X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no
#ChrootDirectory none
Not sure what i could mess here up :/
Everything look fine here for me.
Re: Problem with forwarding X
OK, got it, you need to install the package usermode-1.88-3.el5.2 (or whatever the latest version is).
Re: Problem with forwarding X
Trevor,
I do not have to install anything :)
Sorry for wasting your time. The problem was in putty. do not know the reason of that but i deleted the X11 location and it started to work :)
On testing machine i deleted the X11 location and it stopped working.
If you know the reason of that i would be greateful if you could share it with me :)
Thank you for your time and sorry once more ;)
Sorry for typos but i have different language installed right now ;)
Have a nice day.
I do not have to install anything :)
Sorry for wasting your time. The problem was in putty. do not know the reason of that but i deleted the X11 location and it started to work :)
On testing machine i deleted the X11 location and it stopped working.
If you know the reason of that i would be greateful if you could share it with me :)
Thank you for your time and sorry once more ;)
Sorry for typos but i have different language installed right now ;)
Have a nice day.
Re: [SOLVED ] Problem with forwarding X
Forgot to add. Mark as solved.