I’m Just an Avatar

Nanci Barthelmess’ blog

[UPDATED] Get the GlobalMenu without all of the hassle

Posted by Peng on 26 November 2008

[We have a change in the URI for the GlobalMenu Team PPA. See below. And I've (finally) updated the package name. -Peng]

One of the things users of Mac4Lin (as well as others) love is the GlobalMenu, which used to be known as the MacMenu. The one pain in the rump is trying to get the damned thing installed, because it invariably involves compiling it from source and the very large possibility for spending a bit of time in dependency hell.

But not anymore. I found a link to a part of the Google Code site for the GlobalMenu code. They have packages for several distros as well, and while they have packages for Ubuntu Gutsy they have installation instructions that include using a PPA for Ubuntu Intrepid. But rather send you over there and risk your getting a side trip through Dependency Hell I’ll give you some nice easy steps to follow for users on Ubuntu Intrepid. There’s a new URI for the GlobalMenu Team PPA. I’ve updated the data to put into your sources.list below.

Dependencies are a bugger

NOTE: Vala, a dependency for GlobalMenu, is available in a Launchpad PPA. If you want to skip the section on compiling Vala read this post and then jump down to the heading “Not so fast… I was following this tutorial to try to get GlobalMenu working before I found the PPA so I already had Vala installed. There are some dependencies that you need to have met before installing Vala so fire up your favorite command line app and run this:

sudo apt-get install build-essential flex bison gnome-common libglib2.0-dev gtk-doc-tools autoconf2.13 automake1.9 libgtk2.0-dev libdbus-glib-1-dev libwnck-dev libpanel-applet2-dev

Before you close your terminal let’s get Vala installed so let’s follow ayoli’s instructions for installing it. (The dependencies you just met are also from ayoli’s site.)

cd ~/
wget -c http://download.gnome.org/sources/vala/0.5/vala-0.5.1.tar.bz2
tar xjvf vala-0.5.1.tar.bz2
cd vala-0.5.1/
./configure
make
sudo make install # (for some reason, checkinstall doesn't work here)
sudo ldconfig

Not so fast…

You need to make sure the libgnomenu GTK module is loaded, but there’s an easy way to do it. Create a file in your root folder called ~/.gnomerc, and open it in your preferred text editor and paste the following into the file.

# Uncomment to load the GTK module

# export GTK_MODULES=globalmenu-gnome

# Uncomment to tell the GTK module to open a Gtk

# TreeView for all menus in the application you start.

# export GNOMENU_FUN=1

# Uncomment to disable global menu.

# export GNOMENU_DISABLED=1

# Uncomment to print a lot of debugging messages

# export GNOMENU_VERBOSE=1

# Uncomment to save the debugging messages to the given file.

# export GNOMENU_LOG_FILE=/tmp/gnomenu.log

# uncomment to disable the plugin for specific programs.

# export GTK_MENUBAR_NO_MAC="fast-user-switch-applet"

You’ll need to uncomment the particular lines you want to use. To use the GlobalMenu you’ll need to disable uncomment the line to export the GTK module, but the rest are up to you.Updated 13 February 2009 8:05am: You no longer have to uncomment the first line for GlobalMenu to work. Now you can comment/uncomment that and all other lines via the new settings window, which is just a right click away.

I tried using the option to use the GTK TreeView but it opened a new window and I had absolutely no clue what it did so I disabled it. I do, however, save the debugging messages, and I had them saved to a file in my /home folder just so I can find it more easily.

Now to install GlobalMenu

You need to add a pair of entries to your apt sources.lst file. Updated URI for the GlobalMenu Team’s PPA, posted 3 December 7:30 am, pointed out by Ali Servet Dönmez.

deb http://ppa.launchpad.net/globalmenu-team/ubuntu intrepid main
deb-src http://ppa.launchpad.net/globalmenu-team/ubuntu intrepid main

Save the file and close it, and you’re just about ready to install GlobalMenu. I forgot to post it because I do it automatically, but first you need to run

sudo apt-get update

and then you can run

sudo apt-get install gnome2-globalmenu
sudo apt-get install gnome-globalmenu

Updated 13 February 2009 8:05 am: The package name has been updated to reflect the current name of the package. Sorry about that, and thanks to nicad for reminding me that I hadn’t changed it yet.

Now restart your system log out* and and when you log back in there will be one detail left to take care of. If you have a panel menu on your upper panel remove it and right click on your panel, select Add to panel… and add the GlobelMenu Panel Applet. Now you’ll find the menu for whatever window you’re using showing on your panel. There is a list of compatible applications, but it’s easier to say what won’t work with it. Any applications that don’t use GTK will keep their menus inside their windows. Namely that means any KDE app you use (such as Amarok), OpenOffice.org and Mozilla’s Firefox and Thunderbird. Any applications you run with sudo permissions (like Synaptic) won’t use GlobalMenu either, but that’s a safety precaution.

Here are a couple of screenshots of my system after I installed GlobalMenu.

My desktop with the GlobalMenu
My desktop with some details in the AWN Terminal

My GlobalMenu desktop plus Firefox 3 and Nautilus
My desktop with Firefox 3 and Nautilus running. You can hide your menu in Firefox with the Hide Menubar add-on, but I have to warn you not to disable it without first using View > Toolbars > Mainmenu Toolbar. Otherwise you’ll find that your menus are hidden when you’ve restarted Firefox with no way to bring them back.

If you use Mac4Lin…

The normal themes for Mac4Lin are missing some components that make a difference for using GlobalMenu. You should either install the MacMenu version of the Mac4Lin GTK themes, or if you’re using Mac4Lin ver.1.0 RC1 simply use System > Preferences > Appearances > Customize to select the Mac4Lin_MacMenuv1.0RC control set, then save the modified theme. Now you’ll be able to enjoy even more OSX-like goodness.

*-Thanks to BobCFC for letting me know in his comment that you only need to log out, not reboot, to get it working. I thought it was just logging out but I did a reboot to clear up other things and I didn’t want to risk telling you the wrong thing.

28 Responses to “[UPDATED] Get the GlobalMenu without all of the hassle”

  1. Hans said

    So GlobalMenu works with newer versions of Vala than 0.4 now?

  2. Peng said

    It sure does. And I have to say, the last time I tried the GlobalMenu I wasn’t that thrilled with it, being an old Windows user than a Mac guy, but this time I’m really enjoying it.

  3. Jolinar said

    So am I correct in assuming this will wotk with 8.10 Intrepid x86_64?

    As you have made no distinction between 32 bit & 64 bit. I’m a little concerned that if I try what you’re suggesting it will just fail. I have recently installed 8.10 Intrepid x86_64 and would like to use GlobalMenu. But I want to know if it is compatible with 8.10 Intrepid x86_64.

    If someone could please verify this I’d be very grateful.

    thanks in advance.

  4. Peng said

    Sorry about that. As an x86 user I keep forgetting that a lot of people need 64-bit versions of programs. Although if you had checked the instruction page for installing from the Ubuntu PPA that I linked to at the top of my post you’d see this bit of bad news

    There are no 64-bit Ubuntu packages yet. You can build from source by yourself.The latest revs seems to be compatible. For more information, see Issue 149

    But I double checked the PPA listings and saw that they do have a 64-bit version built of gnome2-globalmenu – 0.6.1510-0ubuntu2. So you should be able to get things running as long as you are able to satisfy the dependencies.

  5. PPA for GNOME GlobalMenu Team doesn’t seem to have no packages as of 1 Dec 2008 at 01:40 (GMT+1). I hope this is temporary…

    In order to install vala with checkinstall I had to create four directories manually with sudo (or root if you prefer):


    * /usr/local/include/vala-1.0
    * /usr/local/share/vala
    * /usr/local/share/devhelp
    * /usr/local/share/devhelp/books

    Regards,
    Ali Servet Dönmez

  6. ayoli said

    Hi there,
    I added a link to your post for those who want debs.
    Shame that the PPA dooesn’t provide the required vala package.

  7. Peng said

    @Ali:
    Holy crap, you’re right. I hadn’t noticed that it was down, even when I was refreshing my package list to install the Vala packages. I haven’t seen anything about what’s happened but I join you in hoping it’s just a short-term borking.

    @Ayoli:
    Thanks to your comment I found a PPA that does have Vala. It’s all your fault. :)

  8. Btw is it necessary to remove panel menu from panel in order to add global menu?

  9. Peng said

    Only if you have a limitation of available space. Remember, the Global menu will want as much horizontal space as the longest set of menus plus the length of the name of the program that uses it. I find Gimp wants more space than I have available and while GlobalMenu has an arrow showing that there are more menu items there’s currently no way to access any hidden menu item. It’s a pain but they’re working on it.

  10. I have gnome2-globalmenu (0.6.1510-0ubuntu1) and vala (0.5.1-1) installed, plus ~/.gnomerc file with only export GTK_MODULES=globalmenu-gnome uncommented.

    Then I’ve rebooted several times, but can’t see no GlobelMenu Panel Applet in Add to Panel window; probably because gnome2-globalmenu_0.6.1510-0ubuntu1_i386.deb package from PPA gnome2-globalmenu has nothing in it…

    Any ideas?

    @Peng: How did you get this thing installed & run after all?

  11. Maybe I should use PPA for Globalmenu Team instead, where there’s a package called gnome2-globalmenu - 0.6.1634-0ubuntu2 published in 2008-12-01…

  12. Peng said

    It looks like they changed the URI for the PPA. Go ahead and use the http://ppa.launchpad.net/globalmenu-team/ubuntu source. Thanks for bringing it to my attention. I’ll make the change on my post and and make sure ayoli knows about the URI change.

  13. BobCFC said

    Just a note about the wording of the .gnomerc section:

    “You’ll need to uncomment the particular lines you want to use. To use the GlobalMenu you’ll need to disable the line to export the GTK module”

    To a programmer, ENABLING a line means UNCOMMENT. DISABLE=COMMENT (so it is ignored by computer).

    When I followed this literally it did not work, I had the Program Name in the panel but no menu… ie it should say

    “you’ll need to enable the line to export the GTK module”

    Otherwise great article I have both PPAs working on 8.10 64bit didn’t need to compile anything.

    (also logout is enough no need to reboot)

  14. Peng said

    I guess that shows I’m no programmer. :) Although if I had looked at it as I do my sources.list I may have stated it as enable but I usually use the GUI.

    I’m not sure why it didn’t work properly for you. They may be able to help you on the GlobalMenu thread on the Ubuntu Forums.

    And thanks for the note about the restart. I’ll make the changes in my OP.

  15. azwar said

    Peng,

    I’ve follow exactly the ~/.gnomerc but only the apps name appear not the menu panel. so I’ve changed it to only “export GTK_MODULES=globalmenu-gnome” without #. It’s load perfectly but sometimes the global menu disappear and need reload(globalmenu-gnome). Is there anything wrong to the ~/.gnomerc i’ve changed.

    ~/.gnomerc is a hidden file in your /home/azwar/.gnomerc. I’ve wrongly put this file on the root /root/.gnomerc before. Why!!! coz I’m no programmer just the regular end user without any technical knowledge commands. Hope you can explain a further details in your next posts. Thanks.

    • Peng said

      I’m afraid you’ve gone past the abilities of my brain. I know Linux distros usually don’t need restarts nearly as often as Windows do, but if you haven’t restarted since installing GM, or haven’t restarted in a few days or so, I’d do a restart to clear out the memory and see how things go.

      Beyond that I’d recommend posting your issue on either the GlobalMenu thread on Ubuntu Forums or on the Google Code section for the Global Menu. One of those sites should have someone who’s seen what you’re dealing with an should be able to help you. Unfortunately most of my posts deal strictly with things that I’ve seen on my own system, or the occasional thing I’ve seen on the UForums, but I’m not a coder and don’t have a clue beyond what I’ve read elsewhere as to what’s going on that could cause problems.

      Sorry I can’t be of more help.

  16. Jonathan said

    Thanks for this info. I found it helpful.
    I am wondering though, how do I remove and/or move the global menu? Mine is in the wrong position (kinda in the center) and I can’t find any way to move it or remove it (in order to place it there again).
    Thanks,
    Jonathan

  17. Peng said

    You should be able to right click on it and select Move, but if you have either it locked you’ll have to unlock it first. You may also have problems moving it past any locked applets, but what you can do is to remove the one you have there now, then right click on an open space and drag the GlobalMenu applet right to where you’d like it to go.

  18. Rares Marian said

    The new 0.7.2 packages are empty. What giveth?

    • Peng said

      I’m not sure since my power supply died last month and I’m not able to keep up with what’s going on in the GNU/Linux-Ubuntu communities as a result. My system should be back up before too much longer and when it is I’ll try to find out what’s going on with the new packages, although I think I switched to Subversion code a few weeks back. I’ll post what I am able to find, but I’d recommend checking the support link(s) in my OP for faster info.

  19. Rares Marian said

    Now it comes up with no content in the applet I have to blindly right click to find it and the preferences window has no buttons.

    • Peng said

      I’ve seen several people report that issue on the GM support thread over on the Ubuntu Forums but I’m not experiencing it myself in svn builds as of a few weeks ago. For some odd reason I lost the ability to successfully build from svn right before my power supply died and yesterday I ended up grabbing version 0.7.2 from the PPA and it’s working fine.

  20. nicad said

    the “gnome2-globalmenu” package is not in the repository. I have tried removing and re-adding the repository, but nothing seems to work.

  21. Peng said

    D’oh! Sorry about that, Nicad. I meant to go back and update the package name but somehow it never made it to my todo list. It’s fixed now.

  22. Cris said

    My firefox does not integrate with globalmenu. How did you make yours work?

    • Peng said

      My Firefox doesn’t work with GlobalMenu either. I did, however, use the Hide Menubar extension to hide the Firefox menubar. The link for the extension is just below the screenshots. It uses a hotkey to show the menubar when you need to use it, and otherwise it gets out of the way when you don’t need it in order to give you the menuless look.

    • Chupacabra said

      Firefox uses a different rendering engine that is wrapped with some fancy XML to make it look like a GTK+ app.
      Firefox will not work with globalmenu. :(
      *wah, wah, waaah

      • Peng said

        Yeah, Mozilla apps are known issues like that. At least they’re not as bad as Google, who puts out supposedly GNU/Linux versions of apps that are simply Windows versions of apps with it’s own installation of WINE.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>