"Linux Gazette...making Linux just a little more fun!"

Configuring GDM 2.2

By Mark Nielsen

  1. Introduction
  2. Configuring GDM naughtily
  3. Conclusion
  4. References


GDM, or GNOME Display Manager, is a graphical login service for your computer when it boots up. Basically, it makes a nice pretty screen to look at before you log in. With the standard installation of RedHat, and I assume other distributions, GDM is really cool. As a user, you can run the program "gdmphotosetup" to set the picture of you that will show up in GDM when your computer starts. As the "root" user, you can configure GDM with "gdmconfig" which lets you set a lot of cool options. So why am I writing this article when you can do all this yourself? I will show you some bad things you are not suppose to do.

Configuring GDM naughtily.

In the gdm.conf file, I changed these options (which you can also probably do in the gui setup program).


Here is my /etc/X11/gdm/Init/Default script.


/usr/X11R6/bin/xsetroot -solid "#363047"

    ### This next item is a huge security risk. 
    ### It basically sets up an xterm with the user "mark". 
xterm -r -fn 6x12 -geometry +0+25 -e '/etc/X11/gdm/' &
#xterm -r -fn 6x12 -geometry +0+25 -e '/etc/X11/gdm/' &
    ### This puts a picture on the background.
/usr/bin/xsri -geometry 500x500+600+300 /etc/X11/gdm/im000048.jpg
    ### This puts xeyes on the screen to watch your mouse pointer.
xeyes -geometry +800+650 -bg white -fg green -outline blue &
    ### Christmas all year round. 
xsnow -santaspeed 10 -santa 2 -snowflakes 1000 -whirl 4 -windtimer 30 &
    ### A clock down to the second. 
xclock -digital -geometry +600+650 -update 1 &

    ### The popular mine game. Sorry, doesn't seem like you can position it. 
    ### it just pops up in the middle of the screen.
gnomine &

  ### Maelstrom is pretty cool. 
Maelstrom &
   ## xboard pops up behind GDM, so we can't use it. 
#xboard &
  ### Chromium is a cool arcade-like old fashioned game. 
chromium-setup &
  ### Look at the light shining on the earth.
kworldclock -geometry +750+0 &
  ### A silly creature for your desktop. 
amor &

Now the contents of '/etc/X11/gdm/'.


trap "" HUP
trap "" INT 
trap "" QUIT
trap "" KILL
trap "" TSTP

su -l mark
Why is the above script dangerous? Well, people can do stuff without logging in. That is why I put a bunch of traps in the script and made it exit as soon as someone quits as the user 'mark'. I don't want anyone to execute root commands, so you have to make it so root exits as soon as the user 'mark' quits and you have to trap the script so that someone doesn't cancel the quit -- which would leave them logged in as root. Still, the whole thing is bad and you shouldn't do it, even though I do. As an alternative to my xterm session, you could use "chroot", which I did successfully. It can be a little tricky to setup a chroot environment, but you can do it. Here is a sample of an account I calld "dummy". Remember, the /chroot/named environment has to look like the root directory with a /bin, /sbin, /lib, and all the other directories if you want the user to be able to do anything at all, and of course /etc/passwd.

Now the contents of '/etc/X11/gdm/'.


trap "" HUP
trap "" INT
trap "" QUIT
trap "" KILL
trap "" TSTP

chroot /chroot/dummy su -l dummy


GDM is really cool, and I assume KDM is just a cool. I just like to configure GDM to be nice to look at when I or someone else sits down at them.

You might want to have other games playing in the background of your gdm session. I tested various games, some work and some don't. Remember, every program you run is a potential security hole if someone can somehow execute commands through the program or know how to screw it up causing your computer to get messed up. Obviously, doing something like this on a client computer should get you fired.


  1. Configuring GDM 2.2
  2. Gnome Display Manager
  3. 6-24-1999 Setting up xdm.
  4. If this article changes, it will be available

Mark Nielsen

Mark works at which creates, delivers, and tracks personalized multimedia email, web, and newsletter campaigns. He works as a consultant delivering end products to clients, such as advanced customized statistical reports used for demographic or pyschological profiles for future campaigns. In his spare time, he writes articles relating to Free Software (GPL) or Free Literature (FDL) and is involved with the non-profit learning center

Copyright © 2002, Mark Nielsen.
Copying license
Published in Issue 80 of Linux Gazette, July 2002