Install Globul Menu in Gnome Shell
Remember Gnome2 Global Menu? It's an applet that adds a global menu (the menu is displayed on the top panel) for Gnome 2 that wasn't very active for a long time because Ubuntu built its own global menu. But it's back!
Gnome Global Menu is currently being ported to GTK3 and an alpha version is already available for download so you can get a global menu in GNOME Shell. Here's a video with the new Gnome Global Menu running in Ubuntu 11.10 (with GNOME Shell):
The new GTK3 Gnome Global Menu only works with GTK applications (both GTK2 and GTK3) - so don't expect LibreOffice, Firefox or Qt applications to work, at least not yet. Also, it doesn't work with all GTK applications yet - I've only found one for now: Shutter, but there might be more.
Here's a Fedora 15 screenshot too:
Install Global Menu for Gnome Shell (Ubuntu, Fedora, Arch Linux):
Gnome Shell global menu is available in
AUR for ArchLinux users but if you don't use Arch, it will take quite a few steps to get it working. I've tried to make a how-to for Ubuntu / Fedora (tested in Ubuntu 11.10 with Gnome Shell 3.2.0 and Fedora 15) but there are quite a few things that could go wrong so you need to have some knowledge about compiling applications to get it working. Before proceeding, you obviously need to install build-essensial, etc.
Let's get started!
1. Install Gnome Global Menu dependencies and Git, Open Terminal and copy the following commands in the Terminal:
For Ubuntu:
Terminal Command:
|
sudo apt-get install git-core valac-0.12 libvala-0.12-dev libgtk-3-dev gobject-introspection libgirepository1.0-dev libgtk2.0-dev autotools-dev automake autoconf intltool libtool
|
For Fedora:
Terminal Command:
|
sudo yum install git vala-devel gtk3-devel gobject-introspection-devel gtk2-devel autogen automake autoconf intltool glibc-devel libtool
|
2. Download Gnome Globalmenu 0.9 alpha 5 source file and extract it (this is only required for 3 files which are missing in GIT):
Terminal Commands:
|
cd; mkdir -p globalmenu
|
cd globalmenu; wget http://gnome2-globalmenu.googlecode.com/files/gnome-globalmenu-0.9.alpha5.tar.bz2
|
tar -xvf gnome-globalmenu-0.9.alpha5.tar.bz2
|
3. Get the latest Gnome Globalmenu via Git:
Terminal Command:
|
git clone git://github.com/gnome-globalmenu/gnome-globalmenu.git
|
4. Switch to the Gnome 3 branch and copy the missing files from the Alpha 5 source files we've downloaded under step 2:
Terminal Commands:
|
cd gnome-globalmenu
|
git checkout gnome-3
|
cp ../gnome-globalmenu-0.9.alpha5/src/{module.c,header.h,header-gtk2.h} ./src
|
5. Compile and install Gnome Shell Global Menu:
Terminal Commands:
|
autoreconf --force --install --verbose
|
./autogen.sh --prefix=/usr
|
make
|
sudo make GTK2_MODULES_DIR=/usr/lib/gtk-2.0/modules GTK3_MODULES_DIR=/usr/lib/gtk-3.0/modules GLIB_COMPILE_SCHEMAS=/bin/true install
|
sudo glib-compile-schemas /usr/share/glib-2.0/schemas
|
If you get an error about Vala not being version 0.12, remove Vala 0.10 and make sure 0.12 is installed (step 1).
6. Fixes:
For GNOME Shell 3.2: Ubuntu 11.10 currently has GNOME Shell 3.2.0 while the Gnome Globalmenu Shell only supports GNOME Shell 3.0 so get it to work with GNOME Shell 3.2 using the following commands:
Terminal Commands:
|
sudo rm /usr/share/gnome-shell/extensions/GlobalMenu@globalmenu.org/{metadata.json,extension.js,stylesheet.css}
|
cd; wget http://webupd8.googlecode.com/files/GlobalMenu-globalmenu.org.tar.gz
|
tar -xvf GlobalMenu-globalmenu.org.tar.gz
|
sudo cp GlobalMenu@globalmenu.org/{metadata.json,extension.js,stylesheet.css} /usr/share/gnome-shell/extensions/GlobalMenu@globalmenu.org/
|
sudo ln -sfv /usr/lib/gtk-2.0/modules/libglobalmenu-gtk2.so /usr/lib/gtk-2.0/modules/libglobalmenu-gtk.so
|
For GNOME Shell 3.0.2 (Fedora 15):
Terminal Commands:
|
sudo sed -i 's/3\.0\.2/3\.0/' /usr/share/gnome-shell/extensions/GlobalMenu@globalmenu.org/metadata.json
|
sudo ln -sfv /usr/lib/gtk-2.0/modules/libglobalmenu-gtk2.so /usr/lib/gtk-2.0/modules/libglobalmenu-gtk.so
|
7. Now open GNOME Tweak Tool (install it in Ubuntu: sudo apt-get install gnome-tweak-tool) and enable the Global Menu extension. For GNOME Shell 3.0.x, you also need to restart GNOME Shell or log out and log back in.
To test if the installation was successful, close all running Gedit instances and run the following command in a terminal:
Terminal Command:
|
gnome-globalmenu-manager & GTK_MODULES=globalmenu-gtk gedit
|
Gedit should now use a global menu.
If you got this far and it's not working, it's most probably something to do with the Gnome Shell version in the GlobalMenu extension metadata file, so here's what do check/do:
Is the extension displayed in GNOME Tweak Tool? If it is, it should work. If it's not, it is indeed the version in the metadata file that's causing this
Go to /usr/share/gnome-shell/extensions/GlobalMenu@globalmenu.org and make sure the Gnome Shell version inside the metadata.json file matches your Gnome Shell version. After making modifications to this file, make sure you restart Gnome Shell and check Gnome Tweak Tool to see if the extension shows up.
8. Optional: if you want to have Gnome Shell Global Menu to start automatically at login for all the supported applications, add "gnome-globalmenu-manager" to the startup applications and run the following commands:
Terminal Commands:
|
sudo cp ~/globalmenu/gnome-globalmenu/globalmenu.sh /etc/profile.d/
|
sudo chmod +x /etc/profile.d/globalmenu.sh
|
That's it Enjoy