Re: [gdm-list] Chroot X Server




Dean:

I suspect that the problem may be that GDM depends on the Xserver
sending signals back to the calling program to know when the Xserver has
started, when it dies, etc.  It might be a bit tricky to interpose your
nvidiaX script and ensure that it follows these standard signal
protocols that GDM (and most display managers for that matter) requires.
In other words, your script may need to handle signals coming from the
Xserver and pass them along to GDM to work.

You might want to turn on debug in your GDM configuration and try to
determine exactly why GDM is failing.  It would be easier to debug the
problem if we knew exactly why GDM is not working with your script.
Note you might need to add gdm_debug calls to the code to print out
additional information if the default debug output doesn't really
show anything useful.  The code for starting up the Xserver is in
daemon/server.c and it is the code in daemon/slave.c that manages
starting up the display, running the PreSession/PostSession scripts
and starting the Xserver.  So this is probably where you should be
looking to understand what is going on.

Note GDM has Init, PreSession, PostSession, and PostLogin scripts.
These are intended for doing special configuration (e.g. like building
the users $HOME directory on the fly in the PreSession script).  You
might try doing the setup in the PreSession script, though looking at
the code I don't think this will work since the PreSession script seems
to be called after starting X.  Perhaps a similar script is needed to
add an entry point before starting the Xserver for such configuration?
But you might look into these scripts to see if they can be used for
your needs.

You might also want to make sure AlwaysRestartServer in the GDM configuration is set to false. When set to true, GDM tries to re-use
the same Xserver for the login and user session, which I don't think is
what you want.  This might be causing some of the problems you notice.

Brian

Background: running diskless clients in schools with various video chipsets connected to a centralized Debian Etch diskless server. Having some problems getting 3d acceleration working for all chipsets.

Problem1: debian etch does not support parallel installs of nvidia, ati, via via chipsets on one system. If I install nvidia drivers it overwrites some of the xorg binaries thus breaking 3d drivers for other chipsets.

Solution1: create a chroot for the Xorg server, and install xorg + closed source drivers in the chroot. From the command line I can run the xserver in the chroot.

Problem2: How do get GDM to use the chroot Xserver?

So far I've tried the following:
* bind mount /tmp and /var/lib/gdm to the chroot.
* ensure /proc and /dev is also setup in the chroot.
* create a wrapper script called nvidiaX that is used in the server "command" string in gdm.conf. This script does the chroot and runs X.


The nvidiaX script works great from the command line but when run from gdm it starts X then gdm complains:
"There already appears to be an X server running on display :0..."
... and the gdm login does not appear.

Gdm also seems a bit detached from the X server in that when i stop gdm the X server continues to run.

How does gdm communicate with the X server?  How can I make this work?

Does anyone have any ideas how to use a single software repository, (gdm login + userland apps) but have multiple 3d accelerated chipset drivers? Terminal server is not an option, the solution has to work for fat diskless clients. I would prefer to use a debian chroot to keep things up to date instead of compiling xorg from source.

===============================
Here is the latter part of my gdm.conf
===
[servers]
0=nvidia

[server-nvidia]
name=Nvidia server
command=/usr/local/bin/nvidiaX -br -audit 0
fexible=true
===

Here is nvidiaX - this works great from command line and gdm does start the chroot X:
===
#!/bin/sh
echo "$*" > /tmp/xopt
/usr/bin/schroot -c nvidia /usr/local/bin/nvidiaX2
===

Here is nvidiaX2:
===
#!/bin/sh
XOPT=`cat /tmp/xopt`
/usr/bin/X $XOPT
===

`ps auxwww | grep X` shows:
/usr/bin/X :0 -br -audit 0 -auth /var/lib/gdm/:0.Xauth vt7

`cat /tmp/xopt` after X has started and :
:0 -br -audit 0 -auth /var/lib/gdm:/:0.Xauth vt8


Thanks.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]