The popular hack to gtk and applet that imitates the Mac menu isnt’t maintained by its original creator AdQ.
Fortunately, rainwoodman started a new project based on adq patch and applet (now, totally rewritten from scratch) : globalmenu.
Now, the menus are detached to the panel applet only if this one is running, the menu key bindings (eg Alt+F) are now functional.
Here is a short guide with two possible methods to install global menu on Ubuntu.
/!\ WARNING : This how to works only with the 0.4 series of globalmenu (svn revision up to around 980) and may not work on Ubuntu Intrepid, Check the new how to for the 0.6 series
warning : regardless of the choosen method, before trying this hell thing, read very carefully the instructions and remind that globalmenu is an alpha software !
if you encounter problems, try to ask here
The deb packages way to install global menu
WARNING : this method works only with gutsy (ubuntu 7.10) 32 bits. there is at the moment no package for 64bits systems due to a compiling issue
First download the pack gnome-globalmenu-0.4.2_ubuntu-gusty-svn679.tar.gz here (the svn number may change)
Assuming you have downloaded the pack in your user home directory (if not put it there), open a terminal (menu Applications>Accessories>Terminal) and apply the following commands (use copy and paste to avoid typos):
Unarchive the packages :
tar xzvf gnome-globalmenu-0.4.2_ubuntu-gusty-svn679.tar.gz
then go to the directory where the packages have been extracted :
cd gnome-globalmenu
now install them with this command :
sudo dpkg - *.deb
if you got some errors at this step, you may need to try this command :
sudo dpkg -i --force-overwrite *.deb
now, edit (or create) the ~/.gnomerc file:
gedit ~/.gnomerc
add this line to the file :
export GTK_MODULES=libgnomenu
save and exit gedit.
Finally, restart your session, add the global menu applet to your panel (right click on an empty part of the panel and choose “add to panel” from the menu).
That’s all, you should now have your applications menu in the panel.
building global menu yourself to be bleeding edge.
Warning: There is a compiling issue on 64 bits systems, if you manage to compile this, please post an issue here
Open a terminal (menu Applications>Accessories>Terminal) and apply the following commands (use copy and paste to avoid typos):
first, install all needed build tools :
sudo apt-get install build-essential autoconf automake1.9 subversion fakeroot checkinstall
make a directory :
mkdir globalmenu-install
go in this directory :
cd globalmenu-install
checkout the source code with subversion :
svn co http://gnome2-globalmenu.googlecode.com/svn/trunk/ gnome2-globalmenu-applet-0.4.2
change to this directory :
cd gnome2-globalmenu-applet-0.4.2/gtk+-aqd/
get the gtk2.0 source code :
apt-get source libgtk2.0-0
and the required deps to build gtk :
sudo apt-get build-dep libgtk2.0-0
copy the patch to the debian dir in the gtk source directory :
(note: gutsy people want to use the patch.diff from here, download it and extract it in the directory listed bellow instead of copy the patch from trunk)
cp patch.diff gtk+2.0-2.12.0/debian/patches/
edit the series file :
gedit gtk+2.0-2.12.0/debian/patches/series
add this at the end of the file :
patch.diff
save and exit gedit.
edit the chanlog file to increase the release number (the number after ubuntu word in the package name),
this avoid that update manager wants to reinstall original distribution gtk packages.
gedit gtk+2.0-2.12.0/debian/changelog
add this at the very top of the file (respect the indentation and white line after mail/date line or it will give you an error at build)
gtk+2.0 (2.12.0-1ubuntu3.1~adq) gutsy; urgency=low
* debian/patches/patch.diff:
- patch from rainwoodman, for globalmenu integration
-- Ayoli <ayolinux@gmail.com> Tue, 10 Mar 2008 10:29:09 +0200
<br style="line-height:13px;" />
save and exit gedit.
go to the gtk2.0 source directory :
cd gtk+2.0-2.12.0now, we’re ready to build gtk, here we go :
dpkg-buildpackage -rfakerootnote: this process will take about 30 min of your life. Once this is finished, go up and install the debs :
cd .. && sudo dpkg -i *.debgo up once again :
cd ..before building the applet, install the required deps :
sudo apt-get install libgconf2-dev libpanel-applet2-dev libwnck-devnow we can run the autogen.sh :
./autogen.shand then the configure script :
./configure --prefix=/usr --enable-tracing=no --enable-xfce-plugin=no --disable-maintainer-modenext step is make :
makeand install with checkinstall (this make uninstall easier) :
sudo checkinstallafter that run this :
sudo ldconfignow, edit (or create) the ~/.gnomerc file:
gedit ~/.gnomercadd this line to the file :
export GTK_MODULES=libgnomenusave and exit gedit. Finally, restart your session, add the global menu applet to your panel (right click on an empty part of the panel and choose “add to panel” from the menu). That’s all, you should now have your applications menu in the panel.
Tags: global menu, gnome, gtk, guide, macmenu, menu


