[TriLUG] x configurations
Jos Purvis
purvis at melete.org
Wed Oct 31 02:16:31 EST 2001
On Die, 30 Okt 2001, elliot wrote:
> is there any way to configure x so that it can use two different displays.
> what i have is a dell latitude 810c with a docking station and i would
> like to congigure x so that i don't have to change configurations when i
> change displays between my lcd and my monitor. can x somehow figure out
> which display to use and then load the configureation for that display.
For a while there, I had a similar configuration, before obtaining my
current laptop (Latitude C800), which has a nice razor-sharp display. :)
Back when I was bouncing between monitor and laptop display, though, I
cheated, using the following method:
1) With the laptop undocked, set up X. Save /etc/X11/XF86Config as
/etc/X11/XF86Config.undock or some such.
2) With the laptop docked and displayed through the monitor, set up X. Save
this new /etc/X11/XF86Config as /etc/X11/XF86Config.dock or some such.
3) Borrow runlevel '4' (the one that no one uses) to be the 'laptop-docked'
level, and use runlevel 5 for 'laptop-undocked'.
4) Edit /etc/inittab. At the bottom, copy the "prefdm" line and change the
'5' to a '4' - this ensures you'll get a graphical login in both runlevels.
Not necessarily a required step, depending on how you want to run things.
4) Drop a quick shellscript into /etc/rc.d/rc4.d and /etc/rc.d/rc5.d that
swaps a symlink pointer to XF86Config back and forth between XF86Config.undock
and XF86Config.dock. When the system enters each runlevel, it will change the
pointer to point to the file with the right config for that monitor.
5) When booting (at least, when using LILO -- haven't tried this with grub
yet), use "linux 4" to boot into runlevel 4 (and thus docked mode) or "linux
5" to boot into runlevel 5. To be ultra-s00p3r-1337, drop an alias into
lilo.conf that appends those to two labeled blocks, so all you have to type is
"dock" or "undock" and the system will boot appropriately.
I'm sure there are more elegant solutions, but that's what I had
going. Worked pretty well, too.
--Jos
--
/ Jos Purvis (purvis at melete.org) || Yet Another Security Geek \
+----------------------------------------------------------------+
| I just can't haiku / I can never remember / how many...MY EYE! |
| -- Mike Sphar, demonstrating his poetic abilities in SDM |
More information about the TriLUG
mailing list