12

In Natty Narwhal I used to do some nifty tricks with .gtkrc-2.0 to disable mnemonics (underlined menus) but now it's impossible. I assume in Oneiric Ocelot it will be something different because it uses GTK3.

I used to achieve this by adding the following lines:

gtk-enable-accels = 0
gtk-enable-mnemonics = 0

How can I get rid of the mnemonics in Oneiric Ocelot?

6
  • In Natty Narwhal I used this information: ubuntuforums.org/showthread.php?p=7483418 In Oneiric Ocelot this doesn't work.
    – Chris
    Nov 6, 2011 at 19:28
  • This question appears to be abandoned, if you are experiencing a similar issue please ask a new question with details pertaining to your problem. If you feel this question is not abandoned, please flag the question explaining that. :)
    – jrg
    Feb 3, 2012 at 1:26
  • @jrg I contest this one. It's a cogent question, all requests for further information have been answered.
    – Jjed
    Feb 3, 2012 at 20:58
  • @JacobJohanEdwards user hasn't been seen since mid-nov. I'd define that as abandoned, its almost two months, and it has no answer.
    – jrg
    Feb 3, 2012 at 21:00
  • @jrg The status of the original user doesn't matter. It's a real question that doesn't fit any of the close vote categories, and could be upvote-answered by the community.
    – Jjed
    Feb 3, 2012 at 21:03

4 Answers 4

4

To "disable" mnemonics for Nautilus 3.10.1 on Ubuntu 14.04 which uses GTK3:

  1. Create the following path & file if it doesn't already exist.
    /home/YOURUSERNAME/.config/gtk-3.0/settings.ini
  2. Then add:
    [Settings]
    gtk-enable-mnemonics = 0
  3. Then logout and log back in.

Sources:
* https://mail.gnome.org/archives/gtk-list/2011-March/msg00108.html
* https://developer.gnome.org/gtk3/stable/GtkSettings.html

p.s. Note that the GTK docs say you should have an environment variable called XDG_CONFIG_HOME but I didn't have one. I did have an existing ~/.config/gtk-3.0 folder and it appears it is looking there by default, without the environment variable.

2
+25

GTK3 doesn't use gtkrc anymore, but moved to styling with CSS. But there still is a way to change global settings. Quoting from the GTK reference:

GTK+ reads default values for settings from settings.ini files in /etc/gtk-3.0 and $XDG_CONFIG_HOME/gtk-3.0.

See that page for some more details.

I wonder if this works in Unity though, with the global menu. I don't know if these settings are adapted by it.

2

After so long time and no answer found on my question I found it!

To hide mnemonics (keyboard accelerators) in GTK 3.x you just need to open:

/usr/share/themes/THEME_NAME/gtk-3.0/settings.ini

Add the following line:

gtk-enable-mnemonics = 0

And save the file. Log out or change your theme with another one then change it back. That's all. Nothing hard to do, only little research.

PS: Of course after update of ubuntu-light-themes package this will be lost and need to be redone again.

0

add

gtk-auto-mnemonics = 1

in your theme settings: /usr/share/themes/YOUR_THEME_NAME/gtk-3.0/settings.ini

1
  • 1
    Editing an installed theme from /usr/share/themes is a BAD idea - as changes will be overwritten when new package is installed Feb 7, 2012 at 4:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .