Skip to content

Instantly share code, notes, and snippets.

@CyberLine
Created February 8, 2010 08:11
Show Gist options
  • Save CyberLine/297979 to your computer and use it in GitHub Desktop.
Save CyberLine/297979 to your computer and use it in GitHub Desktop.
Ubuntu 9.10 Upstart Script to switch xorg.conf on Dell D620/D630 based on docking status. Place in /etc/init/ as gdmswitch.conf and add this line to gdm.conf: "and started gdmswitch"
description "xorg.conf switch"
start on (filesystem
and runlevel [2345]
and started hal
and stopped udevtrigger)
stop on runlevel [016]
emits gdmswitch
script
if [ lshal -u platform_dock_0 | grep 'info.docked' | awk '{print $3}'` = true ]; then
ln -fs /etc/X11/xorg.conf.work /etc/X11/xorg.conf
else
ln -fs /etc/X11/xorg.conf.home /etc/X11/xorg.conf
fi;
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment