Completely Hide GNOME Panel

By | 2009/09/21

I’ve been doing a lot of customization lately with my GNOME installation, trying out new layouts and trying to gain as much screen real estate as I can. I came across an issue this morning in regards to the GNOME panel that I wanted to write down / publish. In the short article below I will describe how to completely hide the GNOME panel, allowing your applications to use 100% of the screen.

Autoide.. not 100%

Some of you might be thinking “Just click ‘Autohide” on the panel properties. How hard can it be?” The problem is that the default autohide still displays a few pixels, meaning your applications won’t extend to the absolute edge of the screen. When I tried it initially my panel still took 6px across the top. While that isn’t a lot, it still left a gap and was something I wanted to remove.

I found the value for this change within the gconf-editor. To ensure that your Autohide doesn’t continue to show any pixels (0 pixels), use the following command:

gconftool-2 --set --type integer /apps/panel/toplevels/top_panel_screen0/auto_hide_size 0

You can also find this value in the graphical editor using the following instructions:

ALT-F2 > "gconf-editor" > apps > panel > toplevels > top_panel_screen0 > auto_hide_size > 0

I prefer the command, its much simpler.

There are quite a few more “hidden” settings within the gconf-editor that allow you to change values not held within the normal Properties menu. I’ll have more of these to post in mid-October, after my GNOME presentation is finished for the Utah Open Source Conference.

13 thoughts on “Completely Hide GNOME Panel

  1. Francois MAROT

    I already knew this tip but for me (Ubuntu 9.04) a value of "0" still shows a one pixel line where apps can't be displayed… Any solution ?

    Reply
  2. João

    me either, its not completely hided, but thanks anyway

    Reply
  3. Mike

    I was looking for a way to toggle the panel today and I couldn’t find anything so eventually I found a way to write up my own script. This was the most recent article/thread on the topic that I found on the first page of Google so I figured I’d post this here.

    Note: requires xdotool (which is one function that I find really useful btw for keyboard-shortcut scripts)

    hidePanel.sh:

    ———————————————–
    #!/bin/bash

    # Toggles on/off gnome-panel visibility

    WID=`xdotool search –class “gnome-panel” | head -1`
    winStat=`xwininfo -id $WID 2>/dev/null | fgrep “Map State” | tail -c8`

    if [ "X$winStat" = "Xiewable" ]; then

    xdotool windowunmap $WID

    else

    xdotool windowmap $WID

    fi

    exit 0
    ———————————————–

    Run chmod +x (chosen directory)/hidePanel.sh
    Then add (chosen directory)/hidePanel.sh to a custom keybinding or a startup script.

    xdotool, xwininfo, and ps aux with grep are useful in cases like these for finding windows and processes and enabling/disabling or running/killing them.

    Reply
  4. Mike

    @Mike

    Just found out that the script doesn’t work very well if there’s more than one panel. This one should be a bit better:

    hidePanel.sh
    ———————————————–
    #!/bin/bash

    # Toggles on/off gnome-panel visibility

    WID=`xdotool search –class “gnome-panel”`

    for i in $(seq 0 $(( ${#WID}/9 ))); do

    curWID=`expr substr “$WID” $(( $i*9+1 )) 8`
    infWID=`xwininfo -id $curWID 2>/dev/null`

    if [ $(expr "$infWID" | fgrep "Window id" | tail -c8) = "Panel\"" ]; then

    if [ $(expr "$infWID" | fgrep "Map State" | tail -c9) = "Viewable" ]; then

    xdotool windowunmap $curWID
    else

    xdotool windowmap $curWID

    fi

    fi

    done

    exit 0
    ———————————————–

    Also, I forgot to add the “. /” before the execution path. To run the script, run: “. /(chosen directory)/hidePanel.sh” without quotes. I should also mention that I’ve only tried this on Lucid (Ubuntu 10.04).

    Hope you enjoy.

    Reply
  5. x

    Mike your 1st script gives me this output:


    ./HideGnomePanel.sh
    usage: windowmap wid

    and 2nd one this:




    ./HideGnomePanel.sh: line 12: [: =: unary operator expected
    expr: syntax error
    ./HideGnomePanel.sh: line 12: [: =: unary operator expected


    Reply
  6. x

    and line 12 in script is this:

    if [ $(expr "$infWID" | fgrep "Window id" | tail -c8) = "Panel\"" ]; then

    Reply
  7. x

    i set line
    WID=`xdotool search –class “gnome-panel”`
    to
    WID=`xdotool search –class “gnome-panel”`

    and line
    curWID=`expr substr “$WID” $(( $i*9+1 )) 8`
    to
    curWID=`expr substr “$WID” $(( $i*9+1 )) 8`

    and now script is working without error but i still have top panel :) (lucid also)

    Reply
  8. x

    hmm now i see the problem. when i copy paste this script i get AltGr+0 char and not Shift+2 char

    Reply
  9. Max

    Configuring the Panel is always the first thing I do. However, there are limitations. For example, changing the color of the Panel (upper or lower panel) affects only one part of the Panel. The result is an anesthetically looking. The upper panel will be shown like three pieces: The part that contains “Applications”, Places” and “System” remains unchanged. Then only the middle part of the Panel cahnges the color; finally, the right part (containing the clock, calendar and swtich button,etc) also remains unchanged.

    That is really anoying. I mean, KDE 3.5 had that possibility, but Gnome cannot custom create a homogeneously colored panel. Gnome walks backwards….unless I am missing something???

    Reply
  10. Ian Kluhsman

    You can also use the value apps > panel > general > toplevel_id_list and remove the string [top_panel] from this string list. This will effectively remove the panel completely from the screen, as opposed to the object still being drawn on the desktop hidden and invisible.

    Reply
  11. Bruno

    What about Ubuntu 11; Unity?? How to hide the top panel??
    thanks

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *