Help! Problem with export display.

C&T: Video Games, Table Top Games & Computerized Stuff
Post Reply
Kreshna Aryaguna Nurzaman
Sick, Twisted Fuck
Posts: 1949
Joined: Thu Jun 09, 2005 2:37 pm
19
Location: MENTAL HOSPITAL
Contact:

#1 Help! Problem with export display.

Post by Kreshna Aryaguna Nurzaman »

Well, I'm using a PC X Server to display Linux X applications (Linux GUI like Oracle Universal Installer, xclock, etc) on my Winblows desktop. I'm using the good old WinAxe Plus 7.3, which I've been using for few years.

The Linux I'm running is RHEL 4 ES on VMWare 5.5.1, connecting with PuTTY 0.58. Naturally, the first step I did to ensure the Linux GUI could run on my Windows desktop is exporting the display to my host:

Code: Select all

export DISPLAY=192.168.21.195:0.0


Yup, that was my IP in the local network.

And then, the next step is executing xclock to test whether the GUI could appear on my Windows desktop.

Code: Select all

xclock &


And of course, the first time I ran those commands, they were executed flawlessly. Just like usual.

However, lately, I often experienced the problem below:

Code: Select all

[oracle@linux ~]$ export DISPLAY=192.168.21.195:0.0
[oracle@linux ~]$ xclock &
[1] 3096
[oracle@linux ~]$ Xlib: client uses different protocol version (11) than server (0)!
Error: Can't open display: 192.168.21.195:0.0

[1]+  Exit 1                  xclock
Yes, client uses different protocol version (11) than server (0)!. Now what the hell was that supposed to mean? Note that the problem is intermittent; sometimes it just happens, sometimes it doesn't. I couldn't figure what the fuck is the cause, but sometimes, restarting the Linux AND the PC X Server solves the problem.

Such thing actually never happened to me before. Ever. And yes, I have been using WinAxe as PC X Server since 2004, and I've been using it on Red Hat, HP UX, etc without experiencing such problem. However, it is the first time indeed I'm running Red Hat on VMWare.

What's wrong? Is it the PC X Server, the Linux itself, or the VMWare? Help!
Last edited by Kreshna Aryaguna Nurzaman on Mon Oct 09, 2006 6:04 am, edited 1 time in total.
The Sick, Twisted Fuck | Sap #2 of the Bitter Trio | Knight of the e-mail | Evil Liberal Conspirator | Esoteric Order of Dagon | Weird TGODer

Share your free D&D character here.

:welcome :arrow: :sheepfucker: :thumbsup

So be it. If saying "NO" means being alone, then to hell with love, with romance, with marriage, and all the shit life keeps pumping at me. I'll walk alone, but with freedom and a healed pride.

NEVER buy a LiteOn CD/DVD Writer. Ever.
User avatar
Destructionator XV
Lead Programmer
Posts: 2352
Joined: Sun Jun 12, 2005 10:12 am
19
Location: Watertown, New York
Contact:

#2

Post by Destructionator XV »

What I would do is simply update putty and the PC X server. It looks like you are using old versions anyway.

The error message is bizarre; X11 has been in use for over 10 years now (almost 20!), so it is pretty absurd the server doesn't use it. It is probably a bug in the PC X server. Updating to the newest version will probably take care of that.



One other thing: if you are using putty for SSH, you shouldn't be using the DISPLAY variable method, because it is an insecure method of doing it. Since you are on a LAN, it is no big deal, but here are the steps anyway.

Instead, turn on X11 forwarding on both the client and the server. In /etc/ssh/sshd_config, there should be a line that says

Code: Select all

X11Forwarding no
Change it to

Code: Select all

X11Forwarding yes
If it already says yes, then it is turned on and you have nothing to worry about.

Next, in putty, in the options page that comes up when you start the program, look under Connection, and there will be a SSH. Expand that, and there is X11. Click it, and on the right there is a checkbox to Enable X11 forwarding. Turn it on, and you can use X applications over the SSH link directly, without needing to export display.

This has the added advantage of encrypting the X traffic, and you can use SSH compression if you want (no good for LANs, but pretty great over the Internet).

Once the X11 forwarding is turned on on both sides, you can skip the export step. Simply use xclock or whatever as soon as you log in.


If you are not using SSH, you should be, even on a LAN. Telnet and rlogin are both very obsolete and insecure.
Adam D. Ruppe
Image Oh my hero, so far away now.....
Kreshna Aryaguna Nurzaman
Sick, Twisted Fuck
Posts: 1949
Joined: Thu Jun 09, 2005 2:37 pm
19
Location: MENTAL HOSPITAL
Contact:

#3

Post by Kreshna Aryaguna Nurzaman »

Destructionator XV wrote:One other thing: if you are using putty for SSH, you shouldn't be using the DISPLAY variable method, because it is an insecure method of doing it. Since you are on a LAN, it is no big deal, but here are the steps anyway.

Instead, turn on X11 forwarding on both the client and the server. In /etc/ssh/sshd_config, there should be a line that says

Code: Select all

X11Forwarding no
Change it to

Code: Select all

X11Forwarding yes
If it already says yes, then it is turned on and you have nothing to worry about.

Next, in putty, in the options page that comes up when you start the program, look under Connection, and there will be a SSH. Expand that, and there is X11. Click it, and on the right there is a checkbox to Enable X11 forwarding. Turn it on, and you can use X applications over the SSH link directly, without needing to export display.
Well I have done the step above (using X11 Forwarding instead of Export Display), and it actually worked.

