Friday, October 10, 2008

How To Set Up A Headless X Server On Redhat Linux

Hey there,

Today we're going to throw out another Linux tip somewhat related to networking. Or, more correctly, we're going to throw another quick tip out there ;) Today we're going to look at setting up a headless X Server. It's not quite as difficult, or as scary, as it sounds. Running a headless X Server is kind of like Night Of The Living Dead (the original; although the remake was kind of fun) except without all the zombies and with exported displays instead of excoriated remains (best I could do in the almost-rhyming department on that one ;)

If you stick to the following steps (Tested on RedHat Enterprise Linux Update 4) and adjust slightly if your distro is either completely different, your system architecture varies or your RedHat release is just a version or so off, you should be up and running in no time.

1. Make sure that you install all of the following rpm's on the machine on which you want to run the headless X Server (ignore errors that state you already have any of the packages installed. If you run into dependency conflicts, run rpm with the --nodeps option. If you need to update any of the files, run rpm with the --update option. You may need to install these one by one, but you might get lucky and just be able to run rpm -ivh in a loop and have them all install the first time. You can also get around dependency issues by installing all of the rpm's on one line - i.e. rpm -ivh rpm1.rpm rpm2.rpm ... rpmN.rpm):

XFree-libs-data-4.3.0-78.EL.i386.rpm
XFree-xfs-4.3.0-78.EL.i386.rpm
XFree-libs-4.3.0-78.EL.i386.rpm
XFree86-xauth-4.3.0-35.EL.i386.rpm
XFree86-base-fonts-4.3.0-35.EL.i386.rpm
XFree86-4.3.0-78.EL.i386.rpm
cpp-3.2.3-47.i386.rpm
xinitrc-3.32-1.noarch.rpm
switchdesk-3.98.17.i386.rpm
desktop-file-utils-0.3-10.i386.rpm
XFree86-Xvfb-4.3.0-78.EL.i386.rpm
XFree86-ISO8859-14-100dpi-fonts-4.3.0-97.i386.rpm


2. Start up X's virtual frame buffer server like so:

Xvfb :0 –pn –nolisten tcp –audit 4 –screen 0 800x600x16 & <-- The 800x600 is the screen resolution and the x16 (16 bit)is the color depth. You can change these settings to suit your taste or satisfy any limitations your graphics driver might impose).

NOTE: If you have problems with the X Server going offline when you logoff, try running it with nohup and/or check out our previous post on what to do when nohup hangs up anyway!

And, how about that? I think this is, blessedly, the shortest post I've ever written :) Just pretend there are a couple more paragraphs of "ipsum lorem dolor sit amet" if you find yourself suffering from information underload ;)

Cheers,

, Mike




Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.