In Gnome it is possible to have a gnome-panel for each monitor. This is very useful. One can create a new gnome-panel by pressing right-click on a existing gnome-panel ( make sure that when the entire gnome-panel space is filled with applets and programs you temporarily remove some applets or close some programs ). Click “New panel” and a new panel will be created. Press-and-keep-pressed ALT and move the new gnome-panel with the mouse to the other monitor.
However, when not using one of the monitors, Gnome does not know what to do with the panel normally displayed on that monitor and places it on the default monitor, resulting in two gnome-panels on one monitor. This is not so useful!
To circumvent this default Gnome behavior use the following procedure:
- Download gnome-panel-switch.sh script and put it somewhere you like:
#!/bin/bash # # Auto adjust the number of pannels based on the number of # connected monitors. # # Author : Amain 2010 # Website: blog.zoomeren.nl # Monitor states: # - connected 1440x900+0+0 ( connected and used ) # - connected ( connected not used ) # - disconnected ( disconnected ) # NR_OF_MONITORS=$( /usr/bin/xrandr -q | /bin/grep " connected [0-9]\+x[0-9]\+" | /usr/bin/wc -l ) # Second panel name # # note: retrieve the panel name using gconf-editor # SECOND_PANEL_NAME="panel_0" case $NR_OF_MONITORS in 1) # Disable external monitor ( setting screen to -1 ) # gconftool-2 --type int --set /apps/panel/toplevels/$SECOND_PANEL_NAME/screen -- -1 ;; 2) # Enable external monitor ( restart is needed after setting screen to -1 ) # gconftool-2 --type int --set /apps/panel/toplevels/$SECOND_PANEL_NAME/screen 0 /usr/bin/killall gnome-panel ;; *) # no action ;; esac
- sudo chmod +x gnome-panel-switch.sh
- sudo mv /usr/bin/gnome-display-properties /usr/bin/gnome-display-properties.bin
- sudo vi /usr/bin/gnome-display-properties and paste the following script ( don’t forget to adjust the path in line where gnome-panel-switch.sh is called! ):
#!/bin/bash # # Auto adjust the number of pannels based on the number of # connected monitors. # # Author : Amain 2010 # Website: blog.zoomeren.nl # Open gnome-display-properties dialog # /usr/bin/gnome-display-properties.bin # Auto enable/disable gnome-panels # YOURPATH/gnome-panel-switch.sh
- sudo chmod +x /usr/bin/gnome-display-properties
- Start gnome-panel-switch.sh every time Gnome starts to auto disable/enable the correct number of gnome-panels per display. Use Gnome Startup in the System Settings menu and add the invocation for this script.
- Important note: when /usr/bin/gnome-display-properties is replaced during a Ubuntu upgrade one looses the changes!
June 26th, 2010 at 00:11
PillSpot.org. Canadian Health&Care.No prescription online pharmacy.Special Internet Prices.Pillspot.org. Herbal-supplements@buy.online” rel=”nofollow”>.…
Categories: Pain Relief.Weight Loss.Mental HealthAnxiety/Sleep Aid.Anti-allergic/Asthma.Womens Health.Skin Care.Eye Care.Mens Health.Stop SmokingAntibiotics.Stomach.Antidiabetic.Antidepressants.Blood Pressure/Heart.Vitamins/Herbal Supplements.Anti…
July 4th, 2010 at 06:00
Buy:Cialis.Zithromax.Soma.Super Active ED Pack.Cialis Super Active+.Viagra Soft Tabs.Viagra Super Force.Cialis Soft Tabs.VPXL.Propecia.Viagra Professional.Maxaman.Viagra Super Active+.Cialis Professional.Tramadol.Levitra.Viagra….