english
français
5 September 2008 at 4:24 PM
@ solidslash
after
I am also getting the same error
dpkg-buildpackage -rfakeroot
Applying patch 095_gtk-im-module-setting.papatch.difftch
make: *** [debian/stampdir/patch-stamp] Error 1
By the way, i had to change some of the commands. I had to replace
gtk+2.0-2.12.0 with gtk+2.0-2.12.9
since that is the version i got.
2 September 2008 at 4:08 PM
Hey, after the “dpkg-buildpackage -rfakeroot” command I get following message :
Applying patch patch.diff
make: *** [debian/stampdir/patch-stamp] Error 1
dpkg-buildpackage: failure: debian/rules build gave error exit status 2
What’s wrong? I’m trying to build it on Ubuntu Hardy Heron.
29 August 2008 at 4:41 PM
@NaNoNyMe : non, juste le patch.diff a priori.
@Doggiedoll : I believe that is an issue with recent revisions (branch 0.5). You may want to ask the dev at the ubuntuforums thread or on his google code page (links are at the top of the post).
@robiouilliame : thanks for pointing that, I will add these deps in the apt-get line.
27 August 2008 at 5:11 PM
Bonjour ayoli
La version svn de gnome2-globalmenu contient deux patchs, patch.diff et overflow.diff. Dois-je copier ces deux patchs dans le répertoire /debian/patches/ ?
Merci
9 August 2008 at 7:43 PM
Thank you very much,
I have done it successfully and smoothly on Hardy AMD64. I only have one question, why does the upper left corner of my menu always showed “label” caption all the time. Should it be an application name instead? How do I fix it?
14 July 2008 at 12:32 AM
@typpex & ellimistx99 : I had the same problem untill I installed the dev libraries libgnome-menu and gnome-desktop :
sudo apt-get install libgnome2-dev gnome-desktop-dev
Then try :
./configure—prefix=/usr—enable-tracing=no—enable-xfce-plugin=no—disable-maintainer-mode
again and your makefile should be created. Then
make
and so on.
9 June 2008 at 10:14 AM
@Warren Seine: thanks for this useful info, I’ll integrate this to the guide later.
8 June 2008 at 11:33 PM
Le problème avec le changement de permissions de la bibliothèque est un bug connu de checkinstall. Une solution est de désactiver “fstrans”.
The issue with the library file mode change is a well-known checkinstall bug. A solution is to disable “fstrans”.
sudo checkinstall—fstrans=no
7 June 2008 at 10:36 AM
@alanfrank : You can safely ignore this message.
7 June 2008 at 6:32 AM
In the step: “dpkg-buildpackage -rfakeroot” I receive this message:
“gpg: AVISO: permissões inseguras no arquivo de configuração:
`/home/alan/.gnupg/gpg.conf’
gpg: ignorado “Ayoli ”: chave secreta não disponível
gpg: [stdin]: clearsign failed: chave secreta não disponível
dpkg-genchanges >../gtk+2.0_2.12.9-3ubuntu5_amd64.changes
dpkg-genchanges: não inclui o código fonte original no upload
dpkg-buildpackage: binary and diff upload (original source NOT included)
dpkg-buildpackage: warning: Falhou ao assinar os ficheiros .dsc e .changes”
22 May 2008 at 10:23 PM
@anachronox : just remove the gnome2-globalmenu applet package, then reinstall the ubuntu original packages with this command (this forces version) :
sudo apt-get install libgtk2.0-0=2.12.9-3ubuntu222 May 2008 at 2:54 PM
I like this! But I will just wait until more applications are supported.
How do I go back to my previous package configuration if I used the .deb way mentioned above? I try to remove the package in the .tar.gz file (so that I can install the originals from the repository), but they have >1GB of dependancies!
12 May 2008 at 8:54 AM
@Nick : you’re most welcome
12 May 2008 at 8:20 AM
I’ve been waiting for something like this. I could never get the hack to work. Thanks ayoli!
11 May 2008 at 10:34 AM
This method works for Hardy Heron too.
9 May 2008 at 12:46 PM
@ellimistx99 : Actually, I have no clue about this. You aren’t the first to have this issue.
The autogen script gives some errors about m4 files but they can be ignored, then run the configure script with the –disable-maintainer-mode option.
If there’s no errors at the end of the configure, make should work.
8 May 2008 at 9:57 PM
Hello, I tried to do it the “hard way” this time,but right after the autogen part where I have to make, it says, “No targets specified and no makefile found. I tried to do the configure with the—disable-maintainer-mode, and without that. Any ideas? THANKS
1 May 2008 at 10:43 PM
Sans vouloir faire de la mauvaise vonlonté, j’ai l’impression que tes sorties sont tronquées, en tout cas, ne voyant pas d’erreur à la fin du configure, je ne sais pas trop quoi te dire.
A priori, ton erreur initiale (ton precedent commentaire) indique qu’il n’y a pas de Makefile (fichier contenant les regles de compilation et, généré par le script configure).
As tu bien installé toutes les dépendances requises (les lignes apt-get install du guide) ?
1 May 2008 at 4:45 PM
Merci de bien vouloir m’aidé :
)- sortie de ./autogen.shhttp://rafb.net/p/TgMqGy33.html <
http://rafb.net/p/LP1B5×49.html < —sortie de ./configure
1 May 2008 at 2:22 PM
Ce genre d’installation n’est pas trop recommandée pour les nouveaux utilisateurs, mais je vais qd meme essayer de t’aider.
Qu’as tu obtenu comme résultat des deux commandes précédentes (avant make, a savoir ./autogen.sh et ./configure.sh suivi de ses parametres) ?
As tu bien respecté les étapes de la procédure ?
1 May 2008 at 11:37 AM
Bonjour,
Etant un tout nouveau utilisateur de linux, j’ai installé ubuntu hardy heron à l’aide wubi.exe et j’ai suivi ta procédure pour avoir le macmenu sous hardy heron hors j’ai un petit probleme arrive à l’étape ou il faut faire make. J’ai ce message quand je tape make :
typpex@typpex-laptop:~/globalmenu-install/trunk$ make
make: *** Pas de cibles spécifiées et aucun makefile n’a été trouvé. Arrêt.
As-tu une idée de pourquoi je n’arrive pas a compiler ?
30 April 2008 at 9:31 AM
the deb packages way is only for gutsy, you should use the other method.
30 April 2008 at 1:45 AM
Hi, great guide here, I tried your “deb package way” to install global menu. Everything worked except for when I restarted my session and I add the global menu to my bar, the only thing I can get it to show is the Title, and not the “File Edit View…”. I am currently using Hardy 8.04. If you can, please email me. Thanks,
27 April 2008 at 9:23 PM
Glad you manage it, even if it is really weird that sudo checkinstall fails but not sudo make install.
You should have run a “make clean” before running again the autogen and configure with th—disable-maintainer-mode option.
27 April 2008 at 8:37 PM
Never mind. I got the applet to work. I restarted at ./autogen.sh, used the original configure line, and used “sudo make install” instead of “sudo checkinstall.”
I had global menu applet installed prior to upgraded to Hardy, though.
27 April 2008 at 8:06 PM
I appended the configure line with the disable text but checkinstall still complains about the libgnome
25 April 2008 at 2:05 PM
@ernest: Sorry for the late answer. Make install didn’t install all files you should have missed the messages that told you to recompile without maintainer-mode.
here’s the solution (for tiagozc also) :
Restart the applet install at configure step and append the parameter—disable-maintainer-mode to the configure commande so it will look like this :
./configure—prefix=/usr—enable-tracing=no—enable-xfce-plugin=no—disable-maintainer-mode
Then, do all steps after and it should work.
25 April 2008 at 1:12 PM
same problem as ernest
i tried install in the new Ubuntu 8.04 and when i run checkinstall he complains about libgnomenu.a and don’t work
some suggestion?
thank you
15 April 2008 at 12:45 PM
Hi!
I have encountered some problems while following the steps described in this guide. I am using Debian testing and compiling from source.
The first problem is that checkinstall doesn’t seem to work. It complains about some “libgnomenu.a” file not existing and aborts operation. So, I had to install with “make install”.
Then I load the globalmenu applet and it loads correctly. The only problem is that when I start a GTK application I get the following message:
Gtk-Message: Failed to load module “libgnomenu”: (null)
The application starts but its menu shows up in the window and not in the globalmenu applet as it is supposed.
11 April 2008 at 7:13 PM
@Derek : you should talk about your issue here : http://code.google.com/p/gnome2-globalmenu/issues/detail?id=62
11 April 2008 at 6:56 PM
I got this to compile on 64 bit by temporarily moving all ”.a” files out of the lib directory… I’m not a linux C guru or anything but apparently ”.a” files are not usable in amd64 architecture, even though the linker tries ”.a” files before ”.la”, ”.so”, etc.
But even with everything compiled and installed, the menus don’t show up in the applet, and when I add the GTK_MODULES environment variable, some of my panel applets (like the main menu, volume control, and window switcher) don’t show up at all!
27 March 2008 at 12:10 AM
rainwoodman (the main dev of globalmenu project) also want this to work on 64bits boxes. I think he is close to manage this.
If you want to help you can try to compile the latest revisions, and give some precise feedback in the ubuntuforums thread or on globalmenu site.
26 March 2008 at 7:47 PM
Is anyone trying to make this work for amd64 boxes, I would really like to use ‘Global Menu’. If I could I would help you out but coding is beyond my knowledge :(.
14 March 2008 at 3:46 PM
Actually, as I use the deb-src package as source to build gtk, all control files are ready, I only need to copy the patch in the right debian/patch directory and edeit the series file to add the patch to it and edit the changelog to increase the release name (where I append adq also).
That is easier for me.
Though, if someone (fengshenx for ex) waant to build the debs from scratch and latest gtk source, why not if all official debian patches used on ubuntu/debian are added and all packages built (even these that aren’t installed by default, this to avoid conflicts). Then we may make for a repository on http://ppa.launchpad.net.
14 March 2008 at 2:41 PM
http://www.debian.org/doc/maint-guide/ch-dreq.en.html
At the paragraph on Dependency. Debian uses ‘Replace’ for ‘Obstacle’
14 March 2008 at 2:39 PM
For point 4:
Yes, if you don’t think editing the control files every time for everybody is boring.
For point 2:
First of all, because this is a patched GTK, it is different from ordinary GTK. It is not only a different release or different build. Using the same name will tend to introduce confusion.
There are the essential lines in the .spec file for building RPMs.
Name: gtk2-aqd
Version: {svn_version}.{base_version}
Release: 1%{?dist}
Provides: gtk2 = {base_version}-{release}
Obsoletes: gtk2 < = {base_version}-{release}
The final package name is similiar to gtk2-aqd-0.4.svn657.2.12.5-1.fc8.
As you can see, both the GTK version, the aqd patch version is there. And the package name is gtk2-aqd.
There are three pros and no cons:
0 when installing gtk-aqd, gtk with a less version is automatically removed.
1 when GTK update is released, gtk-aqd won’t be automatically replaced.
2 when new gtk-aqd arrives, one can use rpm -U to upgrade it. The dependency problem is automatically handled.
I also don’t see any confiction with a strict package naming rule. If the naming rule is strict, and we are making a package that is different from gtk, why don’t we pickup a new name?
I think in debian there is one or two keywords that has the same meaning of RPM’s Provides and Obstacles.
14 March 2008 at 12:29 AM
Thanks for your works and comments rainwoodman
About the 2nd point : debian and ubuntu have a strict package naming policy, I’m not sure that changing the name is a good idea.
I think we just have to inscrease the release number (the number after the ubuntu word in the package name) to have something like :
libgtk2.0-0_2.12.0-1ubuntu3.1adq_i386.deb
3rd point : good idea.
4rth point : I’m not sure to understand. If you meant a debian control file to build gtk with the gtk-adq patch, I don’t think it is neccessary since debian/ubuntu source packages come with all the needed debian files to build them, only need to add the patch and upgrade the changelog file.
I you meant a debian control file to built the libgnomenu and the server (applet), that could be a great idea.
On the way, I think libgnomenu and the applet should be built as separate packages.
Cheers and keep up the good work
13 March 2008 at 11:00 PM
A sample link to the download page.
http://code.google.com/p/gnome2-globalmenu/downloads/list?can=2&q=ubuntu&colspec=Filename+Summary+Uploaded+Size+DownloadCount
13 March 2008 at 10:59 PM
It is very nice!
A few points. Most of them is just potential change of the project, but might need to guide to change too. I always believe the further potential changes one knows the stabler code one can write.
1.
In the latest svn (7xx+), source code of gtk-aqd patch is installed when you do a make install. they are located at:
/usr/share/doc/gnome-globalmenu/gtk+-aqd
you might want to update the page when new debs for 7xx+ is built.
2.
I tend to change the debian’s package naming to make it more resonable and solve package version problem, when I get a chance to talk to fengshenx.
3
I’ll suggest you use a link to the project download page to list every packages has ubuntu in the keyword, so that If a new package is realeased you don’t need to update the page.
4
For rpm build, the .spec file(similiar to debian control files) is provided in the svn(for gtk-aqd). I am looking forward to merge the debian control files for gtk-aqd to svn, too). This might also leader to a future change in the wiki.
13 March 2008 at 2:13 AM
you’re welcome
Yes, the new global menu have an option to show the application name in bold.
No, the underlines requires another patch to gtk. I used it before, so I maybe include it in this guide soon.
13 March 2008 at 1:45 AM
Hey, thanks for the macmenu tip from the other day.
Just have two questions..does this new global menu include the application title in the menubar? (ie Epiphany bolded before File Edit..etc) Is the bleeding edge version of global menu one without underlines in the menubar?
Thanks again.