Re: [SLE] X gurus: Xlib:connection refused, invalid magic cookie
Hi Örn, Thanks for replying. See my comments below: Örn Hansen skrev:
onsdag 18 februari 2004 02:23 skrev Terje J. Hanssen:
Command dialog: --------------- On hostA I log in to remote hostB and enter the following commands:
hostB-> xhost hostC hostB-> rlogin hostC
Now you are telling hostB, that it should allow connections FROM hostC.
Yes, but maybe it isn't neccesary or right to tell the remote session hostB to allow connection from the next remote hostC, when the GDM login & session (Window manager and terminal) running on hostB, physically is displayed on my local X display on hostA?
hostC % setenv DISPLAY hostA:0 hostC % XclientApp
Have you done:
hostA-> xhost hostC which is needed for the above.
No. As mentioned in my first mail, hostA is set up like a X terminal to start the X server and query for a remote login screen from hostB directly, without local user login to hostA first. This is achieved by adding the following entry in hostA's /etc/inittab: X :0 -nobanner -query hostB
hostB-> rlogin hostA hostA% xhost hostC which only resulted in the following error message: unable to open display ""
rlogin to another machine, does not give you control over that machines X server. Which is what you are attempting to do. To be able to do the above, you must be the owner, or user of that hosts X server. That is, the one logged in to that machine, otherwise you cannot tell that X, to accept connections from anywhere. Only the user of that session, has that right.
I also have also tried hostB-> rlogin hostA hostA% xhost to see which x-hosts are allowed to connect to hostA, but got still the same error message: unable to open display "" What does "" mean?
Given, that you are logged in on the workstation hostA, directly:
hostA-> xhost hostB hostA-> rlogin hostB hostB-> export DISPLAY=hostA:0 hostB-> xterm
Will run an xterm on hostB, and show the window up on hostA.
As mentioned above, I have no local login to hostA, only directly login to remote hostB. Therefore I created a minimal xhost access file on hostA instead containing hostB and hostC: /etc/X0.hosts Now I was able to get dtterm running on remote application hostC to be displayed on my local X display hostA. But still I get the same error when trying to start my CAD application on remote hostC: Xlib: connection to hostA:0 refused by the server Xlib: Invalid MIT-MAGIC-COOKIE-1 key What is special is that the Cad application use its own software defined workstations, where wsA is set up with a graphical remote X display on hostA and take input from its remote tablet. Maybe this can come into some conflict with be or be dual (over)defined through the user command: hostC % setenv DISPLAY hostA:0 This command was mostly thougt to get displayed the text menue for starting the Cad system and more in a terminal window. I have to look some nearer at this.
--- And now, for simplifications. Abandon the r-commands, they are insecure and not used anymore. hostA-> ssh -X hostB hostB-> xterm Will do the same thing, as earlier ... of course, in this situation you will have to type a password, assuming you have a distributed /home directories accross your network, where all workstation will have the same /home for each user, wherever they are logged in: hostA-> ssh-keygen -t rsa ; no passphrase hostA-> cat .ssh/id_rsa.pub >>.ssh/authorized_keys2 hostA-> ssh -X hostB ; just as if rlogin hostB-> xterm And remove all references to ssh v1 in the sshd.conf file, as well as allowing passwords to be sent. Use keys only, with or without a passphrase.
I have also thought to set up more security later using ssh. But for testing purposes, especially on a controlled, trusted LAN, I think it is always easier to get things to work first without extra complexity envolved :-) Terje
torsdag 19 februari 2004 17:36 skrev Terje J. Hanssen:
No. As mentioned in my first mail, hostA is set up like a X terminal to start the X server and query for a remote login screen from hostB directly, without local user login to hostA first. This is achieved by adding the following entry in hostA's /etc/inittab:
ok, hostA is an X terminal ... means it's X server is running on hostA, not hostB.
I also have also tried
hostB-> rlogin hostA hostA% xhost
to see which x-hosts are allowed to connect to hostA, but got still the same error message:
unable to open display ""
What does "" mean?
It means, the DISPLAY variable is empty.
I have also thought to set up more security later using ssh. But for testing purposes, especially on a controlled, trusted LAN, I think it is always easier to get things to work first without extra complexity envolved :-)
Actually, ssh means less complexity ... especially since you are using the XDM session control, which makes things a bit more obscure.
participants (2)
-
Terje J. Hanssen
-
Örn Hansen