222 lines
6.8 KiB
HTML
222 lines
6.8 KiB
HTML
<!--startcut ==============================================-->
|
|
<!-- *** BEGIN HTML header *** -->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML><HEAD>
|
|
<title>Configuring GDM 2.2 LG #80</title>
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
|
|
ALINK="#FF0000">
|
|
<!-- *** END HTML header *** -->
|
|
|
|
<CENTER>
|
|
<A HREF="http://www.linuxgazette.com/">
|
|
<IMG ALT="LINUX GAZETTE" SRC="../gx/lglogo.png"
|
|
WIDTH="600" HEIGHT="124" border="0"></A>
|
|
<BR>
|
|
|
|
<!-- *** BEGIN navbar *** -->
|
|
<!-- *** END navbar *** -->
|
|
<P>
|
|
</CENTER>
|
|
|
|
<!--endcut ============================================================-->
|
|
|
|
<H4 ALIGN="center">
|
|
"Linux Gazette...<I>making Linux just a little more fun!</I>"
|
|
</H4>
|
|
|
|
<P> <HR> <P>
|
|
<!--===================================================================-->
|
|
|
|
<center>
|
|
<H1><font color="maroon">Configuring GDM 2.2</font></H1>
|
|
<H4>By <a href="mailto:articles@gnujobs.com">Mark Nielsen</a></H4>
|
|
</center>
|
|
<P> <HR> <P>
|
|
|
|
<!-- END header -->
|
|
|
|
|
|
|
|
|
|
<ol>
|
|
<li>
|
|
<a href="#Introduction">Introduction</a></li>
|
|
<li><a href="#config">Configuring GDM naughtily</a></li>
|
|
<li><a href="#Conclusion">Conclusion</a></li>
|
|
<li><a href="#REF">References</a></li>
|
|
</ol>
|
|
|
|
<h3>
|
|
<a NAME="Introduction"></a>Introduction</h3>
|
|
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.
|
|
|
|
<h3>
|
|
<a NAME="config"></a>Configuring GDM naughtily.</h3>
|
|
In the gdm.conf file, I changed these options (which you can also
|
|
probably do in the gui setup program).
|
|
<pre>
|
|
TitleBar=true
|
|
Browser=true
|
|
|
|
LockPosition=false
|
|
SetPosition=true
|
|
PositionX=0
|
|
PositionY=700
|
|
</pre>
|
|
|
|
<p>
|
|
Here is my /etc/X11/gdm/Init/Default script.
|
|
<pre>
|
|
#!/bin/sh
|
|
|
|
/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/mark.sh' &
|
|
#xterm -r -fn 6x12 -geometry +0+25 -e '/etc/X11/gdm/dummy.sh' &
|
|
### 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 &
|
|
|
|
</pre>
|
|
|
|
<p>Now the contents of '/etc/X11/gdm/mark.sh'.
|
|
<pre>
|
|
#!/bin/bash
|
|
|
|
trap "" HUP
|
|
trap "" INT
|
|
trap "" QUIT
|
|
trap "" KILL
|
|
trap "" TSTP
|
|
|
|
su -l mark
|
|
exit
|
|
exit
|
|
</pre>
|
|
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.
|
|
<p>Now the contents of '/etc/X11/gdm/dummy.sh'.
|
|
<pre>
|
|
#!/bin/bash
|
|
|
|
trap "" HUP
|
|
trap "" INT
|
|
trap "" QUIT
|
|
trap "" KILL
|
|
trap "" TSTP
|
|
|
|
chroot /chroot/dummy su -l dummy
|
|
exit
|
|
exit
|
|
</pre>
|
|
|
|
<h3>
|
|
<a NAME="Conclusion"></a>Conclusion</h3>
|
|
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.
|
|
<p>
|
|
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.
|
|
|
|
<h3>
|
|
<a NAME="REF"></a>References</h3>
|
|
|
|
<ol>
|
|
<li><a href="http://www.tcu-inc.com/Articles/19/GDM.html">
|
|
Configuring GDM 2.2</a>
|
|
<li><a href="http://www.socsci.auc.dk/~mkp/gdm/">Gnome Display Manager</a>
|
|
<li> 6-24-1999 <a href="http://www.tcu-inc.com/mark/articles/Xdm.html">Setting up xdm.</a>
|
|
<li>
|
|
If this article
|
|
changes, it will be available
|
|
<a href="http://www.gnujobs.com/Articles/19/GDM.html">
|
|
http://www.gnujobs.com/Articles/19/GDM.html</a></li>
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- *** BEGIN bio *** -->
|
|
<SPACER TYPE="vertical" SIZE="30">
|
|
<p>
|
|
<h4><img align=bottom alt="" src="../gx/note.gif">Mark Nielsen</h4>
|
|
<EM>Mark works at
|
|
<a href="http://www.audioboomerang.com/">AudioBoomerang.com</a>
|
|
which creates, delivers, and tracks personalized multimedia email, web,
|
|
and newsletter campaigns. He works as a consultant delivering end products
|
|
to AudioBoomerang.com 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
|
|
<a href="http://www.eastmont.net">eastmont.net</a>.</EM>
|
|
|
|
<!-- *** END bio *** -->
|
|
|
|
<!-- *** BEGIN copyright *** -->
|
|
<P> <hr> <!-- P -->
|
|
<H5 ALIGN=center>
|
|
|
|
Copyright © 2002, Mark Nielsen.<BR>
|
|
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR>
|
|
Published in Issue 80 of <i>Linux Gazette</i>, July 2002</H5>
|
|
<!-- *** END copyright *** -->
|
|
|
|
<!--startcut ==========================================================-->
|
|
<HR><P>
|
|
<CENTER>
|
|
<!-- *** BEGIN navbar *** -->
|
|
<!-- *** END navbar *** -->
|
|
</CENTER>
|
|
</BODY></HTML>
|
|
<!--endcut ============================================================-->
|