Index of /xprofile
      Name                    Last modified       Size  Description

[DIR] Parent Directory 13-May-2008 16:17 - [   ] Xprofile-0_4.tgz 29-Mar-2005 17:28 2k [   ] Xprofile-0_5.tgz 28-May-2005 14:51 4k [   ] kdeprofile 28-May-2005 15:06 1k [TXT] kdeprofile.html 09-Jun-2005 08:07 2k [TXT] readme.html 28-May-2005 15:06 1k

Xprofile by JT Moree

This script will switch out X Config files in /etc/X11 
by runlevel or when you run the program manually.  

CONFIGURE
Copy Xprofile.conf to /etc
Edit /etc/Xprofile.conf for your appropriate system file names.

Create a directory called /etc/X11/Xprofile and put all of your X config files there.
Name them something descriptive and backup your original file here too.

INTERACTIVE
When you run Xprofile -m, you will be presented with a menu to choose one of the files.  

AUTOMATIC BY RUNLEVEL
If you want the config to change based on the runlevel:
1) Make a symlink /etc/init.d/xprofile -> /usr/sbin/Xprofile.  Setup the appropriate links to each runlevel
  On debian you would run the command
    update-rc.d xprofile defaults
2) Run the command `runlevel` and create a hidden directory with that name in /etc/X11/Xprofile.
  i.e  if runlevel is 5: mkdir /etc/X11/Xprofile/.5
3) Make a copy (or symlink) of the config you want to be the default in that directory and call it 'default'
  i.e. /etc/X11/Xprofile/.5/default -> ../MyXF86Config


AUTOMATIC BY ACPI 
ACPI can detect when a display device is plugged in or not.  In my case I have a laptop which I use the LCD for the primary display device but when I am at home I also plug in a monitor.  My system cannot use the same config for both cases.  Xprofile detects that the monitor is plugged in and chooses the appropriate file.

1) Make sure you load the acpi kernel module 'video' (modprobe video or put in modules.conf or equivalent)
2) create a file called ORDER in the runlevel directory with the names of devices that you want to look for and the order to search.  Use a space between each name.  Current devices supported are CRT, LCD, and TV
 i.e.  I want the CRT to be searched for first so my order file contains
  /etc/X11/Xprofile/.5/ORDER contains "CRT LCD"
 If I also have a TV out configuration I might put that first.
 TV CRT LCD
3) Next create the files for the supported devices using the same names.
  i.e.  /etc/X11/Xprofile/.5/CRT -> ../MyCRTconfig
    /etc/X11/Xprofile/.5/LCD -> ../MyLCDconfig
    /etc/X11/Xprofile/.5/TV -> ../MyTVconfig

4) to recap, you should now have files and directories which look something this
/etc/X11/Xprofile
/etc/X11/Xprofile/MyConfig1
/etc/X11/Xprofile/MyConfig2
/etc/X11/Xprofile/MyConfig3
/etc/X11/Xprofile/.5/default
/etc/X11/Xprofile/.5/ORDER
/etc/X11/Xprofile/.5/CRT
/etc/X11/Xprofile/.5/TV
/etc/X11/Xprofile/.5/LCD
/etc/X11/Xprofile/.4/default  and so on