Hello,
I've rented a dedicated root server (SR7 at strato.de) and would like to run qemu at it, but get the error:
# qemu -hda install.img -cdrom install47.iso -boot d Could not initialize SDL - exiting
It seems that I have to establish X connection, so I've installed Xming at my WinXP laptop and at the server I have changed these 3 lines in the /etc/ssh/sshd_config:
X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost yes
And also I have installed these Xorg packages:
# rpm -qa | grep -i xorg xorg-x11-utils-7.1-2.fc6 xorg-x11-drv-evdev-1.0.0.5-5.el5 xorg-x11-drv-vesa-1.3.0-8.2.el5 xorg-x11-filesystem-7.1-2.fc6 xorg-x11-font-utils-7.1-2 xorg-x11-server-utils-7.1-4.fc6 xorg-x11-xkb-utils-1.0.2-2.1 xorg-x11-xfs-1.0.2-4 xorg-x11-fonts-base-7.1-2.1.el5 xorg-x11-drv-keyboard-1.1.0-3 xorg-x11-server-Xorg-1.1.1-48.76.el5_5.1 xorg-x11-drv-mouse-1.1.1-1.1 xorg-x11-drv-void-1.1.0-3.1
Then I've restarted the server and run PuTTY to connect to it, where I have checked the Connection->SSH->X11->Enable X11 forwarding
(Sorry for mentioning all this Windows stuff, but I don't have a Unix desktop and also the problem seems to be in the CentOS config)
When I connect to the CentOS machine, the DISPLAY variable isn't set at all. Shouldn't SSH set it to localhost:10.0 ?
I try to set DISPLAY manually to localhost:10.0 and my_ip_address:0.0 and I have tried connecting as root and as a non-root user.
Still I can't run any X programs like xterm:
$ echo $DISPLAY
$ xterm xterm Xt error: Can't open display: xterm: DISPLAY is not set
$ export DISPLAY=localhost:10.0 $ xterm xterm Xt error: Can't open display: localhost:10.0
$ netstat -an |grep ESTABLISHED (my sshd listens at port 443) tcp 0 52 ::ffff:85.214.XXX.XXX:443 ::ffff:88.153.153.102:2646 ESTABLISHED tcp 0 0 ::ffff:85.214.XXX.XXX:443 ::ffff:88.153.153.102:2566 ESTABLISHED
$ export DISPLAY=88.153.153.102:0.0 $ xterm xterm Xt error: Can't open display: 88.153.153.102:0.0 (after long time)
And the firewall is off:
$ sudo /sbin/service iptables status Firewall is stopped.
And I don't see anything in the Xming log (pasted below).
Does anybody please have a hint for me? My Linux knowledge is a bit rusty :-)
Should I start X somehow at the Linux side? (I've checked chkconfig --list, found nothing there)
Regards Alex
PS: Xming log below:
Welcome to the Xming X Server Vendor: Colin Harrison Release: 6.9.0.31 FreeType2: 2.3.4 Contact: http://sourceforge.net/forum/?group_id=156984
C:\Program Files\Xming\Xming.exe :0 -ac -clipboard -multiwindow
XdmcpRegisterConnection: newAddress 10.216.41.31 winAdjustVideoModeShadowGDI - Using Windows display depth of 32 bits per pixel winAllocateFBShadowGDI - Creating DIB with width: 1920 height: 1200 depth: 32 winInitVisualsShadowGDI - Masks 00ff0000 0000ff00 000000ff BPRGB 8 d 24 bpp 32 glWinInitVisuals:1596: glWinInitVisuals glWinInitVisualConfigs:1503: glWinInitVisualConfigs glWinSetVisualConfigs:1581: glWinSetVisualConfigs init_visuals:1055: init_visuals null screen fn ReparentWindow null screen fn RestackWindow InitQueue - Calling pthread_mutex_init InitQueue - pthread_mutex_init returned InitQueue - Calling pthread_cond_init InitQueue - pthread_cond_init returned winInitMultiWindowWM - Hello winInitMultiWindowWM - Calling pthread_mutex_lock () winMultiWindowXMsgProc - Hello winMultiWindowXMsgProc - Calling pthread_mutex_lock () glWinScreenProbe:1390: glWinScreenProbe fixup_visuals:1303: fixup_visuals init_screen_visuals:1336: init_screen_visuals (--) 5 mouse buttons found (--) Setting autorepeat to delay=500, rate=31 (--) winConfigKeyboard - Layout: "00000407" (00000407) (--) Using preset keyboard for "German (Germany)" (407), type "4" Could not init font path element C:\Program Files\Xming/fonts/misc/, removing from list! Could not init font path element C:\Program Files\Xming/fonts/TTF/, removing from list! Could not init font path element C:\Program Files\Xming/fonts/Type1/, removing from list! Could not init font path element C:\Program Files\Xming/fonts/75dpi/, removing from list! Could not init font path element C:\Program Files\Xming/fonts/100dpi/, removing from list! Could not init font path element C:\Program Files\Xming\fonts\dejavu, removing from list! Could not init font path element C:\Program Files\Xming\fonts\cyrillic, removing from list! Could not init font path element C:\WINDOWS\Fonts, removing from list! winInitMultiWindowWM - pthread_mutex_lock () returned. winInitMultiWindowWM - pthread_mutex_unlock () returned. winInitMultiWindowWM - DISPLAY=127.0.0.1:0.0 winMultiWindowXMsgProc - pthread_mutex_lock () returned. winMultiWindowXMsgProc - pthread_mutex_unlock () returned. winMultiWindowXMsgProc - DISPLAY=127.0.0.1:0.0 winProcEstablishConnection - Hello winInitClipboard () winProcEstablishConnection - winInitClipboard returned. winMultiWindowXMsgProc - XOpenDisplay () returned and successfully opened the display. winInitMultiWindowWM - XOpenDisplay () returned and successfully opened the display. winClipboardProc - Hello DetectUnicodeSupport - Windows XP winClipboardProc - DISPLAY=127.0.0.1:0.0 winClipboardProc - XOpenDisplay () returned and successfully opened the display.
If you setup X11 forwarding in PuTTY, then double-click on a saved putty session, it will clear out the X11 forwarding and use the settings from the saved session (no X forwarding). If X forwarding is properly enabled, you should not have to set the DISPLAY variable on the remote side.
You don't need the X server or anything else on the remote server. Default firewall will have no effect either. Also, make sure to reload sshd after changing the settings (service sshd reload).
On Tue, Jun 15, 2010 at 3:10 PM, Alexander Farber alexander.farber@gmail.com wrote:
Hello,
I've rented a dedicated root server (SR7 at strato.de) and would like to run qemu at it, but get the error:
# qemu -hda install.img -cdrom install47.iso -boot d Could not initialize SDL - exiting
It seems that I have to establish X connection, so I've installed Xming at my WinXP laptop and at the server I have changed these 3 lines in the /etc/ssh/sshd_config:
X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost yes
And also I have installed these Xorg packages:
# rpm -qa | grep -i xorg xorg-x11-utils-7.1-2.fc6 xorg-x11-drv-evdev-1.0.0.5-5.el5 xorg-x11-drv-vesa-1.3.0-8.2.el5 xorg-x11-filesystem-7.1-2.fc6 xorg-x11-font-utils-7.1-2 xorg-x11-server-utils-7.1-4.fc6 xorg-x11-xkb-utils-1.0.2-2.1 xorg-x11-xfs-1.0.2-4 xorg-x11-fonts-base-7.1-2.1.el5 xorg-x11-drv-keyboard-1.1.0-3 xorg-x11-server-Xorg-1.1.1-48.76.el5_5.1 xorg-x11-drv-mouse-1.1.1-1.1 xorg-x11-drv-void-1.1.0-3.1
Then I've restarted the server and run PuTTY to connect to it, where I have checked the Connection->SSH->X11->Enable X11 forwarding
(Sorry for mentioning all this Windows stuff, but I don't have a Unix desktop and also the problem seems to be in the CentOS config)
When I connect to the CentOS machine, the DISPLAY variable isn't set at all. Shouldn't SSH set it to localhost:10.0 ?
I try to set DISPLAY manually to localhost:10.0 and my_ip_address:0.0 and I have tried connecting as root and as a non-root user.
Still I can't run any X programs like xterm:
$ echo $DISPLAY
$ xterm xterm Xt error: Can't open display: xterm: DISPLAY is not set
$ export DISPLAY=localhost:10.0 $ xterm xterm Xt error: Can't open display: localhost:10.0
$ netstat -an |grep ESTABLISHED (my sshd listens at port 443) tcp 0 52 ::ffff:85.214.XXX.XXX:443 ::ffff:88.153.153.102:2646 ESTABLISHED tcp 0 0 ::ffff:85.214.XXX.XXX:443 ::ffff:88.153.153.102:2566 ESTABLISHED
$ export DISPLAY=88.153.153.102:0.0 $ xterm xterm Xt error: Can't open display: 88.153.153.102:0.0 (after long time)
And the firewall is off:
$ sudo /sbin/service iptables status Firewall is stopped.
And I don't see anything in the Xming log (pasted below).
Does anybody please have a hint for me? My Linux knowledge is a bit rusty :-)
Should I start X somehow at the Linux side? (I've checked chkconfig --list, found nothing there)
Regards Alex
PS: Xming log below:
Welcome to the Xming X Server Vendor: Colin Harrison Release: 6.9.0.31 FreeType2: 2.3.4 Contact: http://sourceforge.net/forum/?group_id=156984
C:\Program Files\Xming\Xming.exe :0 -ac -clipboard -multiwindow
XdmcpRegisterConnection: newAddress 10.216.41.31 winAdjustVideoModeShadowGDI - Using Windows display depth of 32 bits per pixel winAllocateFBShadowGDI - Creating DIB with width: 1920 height: 1200 depth: 32 winInitVisualsShadowGDI - Masks 00ff0000 0000ff00 000000ff BPRGB 8 d 24 bpp 32 glWinInitVisuals:1596: glWinInitVisuals glWinInitVisualConfigs:1503: glWinInitVisualConfigs glWinSetVisualConfigs:1581: glWinSetVisualConfigs init_visuals:1055: init_visuals null screen fn ReparentWindow null screen fn RestackWindow InitQueue - Calling pthread_mutex_init InitQueue - pthread_mutex_init returned InitQueue - Calling pthread_cond_init InitQueue - pthread_cond_init returned winInitMultiWindowWM - Hello winInitMultiWindowWM - Calling pthread_mutex_lock () winMultiWindowXMsgProc - Hello winMultiWindowXMsgProc - Calling pthread_mutex_lock () glWinScreenProbe:1390: glWinScreenProbe fixup_visuals:1303: fixup_visuals init_screen_visuals:1336: init_screen_visuals (--) 5 mouse buttons found (--) Setting autorepeat to delay=500, rate=31 (--) winConfigKeyboard - Layout: "00000407" (00000407) (--) Using preset keyboard for "German (Germany)" (407), type "4" Could not init font path element C:\Program Files\Xming/fonts/misc/, removing from list! Could not init font path element C:\Program Files\Xming/fonts/TTF/, removing from list! Could not init font path element C:\Program Files\Xming/fonts/Type1/, removing from list! Could not init font path element C:\Program Files\Xming/fonts/75dpi/, removing from list! Could not init font path element C:\Program Files\Xming/fonts/100dpi/, removing from list! Could not init font path element C:\Program Files\Xming\fonts\dejavu, removing from list! Could not init font path element C:\Program Files\Xming\fonts\cyrillic, removing from list! Could not init font path element C:\WINDOWS\Fonts, removing from list! winInitMultiWindowWM - pthread_mutex_lock () returned. winInitMultiWindowWM - pthread_mutex_unlock () returned. winInitMultiWindowWM - DISPLAY=127.0.0.1:0.0 winMultiWindowXMsgProc - pthread_mutex_lock () returned. winMultiWindowXMsgProc - pthread_mutex_unlock () returned. winMultiWindowXMsgProc - DISPLAY=127.0.0.1:0.0 winProcEstablishConnection - Hello winInitClipboard () winProcEstablishConnection - winInitClipboard returned. winMultiWindowXMsgProc - XOpenDisplay () returned and successfully opened the display. winInitMultiWindowWM - XOpenDisplay () returned and successfully opened the display. winClipboardProc - Hello DetectUnicodeSupport - Windows XP winClipboardProc - DISPLAY=127.0.0.1:0.0 winClipboardProc - XOpenDisplay () returned and successfully opened the display. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Hello Brian,
On Tue, Jun 15, 2010 at 9:16 PM, Brian Mathis brian.mathis@gmail.com wrote:
If you setup X11 forwarding in PuTTY, then double-click on a saved putty session, it will clear out the X11 forwarding and use the settings from the saved session (no X forwarding). If X forwarding is properly enabled, you should not have to set the DISPLAY variable on the remote side.
You don't need the X server or anything else on the remote server. Default firewall will have no effect either. Also, make sure to reload sshd after changing the settings (service sshd reload).
I've tried both cleared and set X11 forwarding checkbox in PuTTY, both as root and non-root and only get:
$ xterm xterm Xt error: Can't open display: xterm: DISPLAY is not set
In the Xming log nothing happens at all (attached below).
Is maybe WinXP firewall inbetween, do I need to open some port? (Xming asked me to do that during its startup, and I did so - clicked the "Unblock" button)
Regards Alex
On 6/15/2010 2:32 PM, Alexander Farber wrote:
Hello Brian,
On Tue, Jun 15, 2010 at 9:16 PM, Brian Mathisbrian.mathis@gmail.com wrote:
If you setup X11 forwarding in PuTTY, then double-click on a saved putty session, it will clear out the X11 forwarding and use the settings from the saved session (no X forwarding). If X forwarding is properly enabled, you should not have to set the DISPLAY variable on the remote side.
You don't need the X server or anything else on the remote server. Default firewall will have no effect either. Also, make sure to reload sshd after changing the settings (service sshd reload).
I've tried both cleared and set X11 forwarding checkbox in PuTTY, both as root and non-root and only get:
$ xterm xterm Xt error: Can't open display: xterm: DISPLAY is not set
In the Xming log nothing happens at all (attached below).
Is maybe WinXP firewall inbetween, do I need to open some port? (Xming asked me to do that during its startup, and I did so - clicked the "Unblock" button)
Is something in your .profile or .bashrc clearing your DISPLAY variable? When I log in with putty with the X forwarding box checked I get a DISPLAY variable set automatically (you can see it with 'env') that isn't set when I don't check the box.
On Tue, Jun 15, 2010 at 9:50 PM, Les Mikesell lesmikesell@gmail.com wrote:
Is something in your .profile or .bashrc clearing your DISPLAY variable? When I log in with putty with the X forwarding box checked I get a DISPLAY variable set automatically (you can see it with 'env') that isn't set when I don't check the box.
No, "grep -r DISPLAY $HOME" and "... /root" return nothing :-(
I'd prefer to get Xming + CentOS working (it worked for me once already, had CentOS in VmWare and could run X-programs via Xming from it) instead of installing NX....
Thnak you all for any hints Alex
grep -rw DISPLAY /etc/
doesn't set anything either...
So, when connecting via SSH/PuTTY, then the DISPLAy should be set to localhost:10.0 by SSH, correct?
Regards Alex
On Tue, Jun 15, 2010 at 9:54 PM, Alexander Farber alexander.farber@gmail.com wrote:
On Tue, Jun 15, 2010 at 9:50 PM, Les Mikesell lesmikesell@gmail.com wrote:
Is something in your .profile or .bashrc clearing your DISPLAY variable? When I log in with putty with the X forwarding box checked I get a DISPLAY variable set automatically (you can see it with 'env') that isn't set when I don't check the box.
No, "grep -r DISPLAY $HOME" and "... /root" return nothing :-(
I'd prefer to get Xming + CentOS working (it worked for me once already, had CentOS in VmWare and could run X-programs via Xming from it) instead of installing NX....
On 6/15/2010 2:56 PM, Alexander Farber wrote:
grep -rw DISPLAY /etc/
doesn't set anything either...
So, when connecting via SSH/PuTTY, then the DISPLAy should be set to localhost:10.0 by SSH, correct?
Yes - that's mostly magic done by sshd when the client requests forwarding. I think the actual number would depend on what ports were already in use on the server side.
And I still recommend at least looking at NX/freenx. It's a painless windows installer and a yum install on the centos side. Even if you get xming working you aren't going to like running it over the internet much. Even if you have good bandwidth, the latency makes it slow to respond.
Alexander Farber wrote:
On Tue, Jun 15, 2010 at 9:50 PM, Les Mikesell lesmikesell@gmail.com wrote:
Is something in your .profile or .bashrc clearing your DISPLAY variable? When I log in with putty with the X forwarding box checked I get a DISPLAY variable set automatically (you can see it with 'env') that isn't set when I don't check the box.
No, "grep -r DISPLAY $HOME" and "... /root" return nothing :-(
I'd prefer to get Xming + CentOS working (it worked for me once already, had CentOS in VmWare and could run X-programs via Xming from it) instead of installing NX....
I'm not sure what to tell you about the X forwarding in putty. It has always worked fine for me. You have to make sure your Xming setup will allow the connection (I generally just disable access control), but I don't think that would cause the symptom you are seeing.
You may want to take another look at NX. freenx is available from the extras repository in CentOS and is very easy to set up. I found that NX over the Internet was more responsive than X+ssh over a local network while X+ssh over the Internet was all but unusable.
On Tue, Jun 15, 2010 at 3:32 PM, Alexander Farber alexander.farber@gmail.com wrote:
Hello Brian,
On Tue, Jun 15, 2010 at 9:16 PM, Brian Mathis brian.mathis@gmail.com wrote:
If you setup X11 forwarding in PuTTY, then double-click on a saved putty session, it will clear out the X11 forwarding and use the settings from the saved session (no X forwarding). If X forwarding is properly enabled, you should not have to set the DISPLAY variable on the remote side.
You don't need the X server or anything else on the remote server. Default firewall will have no effect either. Also, make sure to reload sshd after changing the settings (service sshd reload).
I've tried both cleared and set X11 forwarding checkbox in PuTTY, both as root and non-root and only get:
$ xterm xterm Xt error: Can't open display: xterm: DISPLAY is not set
In the Xming log nothing happens at all (attached below).
Is maybe WinXP firewall inbetween, do I need to open some port? (Xming asked me to do that during its startup, and I did so - clicked the "Unblock" button)
Regards Alex
Follow these steps in PuTTY: - Single-click on the saved putty session for that host - Press the [Load] button - Go to the SSH/X11 options and enable X11 forwarding - Click the [Open] button and connect to server - echo $DISPLAY
If you do not follow exactly these steps, the saved session will override the X11 forwarding option (assuming its default is not enabled) and disable forwarding.
On 6/15/2010 2:10 PM, Alexander Farber wrote:
Hello,
I've rented a dedicated root server (SR7 at strato.de) and would like to run qemu at it, but get the error:
# qemu -hda install.img -cdrom install47.iso -boot d Could not initialize SDL - exiting
It seems that I have to establish X connection, so I've installed Xming at my WinXP laptop and at the server I have changed these 3 lines in the /etc/ssh/sshd_config:
What you are doing should work if putty is really forwarding, but if you intend to do much remote X work, I'd recommend installing the freenx package on the CentOS side and running the windows NX client that you can download from http://www.nomachine.com. The only quirk I've found is that it generates a unique keypair during the install so you need to cat /etc/nxserver/client.id in a putty session, and cut/paste it into the nx client config (click configure, then the 'key' button). It takes care of running over the ssh port for you and gives much better performance than normal remote X access.
Hello,
I've found the solution for my problem:
sudo yum install xorg-x11-xinit
Once I've done that, then started Xming with -ac and PuTTY with X11 Forwarding enabled, then the variable DISPLAY got set to localhost:10 automatically and I could run X-programs
Your advice with NX has worked too, thank you, Les:
sudo yum install freenx sudo cat /etc/nxserver/client.id_dsa.key (paste the key into Windows NX client prompt)
Regards Alex
On Tue, Jun 15, 2010 at 9:41 PM, Les Mikesell lesmikesell@gmail.com wrote:
What you are doing should work if putty is really forwarding, but if you intend to do much remote X work, I'd recommend installing the freenx package on the CentOS side and running the windows NX client that you can download from http://www.nomachine.com. The only quirk I've found is that it generates a unique keypair during the install so you need to cat /etc/nxserver/client.id in a putty session, and cut/paste it into the nx client config (click configure, then the 'key' button). It takes care of running over the ssh port for you and gives much better performance than normal remote X access.