LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 01-12-2013, 04:11 PM   #1
kesi
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.

Script:
Code:
# 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"        
else
   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"        
fi
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:

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


Reply


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 12:21 PM
LXer: Red Hat Again Tries to Move Beyond OS Level LXer Syndicated Linux News 0 04-17-2006 09:21 PM
Red Hat 9 - GNOME Panel freezes on log off admanb Linux - Software 4 08-23-2003 02:46 PM
Red Hat 9 control panel kentlee_ot Linux - Newbie 1 08-13-2003 08:06 AM
Red Hat 7.2 (KDE) on laptop, lost panel R2RO Linux - Software 5 09-25-2002 03:17 PM


All times are GMT -5. The time now is 09:51 PM.

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