12

I know that Ubuntu has a file hidden somewhere deep inside it that holds the old metacity values for changing the position of the menu buttons. My question is how can I do this WITHOUT Ubuntu Tweak in Ubuntu Classic?

"Why not use the thing that's already done?"

  • That thing was written by finding this file once then making a mental note of it to create a GUI to solve the problem, which is all fine and dandy.
  • I want to learn where this stuff is for myself because I like knowing how to do things from the command line. (Also, come on, how many times have you seen a dude in a coffee shop using the command line interface to mess with stuff?)
  • It could be helpful to note the directory for others because of installing other themes to gnome-classic (cough new macbuntu port cough)

I would also like to know if this is a text file that I may be able to change with vim, emacs, gedit, etc.

  • Canonical refuses to implement any option for this in 16.04, see this bug: "The window controls in Unity are on the left. It is not a setting, it's where the designers chose to place them. This will not change.". I personally find this incredibly obtuse, but, you get what you pay for. – Dan Dascalescu Sep 20 '16 at 23:11
27

You can move buttons to the right with:

gsettings set org.gnome.desktop.wm.preferences button-layout ':close,minimize,maximize'

or, maybe better to twitch "close" button with "maximize" button:

gsettings set org.gnome.desktop.wm.preferences button-layout ':maximize,minimize, close'

And move them back to the left with:

gsettings set org.gnome.desktop.wm.preferences button-layout 'close,minimize,maximize:'

To get the current settings, use:

gsettings get org.gnome.desktop.wm.preferences button-layout

See man gsettings for more info, and, as a bonus:

dconf Editor

In this case the changes are made in ~/.config/dconf/user file which is expected to be in the binary dconf (GVDB) database format. Only programs like dconf Editor or gsettings can safely edit this file.

More about:

  • @RaduRadeanu I guess I need to edit the question to read, where is the file? – Cole Busby Nov 15 '13 at 16:27
  • 1
    @ColeBusby There isn't a file you can edit IIRC, dconf is binary. – Oli Nov 15 '13 at 16:31
  • @Oli Okay, Just making sure, so gsettings is the ONLY way to make these changes yes? Also where are themes stored? (images and the like) – Cole Busby Nov 15 '13 at 20:22
  • @ColeBusby See my new edits. – Radu Rădeanu Nov 16 '13 at 6:45
  • ... minimize, close' <- with this space didn't work for me. I removed it before execute. – danihp Mar 29 '18 at 19:14
1

I found this question searching for a way to move buttons from left to right using for the whole system. I am using autologin-guess. So everyting the system get restarted this setting got lost.

Create a file /usr/share/glib-2.0/schemas/60_our-own.gschema.override with this content:

[org.gnome.desktop.wm.preferences]
button-layout=':minimize,maximize,close'

Then execute this command:

glib-compile-schemas /usr/share/glib-2.0/schemas/

Reboot your system.

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.