Customizing the XDM Login Screen
“What's an XDM screen? Is this more cryptic Linux geek speak?” Well, yes, but I'm going to make it easy to understand, so you too can speak more like a Linux geek. If you are running the X Window System and have your system set up to boot straight into X and display the box asking for your login name and password, you are already running XDM. If you are running X using the startx command from a shell prompt, you aren't running XDM now—but you will soon be.
XDM has features other than the ones relating to the xlogin box. These other features are useful only if you are running X on multiple screens or machines. If you are interested, read the xdm man page. In this article, I will focus on basic cosmetic changes like the background image, programs to be displayed while waiting for a login, colors and fonts used in the login box and the size and position of the login box.
I will assume you have X set up and running correctly. If you don't have X working, please consult the documentation that came with your Linux distribution.
If you already have XDM up and running, you can skip ahead to the section on customizing XDM.
Setting up XDM requires you to change the run level of your system. The run level controls which mode the system is running in when it is rebooted. It can run in single user mode, multiuser mode without networking, multiuser mode with networking and multiuser mode with XDM running. My system is Red Hat 5.1 and it uses run level 3 for normal multiuser operation and run level 5 for XDM operation (multiuser, plus starting X at boot time). Edit your /etc/inittab file as the root user to change the run level of the system. First, make sure the XDM run level exists in /etc/inittab. It should look something like this and is usually located near the end of the file:
# Run XDM in run level 5 x:5:respawn:/usr/bin/X11/xdm -nodaemon
This is the entry from Red Hat 5.1. Slackware, Debian, SuSE and other Linux distributions with X should be similar. The run level number is 5 in this case, but may be different in your distribution.
You can test the XDM run level by typing init 5. If the login box appears and everything looks okay, you can change the default initlevel for bootup or experiment with the XDM changes without rebooting your system. If you don't want XDM to start at boot time, skip ahead to the next section.
Make a backup copy of the /etc/inittab file before you change anything. Rename it to something like inittab.bak.1, then look for the initdefault line, which is usually near the start of the /etc/inittab file. Since you are not yet running XDM, yours probably looks something like this:
To make your system start XDM at boot time, you change the 3 in this line to equal the number in the XDM run level line. In my case, I changed the 3 to a 5. Reboot your system, and a gray screen with a box in the middle asking for a user name and password will appear. You can log in and make sure everything is running okay, but that isn't necessary to complete this tutorial.
Now that XDM is up and running, we can start making changes. We will be switching between a text-mode login and the XDM screen. To get to the text mode console, press <H>ctrl<H>-<H>alt<H>-F1; to get back to the XDM screen, press <H>ctrl<H>-<H>alt<H>-F7. With some distributions, you may have to use <H>ctrl<H>-<H>alt<H>-F6 for the XDM screen.
Change to text mode and log in as root. Change directories to /usr/lib/X11/xdm and look at the files present in this directory. These files control the behavior of your system when XDM is started and a user logs in using XDM. The files we are concerned with are:
Xsetup (or Xsetup_0), which sets up the XDM screen
Xresources, which controls the behavior of the xlogin widget
Let's start by changing the background color to something other than gray. You can use any program which can display an image or color on the background, which is sometimes called the root window. One program included with the X distribution is xsetroot. Edit the Xsetup file and comment out any programs that may already be setting the background image, like xbanner, xv or xsetroot. Add the following line:
/usr/X11R6/bin/xsetroot -solid steelblue
Color names like steelblue are defined in the /usr/lib/X11/rgb.txt file. This maps color names to the actual Red/Green/Blue color settings, making things more readable. If you use a color name that has spaces in it, you need to enclose them in quotes, e.g., "navy blue".
Save the Xsetup file and switch back to the XDM display by using <H>ctrl<H>-<H>alt<H>-F7 (or F6, depending on which virtual console the X server is using for its display). Then restart XDM by pressing <H>ctrl<H>-<H>alt<H>-<H>backspace<H>. Note: do not use the <H>del<H> key. It will reboot the whole system instead of just restarting XDM.
You should now have a nice, solid steel-blue background. You can experiment with different colors until you find one that you like.
|Designing Electronics with Linux||May 22, 2013|
|Dynamic DNS—an Object Lesson in Problem Solving||May 21, 2013|
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
- Dynamic DNS—an Object Lesson in Problem Solving
- Designing Electronics with Linux
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- Senior Perl Developer
- Technical Support Rep
- Symbolic Math with Python
- UX Designer
- Network Monitoring with Ethereal
- Not only you I too assumed
6 min 58 sec ago
- another very interesting
2 hours ago
- Reply to comment | Linux Journal
3 hours 53 min ago
- Reply to comment | Linux Journal
10 hours 47 min ago
- Reply to comment | Linux Journal
11 hours 3 min ago
- Favorite (and easily brute-forced) pw's
12 hours 54 min ago
- Have you tried Boxen? It's a
18 hours 46 min ago
- seo services in india
23 hours 18 min ago
- For KDE install kio-mtp
23 hours 19 min ago
- Evernote is much more...
1 day 1 hour ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi
It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?