X Window System Administration
After you have used xdm from root's command line to successfully start an X session, the next step is to run xdm automatically during system initialization. This can be done in several different ways. I will describe three—the normal way, an odd way and a weird way. Take a look at your /etc/inittab file. You should find these two lines:
id:3:initdefault: x:5:respawn:/usr/bin/X11/xdm -nodaemon
The first line sets the default runlevel to 3 (full multi-user mode, with networking) when the system is booted, and the second tells the init process to run xdm when the system's runlevel is 5. On some Linux systems, such as Slackware, this may be 4.
The normal way to have the system run xdm automatically is by changing the first line to:
This will cause the system to boot to runlevel 5 instead of runlevel 3. In the second line, “respawn” tells init that if xdm exits, to immediately restart it. Startup scripts will be run from /etc/rc.d/rc5.d rather than /etc/rc.d/rc3.d. This means if you have configured your runlevel 3 daemons just the way you want them, you will have to do it again for runlevel 5.
If that seems like too much bother, use the odd method and change the second line instead of the first one, like this:
This will start up the xdm process in runlevel 3 instead of runlevel 5, preserving your runlevel setup.
Finally, the weird way is to start xdm like any other daemon process and ignore the /etc/inittab file entirely. Add a script to the directory /etc/rc.d/init.d that looks like this:
#!/bin/sh # /etc/rc.d/init.d/X.init - Start X Window System echo "Starting X Window Services: xdm" /usr/X11/bin/xdm
Then, put a symbolic link to the script in the directory /etc/rc.d/rc3.d. When the system is booted, init runs these scripts in the same alphanumerically sorted order that the ls command would display them. On my system, I put in a link called S97X that causes X to be started after almost everything else. Take a look at the other files in the rc3.d directory (using ls -l) and follow their examples. This method can be handy, because it doesn't restart xdm each time xdm exits, and sometimes that might be desired. A simpler way to do the same thing using inittab is by typing the line:
x:3:once:/usr/bin/X11/xdm -nodaemonOne note of caution is needed here. The /etc/inittab file is one of the most critical files on your system. If you mess up your inittab file, your system may not be able to boot, so maybe that weird method isn't so bad after all.
Well, there you have it. I did my best to crunch a book on X Window System administration into one magazine article. I've covered most of the basics of managing X, but also left out quite a bit. If you want more information, check out the sources of definitive documentation listed in the “Resources” sidebar.
Jay Ts has been using UNIX since the year 6 B.X. (before X), and now provides consulting services for Linux. He can be reached at email@example.com; his web page is at http://www.kachina.net/~jay/.
|Alice, the Turtle of the Modern Age||Mar 07, 2014|
|Using Django and MongoDB to Build a Blog||Mar 05, 2014|
|What virtualization solution do you use/manage at work?||Mar 04, 2014|
|Our Assignment||Mar 04, 2014|
|March 2014 Issue of Linux Journal: 20 Years of Linux Journal||Mar 03, 2014|
|Have Resume - Will Travel||Feb 28, 2014|
- Alice, the Turtle of the Modern Age
- Using Django and MongoDB to Build a Blog
- Sign Up to Win a Silicon Mechanics Swag Pack!
- Linux Systems Administrator
- Senior Perl Developer
- Technical Support Rep
- Our Assignment
- UX Designer
- Zato—Agile ESB, SOA, REST and Cloud Integrations in Python
- March 2014 Issue of Linux Journal: 20 Years of Linux Journal
- You have to be careful there
1 week 4 days ago
- Wonder when LJ is going to
1 week 4 days ago
- Puerto Rico Free Software
1 week 5 days ago
1 week 6 days ago
- I hate voice commands
2 weeks 13 hours ago
- usabilty --- AGAIN with this nonsense
2 weeks 15 hours ago
- Don't make excuses
2 weeks 18 hours ago
- Sorry to let you know, but
2 weeks 19 hours ago
- Ridiculous statement. Not a
2 weeks 1 day ago
2 weeks 1 day ago