This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Odd XDMCP problems (resolved)


Well I figured out what the problem was with my XDMCP connection.

I had edited the /etc/profile file to set the DISPLAY environment variable dynamically using the host I was connecting from. The entry in the /etc/profile was this:

export DISPLAY="${REMOTEHOST}:0.0"

It seems that when an XDMCP is made the REMOTEHOST environment variable is not set and therefore the DISPLAY environment variable ends up getting set to ":0.0" which points to the linux console instead of the remote Cygwin machine.

The fix was to edit the .bash_profile in the user's home directory and manually set the DISPLAY environment variable to point back to the remote machine running the Cygwin xserver. Now everything works perfectly.



Mike,

Mike Campbell wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Here is an odd one for you to try to help me figure out.


I have configured my RedHat Linux 9.0 system to allow XDCMP connections.
When I reboot the server the console comes up with the default kdm login
box.


~From my win2k machine I have installed all of the cygwin Xfree tools. I used the startxdmcp.bat file (after editing it for the remote_address parameter) and it successfully connects to the linux box and I see the login dialog box. So far so good.


Initally when I would log in the cygwin screen would turn light blue and then after 5 seconds or so the login box would reappear and a message about my session lasting less than 10 seconds. I found on the linux machine where I was logging in the following in the .xsession-errors file:


set: unable to open display ":0.0" xsetroot: unable to open display ':0.0' xrdb: Connection refused xrdb: Can't open display ':0.0' startkde: Starting up... ksplash: cannot connect to X server :0.0 _KDE_IceTransmkdir: Owner of /tmp/.ICE-unix should be set to root kded: cannot connect to X server :0.0 kdeinit: Can't connect to the X Server. kdeinit: Might not terminate at end of session. kcminit: cannot connect to X server :0.0 knotify: cannot connect to X server :0.0 ksmserver: cannot connect to X server :0.0 startkde: Shutting down... startkde: Running shutdown scripts... KLauncher: Exiting on signal 1 startkde: Done.



Looks like you might need the -from MY_IP_ADDRESS command-line parameter in startxdmcp.bat for XWin.exe. Although, this doesn't make a lot of sense because you probably wouldn't even get the login screen if the from address wasn't being set correctly.

I then edited the /etc/kde/kdm/Xstartup file on the linux machine and
added a line that said 'xhost +' and restart the X server on the linux
machine.



The xhost + is not the answer. Please remove that line or accept the security risks that it has, even though it is providing you with no benefit.

I think the real problem here is that XDM on your linux machine is not setting the DISPLAY variable correctly. The output from the log file shows this:

> xsetroot: unable to open display ':0.0'

:0.0 means to connect to the local machine on display 0, screen 0. That is typically the console. This is obviously incorrect, since you need all X Clients to connect to the X Server running on your Windows machine.

For some odd reason my DISPLAY from the xdmcp session seems incorrect.
It should set DISPLAY to point back to the cygwin xfree server instead
of the linux console. How do I fix this???



I have never, ever, heard of anyone reporting this problem before where the DISPLAY is not getting set correctly by the XDM server (again, unless you just need the -from parameter as mentioned above). Can we assume that this RedHat 9.0 installation is 100% non-modified or have people had their hands on it, "customizing" it? If the installation has been heavily customized, then I think that someone made a mistake in one of those customizations. If the installation has not been heavily customized, then perhaps you could do some searching to find out if this a generic problem for RedHat 9.0.


Hey, I have an idea... why don't you try opening an XDMCP session to your RedHat 9.0 machine from another *nix machine. That would help determine if Cygwin/XFree86 or the RedHat machine configuration is at fault.

Harold


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]