How I Created Multiple GDM Logins on a Single Workstation:
written by: rpmilius
I wanted to be able to have two different X servers with XDM like
logins running on two differnt virtual consoles. This is how I did this using GDM, the Gnome
compliant xdm replacement. A similar setup could have been done with xdm, but I like the gdm
features.
My current system:
RedHat 6.1
XFree86 3.3.5-3
gdm 2.0beta2-13
I edited /etc/X11/gdm/gdm.conf by changing the very last line from
0=/usr/bin/X11/X
to
1=/usr/bin/X11/X -bpp 8 vt9
0=/usr/bin/X11/X -bpp 16 vt7
When gdm is run, the servers are started one right after
another, so
the last one listed will be the one that I will default to.
To switch between sessions
ctrl-alt-f7 --> vt7
ctrl-alt-f9 --> vt9
In this particular case, a 8 bit server will run on vt9 and a 16 bit
server will run on vt7. Of course, your XF86Config needs to be
configured to support both depth levels if you want to do this.
Now when I login to my system after it boots and try out
/usr/bin/gdm -nodaemon
I get thrown into vt7 with a 16 bit login screen. If I hit ctrl-alt-f9, I'll jump to the 8
bit login. I can login as one user on one, and a different user on the other. If I hit
ctrl-alt-f1, I get back to my initial root session.
The different logins don't have to be different color depths. If they are the same color depths
and same resolution, then it may get confusing which vt you are on. One way of differentiating the
login screens is to put different backgrounds images on each.
Here's how to do that.
cp /etc/X11/gdm/Init/Default /etc/X11/gdm/Init/:0
cp /etc/X11/gdm/Init/Default /etc/X11/gdm/Init/:1
with a text editor, modify /etc/X11/gdm/Init/:0 and
/etc/X11/gdm/Init/:1 by replacing
/usr/share/pixmaps/redhat/redhat-transparent.png
to
d0.png
or
d1.png
respectively.
If you are using a different distribution, you will probably have a different default
background
d0.png and d1.png will be the new background images and should be
placed in /etc/X11/gdm/Init/
They can be created completely anew or you can make copies of
the original background (eg /usr/share/pixmaps/redhat/redhat-transparent.png)
and modify them with a program like gimp.
In the end, my /etc/X11/gdm/Init directory looks like this:
[root@pc1 Init]# ls
:0 :1 Default d0.png d1.png
Running multiple X servers can use up a lot of resource. Play with it a
bit and see how well your system performs and see if you really need the
extra login screen. I like it when I test out new configurations for a
test user or need to run a program at a different color depth.
After you get it worked out to where you like it, you can
then modify your /etc/inittab so that the default runlevel is 5 (X11)
instead of 3 (Full multiuser mode). If you're running RedHat, then all you need to do is
cat GNOME > /etc/sysconfig/desktop and you're set. RedHat uses /etc/X11/prefdm in
the inittab.
prefdm is a script that looks at /etc/sysconfig/desktop to determine which login program
(gdm, kdm or xdm) to use.
Hope this makes sense...
|