Customizing the XDM Login Screen
A bitmap can be used to tile (copied over and over to cover the whole display) a simple two-color image onto the background instead of a solid color. There should be a collection of bitmaps in /usr/include/X11/bitmaps. You can also create your own using the bitmap program included with X windows. Try changing the xsetroot line to this:
/usr/X11R6/bin/xsetroot -bitmap\ /usr/include/X11/bitmaps/xsnow
Restart XDM as before, and you should now have a nice winter scene. You can change the foreground and background color with the bitmap by adding the -fg and -bg options and specifying a color. Try changing it to this:
/usr/X11R6/bin/xsetroot -bitmap\ /usr/include/X11/bitmaps/xsnow -fg blue -bg yellowNot the most wonderful colors for snow, but you get the idea. The colors recognized by the -fg and -bg options are the same as the ones in the rgb.txt file discussed above.
You can also tile color bitmaps stored in the xpm format. The xpmroot program is used for this. Change the xsetroot line to something like this:
Now that we can display colors and tiled bitmaps on the background, it is time to display a picture on the background. To do this, I use a shareware graphics program called xv. You can get it from the xv home page at http://www.trilon.com/xv/, or it may be included with your Linux distribution. Remember, this is shareware, and you should support the author by sending him $25 if you find his program useful.
I have chosen to use xv, but any program capable of displaying an image on the background can be used. For xv, you tell it to display the image centered on the background. You also want it to exit immediately after displaying the image; otherwise, XDM will hang until the xv program is exited manually.
/usr/X11R6/bin/xv -root -rmode 5 -quit\ /root/.gromit01.jpg
I use this to put a picture in the center of the display. To view your changes, save the Xsetup file and press <H>ctrl<H>_<H>alt<H>-F7 to switch back to the XDM screen. Press <H>ctrl<H>-<H>alt<H>-<H>backspace<H> to restart the X server. You should now see your image in the center of the screen, covered by the login box. xv supports several other placement options using the -rmode command. You can see a list of these options by typing xv -rmode -1.
With the help of a simple Perl script, you can display a random image on the background each time XDM is run. Listing 1 is a simplified version of a script written by Scott Scriven, firstname.lastname@example.org.
Type in this program or download it from ftp.linuxjournal.com/pub/lj/listings/issue68/3325.tgz. and save it as /usr/local/bin/bkgd. Make sure execute permissions are set by typing:
chmod ugo+x /usr/local/bin/bkgd
You may also have to change the path to xv and find to match your local setup. Including the absolute paths in the script ensures it will work correctly, even when the $PATH environment variable isn't set.
To load a random background, change the xv line in Xsetup to usr/local/bin/bkgd instead. Create a /usr/lib/X11/backgrounds directory and fill it with your favorite images. A couple of good places to look for background images are http://www.digitalblasphemy.com/ and http://ipix.yahoo.com/.
Listing 2 is a working Xsetup file with the intermediate steps commented out with “#” characters.
Now we want to customize the xlogin box using the /usr/lib/X11/xdm/Xresources file. This file is also used for configuring other XDM widgets like the chooser, but we aren't going to deal with these other options here—see the XDM man page to learn about them.
We can move the xlogin box, resize it, change its color, its fonts and what it says. I have moved mine into the lower-right corner and made it as small as I can, so that it doesn't cover up the background image.
The XDM xlogin widget uses X resources to specify these settings. They are all stored in the Xresources file and are read by XDM each time it restarts. A list of the available options, taken from the XDM man page, is shown in “Xresources Options”. I will go through each option and explain its use.
I have ignored several more advanced xlogin resources, some of which may appear in the Xresources file. It is safe to leave them alone—the defaults set when you installed X should work fine. The XDM man page contains full descriptions of each option, if you want to experiment with them.
|Happy Birthday Linux||Aug 25, 2016|
|ContainerCon Vendors Offer Flexible Solutions for Managing All Your New Micro-VMs||Aug 24, 2016|
|Updates from LinuxCon and ContainerCon, Toronto, August 2016||Aug 23, 2016|
|NVMe over Fabrics Support Coming to the Linux 4.8 Kernel||Aug 22, 2016|
|What I Wish I’d Known When I Was an Embedded Linux Newbie||Aug 18, 2016|
|Pandas||Aug 17, 2016|
- Happy Birthday Linux
- ContainerCon Vendors Offer Flexible Solutions for Managing All Your New Micro-VMs
- Updates from LinuxCon and ContainerCon, Toronto, August 2016
- What I Wish I’d Known When I Was an Embedded Linux Newbie
- New Version of GParted
- NVMe over Fabrics Support Coming to the Linux 4.8 Kernel
- Tor 0.2.8.6 Is Released
- All about printf
- Blender for Visual Effects
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide