Register a domain and help support LQ
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 01-12-2013, 05:11 PM   #1
LQ Newbie
Registered: Dec 2011
Posts: 21

Rep: Reputation: Disabled
Help with script to move panel (Red Hat)

I'm using 'disper' to auto-detect and extend my monitor but I'd like the bottom panel to be moved too. I found a script that is supposed to do this and is below but it's not working. It seems the variable is set correctly but it's not happening. I can drag with a mouse but it would be nice if it was auto in some way since I'm constantly connecting and disconnecting from monitors.

# disper command will detect and configure monitors
disper --displays=auto -e

# parse output from disper tool how many displays we have attached
# disper prints 2 lines per displer
lines=`disper -l|wc -l`

display_count=$((lines / 2))

echo $display_count

echo "Detected display count:" $display_count

# Make sure that we move panels to the correct display based
# on the display count
if [ $display_count = 1 ] ; then
   echo "Moving panels to the internal LCD display"
   gconftool-2 \
        --set "/apps/panel/toplevels/bottom_panel_screen0/monitor" \
        --type integer "0"        
   gconftool-2 \
        --set "/apps/panel/toplevels/top_panel_screen0/monitor" \
        --type integer "0"        
   echo "Moving panels to the external display"
   gconftool-2 \
        --set "/apps/panel/toplevels/bottom_panel_screen0/monitor" \
        --type integer "1"        
   gconftool-2 \
        --set "/apps/panel/toplevels/top_panel_screen0/monitor" \
        --type integer "1"        
The echo text prints out but nothing happens. Currently, the file /home/rmasher/.gconf/apps/panel/toplevels/bottom_panel_screen0/%gconf.xml reads as such but the panel is on the non-external monitor anyways:

<?xml version="1.0"?>
	<entry name="monitor" mtime="1358027324" type="int" value="1"/>
What can I do?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Red Hat to Move to NYSE LXer Syndicated Linux News 0 11-18-2006 01:21 PM
LXer: Red Hat Again Tries to Move Beyond OS Level LXer Syndicated Linux News 0 04-17-2006 10:21 PM
Red Hat 9 - GNOME Panel freezes on log off admanb Linux - Software 4 08-23-2003 03:46 PM
Red Hat 9 control panel kentlee_ot Linux - Newbie 1 08-13-2003 09:06 AM
Red Hat 7.2 (KDE) on laptop, lost panel R2RO Linux - Software 5 09-25-2002 04:17 PM

All times are GMT -5. The time now is 08:27 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration