Is there a way to setup up different user accounts or different sessions so that they will load different xorg.conf files?
I already have 2 separate xorg.conf files I would like to use, but I haven’t found a way to have User-A load xorg.conf-A and User-B load xorg.conf-B.
Is there any way to do this?
I don’t think so because X is already running by the time you log in. However, I had a similar need to do this on my laptop, so I wrote a couple of small scripts to switch out the xorg.conf and restart X. Then I assigned the scripts to hotkeys in Compiz, so I can switch back and forth with a keystroke. For example, one script looks like this:
In my case, I’m using KDE, but I think you can substitute gdm for kdm if you’re using GNOME. The sleep 2 is important because I noticed KDM fails to restart if you do it too quickly. Note also that this script needs to run as root. In order to do that without prompting for a password, you need to run it with sudo and add a line like this to your /etc/sudoers:
Replace “your_username” and the path to the script as appropriate.
Alternatively, I believe that you can specify a particular xorg.conf at boot time by adding a kernel parameter to the GRUB line that starts your system. If memory serves, the parameter looks like XORG=path/to/xorg.cong, but I haven’t done this in awhile, so you might have to google a little to get the syntax right.
Thanks a lot for the response, using your idea I was able to write a script to swap out the xorg.conf files, but I’m having problems with the last few lines.
When I added the following lines: