Le populaire hack gtk ainsi que l’applet imitant le menu mac n’est plus maintenu par son créateur original AdQ.
Heureusement, rainwoodman a lancé un nouveau projet basé sur le hack et l’applet d’AdQ (maintenant totalement réécrit) : globalmenu.
Maintenant, les menus sont détaché à l’applet du tableau de bord uniquement si celle ci est lancée et, les raccourcis claviers (par ex: Alt+F) sont fonctionnels.
Voici un petit guide avec deux méthodes possible pour installer global menu Ubuntu.
/!\ WARNING : Ce tutoriel fonctionne seulement avec la serie 0.4 de globalmenu (svn revision environ 980) et en fonctionne probablement pas avec Ubuntu Intrepid, Lisez Le nouveau tutoriel pour la serie 0.6
Attention : quelle que soit la méthode choisie, avant d’essayer ce truc maléfique, lisez très attentivement les instructions et rappelez vous que globalmenu est un logiciel alpha !
si vous rencontrez des problèmes, esssayez de demander de l’aide ici
Installer global menu à partir des paquets deb
Avertissement : cette méthode ne fonctionne qu’avec gutsy (ubuntu 7.10) 32 bits. Il n’y a actuellement pas de paquets pour les systèmes 64bits en raison d’un problème de compilation
téléchargez le pack gnome-globalmenu-0.4.2_ubuntu-gusty-svn679.tar.gz ici (le numéro svn peut évoluer) :
Partant du postulat que vous avez téléchargeé le pack dans le dossier personnel de votre utilisateur (/home/username), sinon copiez le à cet endroit.
Ouvrez un terminal (menu Applications>Accessoires>Terminal) et appliquez les commandes suivantes (utilisez copier / coller pour éviter les fautes de frappe):
décompressez les packages :
tar xzvf gnome-globalmenu-0.4.2_ubuntu-gusty-svn679.tar.gz
puis allez dans le répertoire ou les paquets on été extraits :
cd gnome-globalmenu
maintenant, installez ces paquets avec la commande suivante :
sudo dpkg - *.deb
à cette étape si vous rencontrez des erreurs, essayez cette commande :
sudo dpkg -i --force-overwrite *.deb
ensuite, editez (ou créez) le fichier ~/.gnomerc :
gedit ~/.gnomerc
ajoutez cette ligne au fichier :
export GTK_MODULES=libgnomenu
sauvegardez et quittez gedit.
Enfin, redémarrez votre session gnome, ajoutez l’applet global menu à votre panel (ou tableau de bord) (clic doit sur une partie vide du panel et choisissez “ajouter au tableau de bord” dans le menu).
C’est tou, vous devriez maintenant avoir les menus de vos applications dans le tableau de bord.
compilez vous même la version la plus récente de global menu.
Attention: il y a un problème de compilation sur les système 64bits, si vous arrivez à compiler sur un système 64bits merci de poster ici
Ouvrez un terminal (menu Applications>Accessoires>Terminal) et appliquez les commandes suivantes (utilisez copier / coller pour éviter les fautes de frappe):
d’abord, installez les outils de configuration et compilation neccessaires :
sudo apt-get install build-essential autoconf automake1.9 subversion fakeroot checkinstall
créez un répertoire :
mkdir globalmenu-install
allez dans ce répertoire :
cd globalmenu-install
récupérez le code source avec subversion :
svn co http://gnome2-globalmenu.googlecode.com/svn/trunk/ gnome2-globalmenu-applet-0.4.2
allez dans ce répertoire :
cd gnome2-globalmenu-applet-0.4.2/gtk+-aqd/
récupérez le code source de gtk2.0 :
apt-get source libgtk2.0-0
et les dépendances requises pour compiler gtk :
sudo apt-get build-dep libgtk2.0-0
copiez le patch dans le répertoire debian dans le répertoire du source gtk :
(note: Ceux qui ont gutsy voudront plutot utiliser le patch.diff ici, téléchargez le et extrayez le dans le répertoire indiqué ci dessous au lieu de copier celui du trunk)
cp patch.diff gtk+2.0-2.12.0/debian/patches/
editez le fichier series :
gedit gtk+2.0-2.12.0/debian/patches/series
ajoutez ceci à la fin du fichier :
patch.diff
sauvegardez et quittez gedit.
editez le fichier chanlog pour avoir un numéro de release (le numéro après le mot ubuntu word dans le nom du paquet),
ceci a pour but d’eviter que l’outil de mise à jour veuille re-installer les paquets gtk d’origine.
gedit gtk+2.0-2.12.0/debian/changelog
ajoutez ceci au tout début du fichier (respectez l’indentation et la la ligne vide apres la ligne mail/date line ou vous aurez une erreur à la construction) :
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;" />
sauvegardez et quittez gedit.
allez dans le répertoire du source gtk2.0 :
cd gtk+2.0-2.12.0maintenant vous êtes prêt à compiler gtk, c’est parti :
dpkg-buildpackage -rfakerootnote: ce processus va prendre environ 30 min de votre vie. Une fois ceci fini, remontez d’un répertoire et, installez les paquets deb :
cd .. && sudo dpkg -i *.debremontez encore d’un répertoire :
cd ..avant de compiler l’applet, installez les dépendances requises :
sudo apt-get install libgconf2-dev libpanel-applet2-dev libwnck-devmaintenant vous pouvez lancer autogen.sh :
./autogen.shpuis le script configure :
./configure --prefix=/usr --enable-tracing=no --enable-xfce-plugin=no --disable-maintainer-model’étape suivante est la compilation :
makepuis installez avec checkinstall (ceci rend une éventuelle desinstallation plus facile) :
sudo checkinstallaprès, lancez cette commande :
sudo ldconfigensuite, editez (ou créez) le fichier ~/.gnomerc :
gedit ~/.gnomercajoutez cette ligne au fichier :
export GTK_MODULES=libgnomenusauvegardez et quittez gedit. Enfin, redémarrez votre session gnome, ajoutez l’applet global menu à votre panel (ou tableau de bord) (clic doit sur une partie vide du panel et choisissez “ajouter au tableau de bord” dans le menu). C’est tou, vous devriez maintenant avoir les menus de vos applications dans le tableau de bord.
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.
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.
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.
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
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
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.
http://www.debian.org/doc/maint-guide/ch-dreq.en.html
At the paragraph on Dependency. Debian uses ‘Replace’ for ‘Obstacle’
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.
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
.
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.
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!
@Derek : you should talk about your issue here : http://code.google.com/p/gnome2-globalmenu/issues/detail?id=62
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.
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
@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.