However, when I re -started WinAxe (the PC X Server I'm using) while still connected to Putty

Code: Select all

[root@linux cdrom]# xclock &
[2] 2955
[1]   Terminated              xclock  (wd: ~)
(wd now: /src/ora10201/cdrom)
[root@linux cdrom]# Xlib: client uses different protocol version (11) than server (0)!
Error: Can't open display: localhost:10.0

[2]+  Exit 1                  xclock
Well, when using export DISPLAY method, usually restarting WinAxe while the PuTTY is disconnected fixed the problem. This time, I tried to do the same again, and this is what I got:

Code: Select all

[root@linux ~]# xclock &
[1] 3029
[root@linux ~]# X connection to localhost:10.0 broken (explicit kill or server shutdown).

[1]+  Exit 1                  xclock
[root@linux ~]#
:thewall:
The Sick, Twisted Fuck | Sap #2 of the Bitter Trio | Knight of the e-mail | Evil Liberal Conspirator | Esoteric Order of Dagon | Weird TGODer

Share your free D&D character here.

:welcome :arrow: :sheepfucker: :thumbsup

So be it. If saying "NO" means being alone, then to hell with love, with romance, with marriage, and all the shit life keeps pumping at me. I'll walk alone, but with freedom and a healed pride.

NEVER buy a LiteOn CD/DVD Writer. Ever.
User avatar
Destructionator XV
Lead Programmer
Posts: 2352
Joined: Sun Jun 12, 2005 10:12 am
19
Location: Watertown, New York
Contact:

#4

Post by Destructionator XV »

What happens when you start up the X server, then start up putty and try to use the ssh X11 forwarding only?

I always have X running before even opening putty with my boxen and never have any problem like this (though I use Xming on Windows instead of WinAxe).
Adam D. Ruppe
Image Oh my hero, so far away now.....
Kreshna Aryaguna Nurzaman
Sick, Twisted Fuck
Posts: 1949
Joined: Thu Jun 09, 2005 2:37 pm
19
Location: MENTAL HOSPITAL
Contact:

#5

Post by Kreshna Aryaguna Nurzaman »

Destructionator XV wrote:What happens when you start up the X server, then start up putty and try to use the ssh X11 forwarding only?
Well, sometimes it fixes the problem, but sometimes I get this error message:

Code: Select all

[root@linux ~]# xclock & 
[1] 3029 
[root@linux ~]# X connection to localhost:10.0 broken (explicit kill or server shutdown). 

[1]+  Exit 1                  xclock 
[root@linux ~]#
See, the problem is intermittent; sometimes it happens, sometimes it doesn't, and in neither cases you know what the cause is. :sad:


Destructionator XV wrote:I always have X running before even opening putty with my boxen and never have any problem like this (though I use Xming on Windows instead of WinAxe).
Xming? Is that a better PC X Server product? Is it less resource-intensive than WinAxe? Where to get it?

Alternatively, how to install/configure a VNC Server on Linux? I'm thinking of using NX Client anyway.
The Sick, Twisted Fuck | Sap #2 of the Bitter Trio | Knight of the e-mail | Evil Liberal Conspirator | Esoteric Order of Dagon | Weird TGODer

Share your free D&D character here.

:welcome :arrow: :sheepfucker: :thumbsup

So be it. If saying "NO" means being alone, then to hell with love, with romance, with marriage, and all the shit life keeps pumping at me. I'll walk alone, but with freedom and a healed pride.

NEVER buy a LiteOn CD/DVD Writer. Ever.
User avatar
Destructionator XV
Lead Programmer
Posts: 2352
Joined: Sun Jun 12, 2005 10:12 am
19
Location: Watertown, New York
Contact:

#6

Post by Destructionator XV »

Kreshna Aryaguna Nurzaman wrote:See, the problem is intermittent; sometimes it happens, sometimes it doesn't, and in neither cases you know what the cause is.
That is weird. It must be caused by a race condition or something. Will be a bitch to fix, even if you can figure out what is going on.


Xming? Is that a better PC X Server product? Is it less resource-intensive than WinAxe?
I don't really know. I was just googling for a Free Software X server for Windows and it is the one I found that actually installed and ran. I never had a chance to try any others.
Where to get it?
Direct download link to the setup program
Alternatively, how to install/configure a VNC Server on Linux?
Here is one I have installed:
http://www.tightvnc.com/download.html

And here is a direct link to one of the install help pages: http://www.tightvnc.com/doc/unix/README.txt

I have never actually used it except for testing though, so I can't say too much more about it.
Adam D. Ruppe
Image Oh my hero, so far away now.....
Kreshna Aryaguna Nurzaman
Sick, Twisted Fuck
Posts: 1949
Joined: Thu Jun 09, 2005 2:37 pm
19
Location: MENTAL HOSPITAL
Contact:

#7

Post by Kreshna Aryaguna Nurzaman »

Thanks! I'm gonna' trie both Xming and VNC. Heck, probably VNC is better anyway. The reason I'm using PC X Server is actually just in case where the Linux / UNIX I'm connecting to doesn't have VNC Server ready.
The Sick, Twisted Fuck | Sap #2 of the Bitter Trio | Knight of the e-mail | Evil Liberal Conspirator | Esoteric Order of Dagon | Weird TGODer

Share your free D&D character here.

:welcome :arrow: :sheepfucker: :thumbsup

So be it. If saying "NO" means being alone, then to hell with love, with romance, with marriage, and all the shit life keeps pumping at me. I'll walk alone, but with freedom and a healed pride.

NEVER buy a LiteOn CD/DVD Writer. Ever.
Post Reply