A common problem for laptop users is that they use various display configurations. When traveling they use only the internal LCD panel, but in the office they use internal LCD panel + external display. It is pain to configure external display manually each time you plug it in.
This HOW TO will give you instructions to create a shell script which will configure displays and Gnome panels according to the plugged in displays.
1. Install magnificent disper tool https://launchpad.net/~wvengen/+archive/ppa by Willem van Engen. Currently disper supports nVidia only, but the author claims ATI support is possible to add by contributions.
2. Command
will autodetect displays and set the extended desktop.Code:disper --displays=auto -e
3. Dispering displays is not enough. You probably want to move Gnome panels to your primary (external) display when it is plugged in.
Gnome architects have been clever. Gnome panel stores its settings in gconf registry. gconf registry is not just dummy storage backend; changing these values immediately reflect changes in applications using the registry. One of these applications is gnome-panel. This means that we can move the panels by editing its registry setting related to the monitor configuration.
Using gconf-editor command the critical settings can be found under:
Value = 0 -> panels on internal LCDCode:/apps/panel/toplevels/bottom_panel_screen0/monitor /apps/panel/toplevels/top_panel_screen0/monitor
Value = 1 -> panels on External display
4. Let's make a little command line script which will
a) Detect and configure monitors
b) Move gnome-panels according to the connected display count
See shell script monitors.sh
5. Add monitor.sh to your Startup Programs in System > Services menu, so it will be run each time you login to Gnome.
Other pointers:
switchconf is a tool to switch between /etc configuration files and choosing the configuration from the b/apps/panel/toplevels/top_panel_screen0/monitoroot menu when starting the computer.
http://meandubuntu.wordpress.com/200...on-switchconf/
nVidia settings low level poking:
http://www.nvnews.net/vbulletin/show....php?p=1972884
nvidia-settings man page:
http://linux.die.net/man/1/nvidia-settings
Bookmarks