I'm using gnome with Xmonad as my window manager on Ubuntu 11.10. When I use a external monitor with my laptop, extending the desktop with either nvidia-settings or disper, the gnome-panels (Top bar and running applications/workspaces bar) seem to display on either monitor randomly. How can I either force them to use one monitor or change their position with a scriptable command that I can hot-key?

Here are things that don't work:

  • I can move them by right click->Properties-> Uncheck "expand" -> Alt-drag, etc. This works, but requires way too much mouse-work every time I plug in my external monitor.
  • Using gconf-editor to change any of the gnome-panel settings doesn't actually change anything: gconftool-2 --type string --set /apps/panel/toplevels/top_panel_screen0/orientation top The /monitor "1" setting also doesn't change anything

[edit] gpoo's solution is almost correct - just use dconf instead of gsettings.

dconf write /org/gnome/gnome-panel/layout/toplevels/bottom-panel/monitor 1

gsettings doesn't let me change the required keys, though it's likely I just can't understand its cryptic and undocumented syntax. All of dconf, dconf-editor, and gsettings need man pages. (gsettings's man page does nothing to explain what the terms mean.)

  • If you like xmonad, you might also like xmobar, which can be forced to a particular monitor with the "-x" parameter.
    – Joe
    Jul 28, 2012 at 20:00

1 Answer 1


Try gsettings or dconf. You might want to change org.gnome.gnome-panel.layout.toplevels.top-panel.monitor and org.gnome.gnome-panel.layout.toplevels.top-panel.orientation.

It would be something like:

$ gsettings set org.gnome.gnome-panel.layout.toplevels.top-panel.orientation top
$ gsettings set org.gnome.gnome-panel.layout.toplevels.top-panel.monitor 1
  • While gsettings doesn't work, dconf does: dconf write /org/gnome/gnome-panel/layout/toplevels/bottom-panel/monitor 0 moves the bottom-panel to the first monitor, and .../monitor 1 to the second. gsettings didn't work for me, since it claims these keys and dirs (or whatever "schema" are) don't exist: $ gsettings list-keys org.gnome.gnome-panel.layout object-id-list toplevel-id-list $ gsettings list-recursively org.gnome.gnome-panel.layout org.gnome.gnome-panel.layout object-id-list ['menu-bar',...] org.gnome.gnome-panel.layout toplevel-id-list ['top-panel', 'bottom-panel']
    – reasgt
    Aug 3, 2012 at 19:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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