Much ado about scripting, Linux & Eclipse: card subject to change


xorg.conf: Fedora edition

After installing a Fedora 10 preview spin on my new Thinkpad X200 last week, I got to learn yet another way to generate and test an /etc/X11/xorg.conf file. Every time I upgrade my OS, my xorg.conf file gets simpler. I expect one day I won't need one at all!

Where in the past for *ubuntu I've used dpkg-reconfigure -phigh xserver-xorg, with Fedora I needed to discover a new way. Here's what I did.

  1. First, run man startx to see a sample /root/.xinitrc file
  2. Next, create a /root/.xinitrc file
     xrdb -load $HOME/.Xresources
     xsetroot -solid gray &
     xclock -g 50x50-0+0 -bw 0 &
     xload -g 50x50-50+0 -bw 0 &
     xterm -g 80x24+0-0 &
     screenruler &
  3. To generate a new config file, you can run:
     startx -- :2 -configure
  4. To test a given config file (other than the default, /etc/X11/xorg.conf):
     startx -- :2 -config /root/

The above steps let you be booted graphically @ default resolution, then switch to another vt (CTRL-ALT-F2, for example), log in, and try a new xorg.conf on a different video port without affecting your running instance. To kill a trial X, use CTRL-ALT-BkSp. To switch from vt2 to the existing graphical instance, use CTRL-ALT-F1 or CTRL-ALT-F7 (it should be on vt1 or vt7).

Once I was statisfied that the xorg.conf file worked, I rebooted. On restart, using xfce or gnome, I can now graphically switch from laptop @ 1280x800 to 24" external monitor @ 1600x1200, or run both screens at 1024x768, eg., for presentations.