Re: Strange Xsession behavior with XDMCP server (A bug?)
- From: Brian Cameron <Brian Cameron Sun COM>
- To: Val <vblant shaw ca>
- Cc: gdm sunsite dk
- Subject: Re: Strange Xsession behavior with XDMCP server (A bug?)
- Date: Fri, 29 Apr 2005 13:42:16 -0500
Val:
I don't think this is a bug. You'll notice that the lines that you modified
are lines that are sourcing files, which causes any environment variables set
in those scripts to be set for the user and for the rest of the login script
process.
Those scripts shouldn't be modifying your DISPLAY variable. You'll notice
that some of the scripts are system files in /etc. I doublt the DISPLAY
is getting reset there, but if it is then that probably should be fixed.
It's more likely the files in your $HOME ($HOME/.profile or $HOME/.xprofile)
directory that are being sourced that is resetting DISPLAY for some reason.
I'd fix whichever of those scripts is causing the problem.
I just noticed something strange with GDM's /etc/gdm/Xsession.
I am using GDM 2.6.0.5 and I tried to set it up to accept XDMCP
connections from other X Servers. When a connection from an X Terminal
comes in and GDM starts logging the user in, the $DISPLAY variable in
Xsession is not saved before sourcing /etc/profile, which changes the
$DISPLAY variable to :0, even though it was correctly set up before by
GDM to reflect the address of the remote X Terminal. As a result, the
following error can be seen in ~/.xsession-errors and the session
startup fails:
/etc/gdm/PreSession/Default: Registering your session with wtmp and utmp
/etc/gdm/PreSession/Default: running: /usr/bin/X11/sessreg -a -w /var/log/wtmp -u /var/run/utmp -x "/var/lib/gdm/vega:0.Xservers" -h
"vega" -l "vega:0" "val"
/etc/gdm/Xsession: Beginning session setup...
stderr is not a tty - where are you?
/etc/gdm/Xsession: Setup done, will execute: /usr/bin/ssh-agent -- gnome-session
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
(gnome-session:1162): Gtk-WARNING **: cannot open display:
The code responsible for this in Xsession is:
# First read /etc/profile and .profile
test -f /etc/profile && . /etc/profile
test -f "$HOME/.profile" && . "$HOME/.profile"
# Second read /etc/xprofile and .xprofile for X specific setup
test -f /etc/xprofile && . /etc/xprofile
test -f "$HOME/.xprofile" && . "$HOME/.xprofile"
For now I corrected it as follows:
SAVED_DISPLAY=$DISPLAY
# First read /etc/profile and .profile
test -f /etc/profile && . /etc/profile
test -f "$HOME/.profile" && . "$HOME/.profile"
# Second read /etc/xprofile and .xprofile for X specific setup
test -f /etc/xprofile && . /etc/xprofile
test -f "$HOME/.xprofile" && . "$HOME/.xprofile"
DISPLAY=$SAVED_DISPLAY
After this change I can log in from my X Terminal successfully.
Is this a bug? Am I missing something?
Thanks.
[
Date Prev][Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]