Disable the Global Menu for a particular Qt/KDE application:
.desktop
file of the application (Clementine in our case)..desktop
files are usually located in the following directory:/usr/share/applications
.desktop
file of Clementine, type the following commands in a terminal window:cd /usr/share/applications
gksudo vim clementine.desktop
The aforementioned commands will open the Clementine
.desktop
file in your favorite text editor (For instance, to use Gedit, replace vim
with gedit
).To add the
No Global Menu
Quicklist entry, append the following lines to the end of the .desktop
file:[NoGM Shortcut Group]
Name=No Global Menu
Exec=env QT_X11_NO_NATIVE_MENUBAR=1 clementine
TargetEnvironment=Unity
Locate the following line in the
.desktop
file:X-Ayatana-Desktop-Shortcuts=Play;Pause;Stop;Previous;Next;
Then change it to:
X-Ayatana-Desktop-Shortcuts=Play;Pause;Stop;Previous;Next;NoGM;
Notice that the word we have appended to this line (
NoGM
) must match the word contained in the first line of the previous code block:[NoGM Shortcut Group]
Save the file, and then click on the newly added Quicklist entry to test your configuration.
How does it work?
[NoGM Shortcut Group]
Name=No Global Menu
Exec=env QT_X11_NO_NATIVE_MENUBAR=1 clementine
TargetEnvironment=Unity
Name
is the name of the Quicklist entry.Exec=env QT_X11_NO_NATIVE_MENUBAR=1 clementine
is the command that will be executed when the Quicklist entry is clicked. QT_X11_NO_NATIVE_MENUBAR=1
is the environment variable that disables the Global Menu.To disable the Global Menu for a GTK+ application, replace:
Exec=env QT_X11_NO_NATIVE_MENUBAR=1
with:
Exec=env UBUNTU_MENUPROXY=1
Comments