Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to be able to unhide the XFCE panel by pressing a key instead of placing the mouse cursor at the edge of the screen.

I'm running Xubuntu 12.04 but updated to XFCE 4.10

share|improve this question
hmmm.. I think I could come up with something that would move your mouse over there on a key press. Would that do what you want? – Seth Jan 18 '13 at 2:51
@iSeth - if nothing better is possible then yes. But optimally I'd like to able to press a key and see the panel regardless of where the cursor is... – Borsook Jan 18 '13 at 8:15
up vote 7 down vote accepted

Take the following two commands and bind them to separate Super-key combinations:

xfconf-query -c xfce4-panel -p /panels/panel-0/autohide -s false
xfconf-query -c xfce4-panel -p /panels/panel-0/autohide -s true

This can be done by either selecting, Applications Menu --> Settings --> Keyboard, or by running xfce4-keyboard-settings from the command line(Ctrl-Alt-t.

I've bound the first command to Super-u (to 'unhide' the panel). For the second command, I am binding Super-h (to 'hide' the panel).

As you can see in the commands above, the behavior is only changed on a single panel(In this case, panel-0 is being modified).

You will notice a slight delay while the panel changes state.

Source. More details on the xfconf command can be found here.

share|improve this answer
Hmmm, I tried that and got xconf command not found error. What version of Xfce do you use? – Seth Jan 23 '13 at 4:52
@iSeth The command is xfconf, not xconf. ;-) The command has been available since xfce 4.6. I'm running xfce 4.10 from this PPA – Kevin Bowen Jan 23 '13 at 4:57
Ah, your right. Works now. +1 – Seth Jan 23 '13 at 5:02
You can also use the toggle option in Xfce 4.10 and just bind a single command to one key: i.e. xfconf-query -c xfce4-panel -p /panels/panel-0/autohide -T – user76204 Mar 13 '13 at 0:14
@Mik Nice find! I was unaware of that option flag. – Kevin Bowen Mar 13 '13 at 12:11

Try this workaround:

Install xte and xdotool with sudo apt-get install xdotool xautomation

You can use xdotool to find the x,y coordinates of the mouse. Open a terminal type xdotool getmouselocation then move the mouse somewhere where it will activate the panel and hit enter. You will get some output like:

findclient: 62914741
findclient: 6291474  
x:1282 y:1079 screen:0 window:62914741  

What's important here is: x:1282 y:1079, which gives us the x,y coordinates of the mouse.

Now type xte 'mousemove 1282 1079' (replacing 1282 1079 with the coordinates you got earlier). That should move the mouse where you want.

You can use xbindkeys to bind this command to a key on the keyboard. I can add instructions upon request or you can set it in Xubuntu's keyboard settings.

share|improve this answer

As Kevin said, you can use xfconf, but I'd do it this way:

xfconf-query -c xfce4-panel -p /panels/panel-0/autohide -T

The -T toggles the true/false value. This way, you can use the same key to hide/unhide.

To get more options do:

xfconf-query --help

I wanted to make a comment to the answer from Kevin, since it's what got me on the right track. But I'm new here, not enough reputation..

share|improve this answer

So, while I was fooling around with this, I made a little ruby script to toggle all panels at the same time. It seems to work.

#!/usr/bin/env ruby

#Toggle all panels' autohide property in xfce4
# fede s.
out = `xfconf-query -c xfce4-panel -l`.split
out.inject( {|res, val|
    m= /panel-([0-9]+)/.match(val);                 #get the panel numbers
    if m then res.push(m[1]) end;                   #add only if it matches
    res}.sort.uniq.each do                          #filter duplicates
        | num |
            `xfconf-query -c xfce4-panel -p /panels/panel-#{num}/autohide -T` #here is the command that will repeat for every panel found

It's probably not the best way to do it, and I don't really know much about ruby, so feel free to throw me in the fire! :P

If Someone want's to use it:

  1. make sure you have ruby installed.

  2. copy it to a file whereveryou see fit (I have mine as ~/scripts/xfce/toogleautohide.rb).

  3. chmod +x path/to/your/script

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.