Home > Computers, Howto, Linux > Installing GNOME 3 on Ubuntu 10.10

Installing GNOME 3 on Ubuntu 10.10

Ok, so I haven’t been totally wasting my time while waiting for Natty to be released (well…after reading this post, you might think that I have been wasting my time!!), so I decided to replace the default GNOME desktop manager with GNOME 3, which was released earlier this month. There are plenty of posts about how to do this, but here is what worked on my installation.

Before I start, I should advise you that GNOME 3 is very different to the previous versions. For a start, it uses Mutter, which is based on Metacity, for compositing. If you’re not a big Compiz fan then this won’t mean much to you; however I was a little emotionally distraught to lose my expo function and easy hot-corner desktop switching. Even if you’re not using Compiz then your muscle memory will still get confused in GNOME 3, because it switches the close button back to the right hand side of the window, rather than the left in newer versions of Ubuntu. If you’ve already followed my previous instructions to set these buttons back to the right, then you’ll have spared yourself the agony that I’m currently going through (ok – so I exaggerate, it’s not like I’m walking across a bed of hot coals or anything!!).

GNOME 3 Window switcher

That being said, GNOME 3 looks very sleek and pretty. It also seems faster than GNOME 2, but that could be because the compositing is now being handled in a more integrated manner, rather than with the Compiz overlay. So, if you want to do this, at the moment your only option is to build from source. Don’t panic – it’s really not as scary as it sounds. Here is the procedure I used (with thanks to the Ubuntu forums and GNOME project page – I managed to put my own install together using the details on both of these resources):

Firstly make sure that gcc is installed. I know this sounds obvious, but just make sure anyway! So, if opening a terminal window and running:

gcc --version

returns an error, then type:

sudo apt-get install gcc

Next, we can install the dependencies that are needed. Just copy and paste the following line:

sudo apt-get install curl libtiff4-dev libgstreamer0.10-dev libcroco3-dev xulrunner-dev mesa-utils mesa-common-dev libreadline5-dev libgl1-mesa-dev libwnck-dev librsvg2-dev libgnome-desktop-dev libgnome-menu-dev libffi-dev libgtk2.0-dev libgconf2-dev libdbus-glib-1-dev gtk-doc-tools gnome-common git-core flex bison automake build-essential icon-naming-utils autopoint libvorbis-dev libpam-dev libgcrypt-dev libtasn1-dev libtasn1-3-bin libgnome-keyring-dev libupower-glib-dev libxklavier16 libxklavier-dev xserver-xephyr python-dev libpulse-dev libjasper-dev jhbuild libgtop2-dev libsqlite3-dev libproxy-dev libdb-dev libproxy-dev libcups2-dev libusb-1.0-0-dev gperf

When they are happily installed, you must – and I mean absolutely must – remove the .la files from /usr/lib and /usr/lib64. It seems that these files contain hard-coded paths, which cause issues with the compilation of your new sandbox installation of GNOME 3. So, let’s get rid of them. The easiest way to do this is:

sudo find /usr/lib*/ -name "*.la" -delete

Trust me that this needs to be done. I didn’t know this at first, and spent a fruitless 3 hours trying to get GNOME 3 to compile properly. It didn’t help that I was watching Arsenal fail to beat Liverpool at the same time, but that’s a different rant altogether.

Still with me…or are you smarting over Arsenal too? Right, then we need to download and execute the setup script, but first add the following to the path:

export PATH=$PATH:/home/YOUR USERNAME/bin

Obviously, replace “YOUR USERNAME” with…your username. the bit before the @ sign in your command prompt, if you’re not sure. When you have done this, then type the following:

cd

wget http://git.gnome.org/browse/gnome-shell/plain/tools/build/gnome-shell-build-setup.sh

chmod +x ./gnome-shell-build-setup.sh

./gnome-shell-build-setup.sh

This will produce a long screen of text, which will eventually bring you back to the prompt. Assuming no horrible errors are reported, then you can proceed to the next step.

jhbuild build

Now go off and do something productive. Leave this running because, depending on the speed of your Internet connection and computer, you could be waiting up to 3 hours for this to complete. I’d say 2 hours would be a reasonable average. So walk the dog, cook and eat a gourmet meal, re-create the Sistine chapel ceiling in your sitting room. Eventually what we’re hoping for is the last line of the output, which says “Success”. If you don’t get that, then have a look at the common problems here.

In the manner of a Microsoft support person, I’m going to assume that you had no problems at all with this procedure, and now are waiting expectantly to see what to do next. To try out GNOME 3, simply type the following:

cd ~/gnome-shell/source/gnome-shell/src

./gnome-shell --replace

This will give you a happy sandbox to play in. It won’t affect your current GNOME installation, and you can test out GNOME 3 to your heart’s content. To get back to your previous window manager, simply switch back to the terminal and hit CTRL-C.

If you have been utterly blown away by the GNOME 3 experience or – like me – you just decide to doggedly persevere until you get it working exactly as you want, then type the following lines to replace GNOME 2 with GNOME 3:

ln -s ~/gnome-shell/install/share/applications/gnome-shell.desktop ~/.local/share/applications/gnome-shell.desktop

gconftool-2 -s /desktop/gnome/session/required_components/windowmanager "gnome-shell" -t string

When you log out and back in again, GNOME 3 will start automatically.

So far, I like the speed and look of GNOME 3, but I need to get an “expo” function working again. It’s (very) early days, but I haven’t even figured out how to shut down the computer yet!! I like the new “System Settings” applet, which is available from the “Activities” menu or the user menu on the right hand side. I also like the way it groups windows and has an automatic “hot corner” at the top left. I’m sure that I’ll come up with some more gripes and fixes in future, so watch this space as I continue to play with GNOME 3!

  1. John Lewis
    April 18th, 2011 at 13:45 | #1

    Not being able to find the shutdown button is a bit of a drawback :)

    I’m test driving Narwhal beta on my production laptop (I know I always did live by the seat of my pants!), the worst thing that happens is hanging when closing the lid and sometimes java hangs in Chromium (but not in Firefox for some reason).

    I think some people may dislike the lack of customisability in Unity, you are sort of forced to use the desktop the way Canonical envisage. It’s not bothering me much, yet. I can always change back to Gnome 2 (or even give Gnome 3 a try) if it starts to itch.

    All good, clean fun.

  2. April 18th, 2011 at 14:59 | #2

    Haven’t installed Narwhal yet, but GNOME 3 is interesting. It seems that I didn’t have the shutdown button because I only had a minimal set of desktop settings. I only had a bare “system settings” menu, rather than the more full-featured “system preferences” option. I’m fiddling with the .desktop files at the moment, because I think that they could hold the key :)

    As you say…all good, clean (if slightly frustrating) fun!

  3. John Lewis
    April 19th, 2011 at 11:27 | #3

    I did try Gnome Shell at an earlier point. I found it difficult to use, or maybe I just wasn’t ready for it. Unity is near enough to existing window managers in use and functionality but far enough away to evolve the paradigm. At a more practical level I don’t like waste and Unity makes the best use of screen real estate I’ve seen so far, except for maybe Android.

    Tell you what, I’ll see if I can install Gnome 3 on Narwhal to see how it’s moved on.

  4. Philip McCaffrey
    April 19th, 2011 at 11:47 | #4

    Excellent tutorial as always Matt, thanks a mill.

    Installed gnome 3 on my work machine (could not resist). I very much like where gnome is headed its very intuitive. Multiple monitors seems to be an issue as the desktops don’t seem to keep track of both displays at the same time. This means that you only have multiple desktops on one of your monitors, the other remains fixed (I have not rebooted my machine in some time though so i may find this changes once I fully replace gnome.

    The shutdown option is not available because the system detects if suspend is available and removes the power off option. Its a “feature” see the Hard ware integration video on the gnome website.

    Thanks again

  5. April 19th, 2011 at 12:11 | #5

    Thanks Phil! Good to see you on Saturday. Thanks for the extra info on the shutdown command as well. I got around this by just reconfiguring the power button behaviour to shut down the machine. Haven’t tried on multiple monitors yet, but I’ll be interested to see what you find.

  6. John Lewis
    April 19th, 2011 at 12:11 | #6

    Just tried Gnome 3 and here is what I have to report.

    First of all likes:-

    1. Activities – the way you can hover over it and it brings up Windows and Applications, anything that saves the old RSI from left finger clicking is good in my book.
    2. The task list window which pops up on mouse hover is nice.

    Dislikes:-

    1. Fonts aren’t as nice and readable as Unity
    2. Fonts are too small in certain windows, I am specifically thinking of the “Applications” bit.
    3. Switching between “Windows” and “Applications” is slow (maybe that is just restricted to paupers with an Intel graphics chipset).
    4. The desktop doesn’t seem particularly well organised, it’s too spread out.
    5. Screen estate isn’t maximised by integrating application menus.

    Perhaps some of this is to do with the way the guys in the PPA have it configured. My feeling is that Gnome 3 has a long way to go before it is as polished as Unity. Might try it again in 6 – 12 months.

    BTW to anyone brave (read: stupid) enough to try the Gnome 3 PPA without a care as to how you are going to uninstall the packages and revert to Unity in Natty Narwhal, use “ppa-purge” i.e. install it and type the following command.

    ppa-purge ppa:gnome3-team/gnome3

    Say yes to the solution and cross your fingers, I’ll tell you when I’ve rebooted if all is well :)

  7. April 19th, 2011 at 12:16 | #7

    Interesting…I’m about to try Natty, so it will be interesting to compare. My Dell Studio has an Intel chipset, and G3 seems faster than G2, but I do have a lot of compiz effects enabled (thanks to Phil!)

    I believe that the ppa-purge command is supposed to work, and I’m about to write a quick post as to how to revert to GNOME 2 on 10.x.

    Thanks for your comment as always. Hope things are going well for you :)

  8. John Lewis
    April 19th, 2011 at 12:16 | #8

    It seems to have gone back successfully. If I find any problems I’ll post here.

  9. John Lewis
    April 19th, 2011 at 12:18 | #9

    @Matt Rudge

    You’re welcome Matt. We’re all well, weather is fabulous, nothing worth complaining about. Hope life in Wicklow is treating you good.

  10. John Lewis
    April 19th, 2011 at 12:34 | #10

    @Matt Rudge

    The biggest single improvement I’ve found with Natty is the way that wireless connection now only takes a few seconds after boot where it used to take 30 odd on a Broadcom 4312 chipset.

    The biggest single problem is not having handy icons next to the clock for some apps which benefit from it. I’m thinking of Remmina and Hamster Time Tracker here. Apart from having to adjust my workflow for that I’m used to Unity now.

    Oh and a little tip if you want to add something to the launcher/taskbar, simply start the app so it appears there, right click on the app icon and choose “Keep In Launcher”. It wasn’t completely obvious to me on how to do that. Hope this helps someone.

  11. April 19th, 2011 at 12:39 | #11

    @John Lewis

    Thanks again, John. We’re in Dublin now actually – we moved up from Wicklow in January, so getting used to life in the big smoke :)

    I’ve had a little bit of experience with Unity, setting up Maverick on a couple of Acer netbooks. I was impressed by its use of screen real estate on such a compact display – it will be interesting to see how it translates to the desktop.

  12. John Lewis
    April 19th, 2011 at 17:02 | #12

    @Matt Rudge

    Congrats on the move, did Google finally poach you?

    They contacted me but I don’t know enough Perl or Python and rely on Google’s web search for my Linux facts, still it was exciting being contacted by them!

  13. Philip McCaffrey
    April 19th, 2011 at 17:39 | #13

    Power issue SOLVED: Hold ALT and “Suspend” will turn to “Power Off…”

  14. April 19th, 2011 at 19:28 | #14

    It’s throwing an error for me, sadly. “GNOME 2.26 or newer is required to build GNOME Shell.” I’m running 2.32 though. Ideas?

  15. April 19th, 2011 at 20:56 | #15

    @Ryan

    Is your Ubuntu installation an upgrade or was it a clean install? What happens if you run:

    gnome-session --version

    in a terminal window? You might have to install gnome3-session to get the correct session manager version:

    sudo apt-get install gnome3-session

    Hope this helps!

  16. April 19th, 2011 at 22:09 | #16

    @Matt Rudge
    Output is as followed:
    ryan@Euripides:~$ gnome-session –version

    progname=gnome-session; RGBA=on
    gnome-session 2.32.0

    It was an upgrade and not a clean install, but I don’t thing any remaining elements from pre-2.26 are there. I’ll try the gnome3-session.

  17. April 19th, 2011 at 22:25 | #17

    @Matt Rudge
    …Ok, that crashed my system. Whoops. Luckily, I hadn’t disconnected from the wireless on campus and was able to remove gnome3-session and reinstall the default. Looks like I’m out of luck with Gnome Shell…till I get my new laptop and install Ubuntu 11.04. (I’d install it on here, but I do not want to deal with setting up Intel HD Audio drivers again…)

  18. April 19th, 2011 at 22:51 | #18

    @Ryan
    Strange!! What output do you get if you copy and paste the following command:

    gnome-session --version 2>/dev/null | (read name version && echo $version)

  19. Andrey
    April 20th, 2011 at 17:45 | #19

    Terminal has stopped on the 15 package of 41.(((((
    What to do? Start all over?

  20. Andrey
    April 20th, 2011 at 17:47 | #20

    make[1]: Вход в каталог `/home/andy/gnome-shell/source/gconf’
    make[2]: Вход в каталог `/home/andy/gnome-shell/source/gconf’
    make[2]: Цель `install-exec-am’ не требует выполнения команд.
    test -z “/home/andy/gnome-shell/install/share/aclocal” || /bin/mkdir -p “/home/andy/gnome-shell/install/share/aclocal”
    /usr/bin/install-check -m 644 gconf-2.m4 ‘/home/andy/gnome-shell/install/share/aclocal’
    mkdir -p /home/andy/gnome-shell/install/etc/gconf/gconf.xml.defaults
    chmod 755 /home/andy/gnome-shell/install/etc/gconf/gconf.xml.defaults
    mkdir -p /home/andy/gnome-shell/install/etc/gconf/gconf.xml.mandatory
    chmod 755 /home/andy/gnome-shell/install/etc/gconf/gconf.xml.mandatory
    test -z “/home/andy/gnome-shell/install/lib/pkgconfig” || /bin/mkdir -p “/home/andy/gnome-shell/install/lib/pkgconfig”
    /usr/bin/install-check -m 644 gconf-2.0.pc ‘/home/andy/gnome-shell/install/lib/pkgconfig’
    make[2]: Выход из каталога `/home/andy/gnome-shell/source/gconf’
    make[1]: Выход из каталога `/home/andy/gnome-shell/source/gconf’
    *** Checking out libgweather *** [15/41]
    git clone git://git.gnome.org/libgweather
    Initialized empty Git repository in /home/andy/gnome-shell/source/libgweather/.git/
    remote: Counting objects: 6581, done.
    remote: Compressing objects: 100% (2862/2862), done.
    ваварааапапапапаs: 28% (1896/6581), 1.66 MiB | 422 KiB/s

  21. Andrey
    April 20th, 2011 at 17:48 | #21

    20 minutes at the moment

  22. Stephen
    April 21st, 2011 at 15:53 | #22

    at 8th make , i got a missing lgssapi_krb5

  23. April 21st, 2011 at 18:45 | #23

    Are you running a 32-bit or 64-bit version of Ubuntu?

  24. Jessica
    April 21st, 2011 at 21:14 | #24

    Thank you so much for these instructions! I decided to upgrade to GNOME 3 yesterday and had all sorts of problems until I found this guide. It worked like a charm!

    I only have one unresolved issue. I followed your instructions for getting GNOME 3 to start up automatically upon login (tried several times, actually), without any luck. My windows manager is listed as gnome-shell and the “gnome-shell.desktop” files seem to be in their correct locations. I really like the shell interface and can’t wait to use it as a default, so any suggestions that you might have would be very welcome.

    Thank you so much!

  25. April 21st, 2011 at 22:21 | #25

    Odd…can you post the contents of the gnome-shell.desktop file that’s in your ~/.local/share/applications directory, please? Glad it worked this far, though :)

  26. Jessica
    April 21st, 2011 at 22:41 | #26

    @Matt Rudge

    Sure thing! Here it is:

    [Desktop Entry]
    Type=Application
    Name=GNOME Shell
    Comment=Window management and application launching
    Exec=/home/jessica/gnome-shell/install/bin/gnome-shell
    X-GNOME-Bugzilla-Bugzilla=GNOME
    X-GNOME-Bugzilla-Product=gnome-shell
    X-GNOME-Bugzilla-Component=general
    X-GNOME-Bugzilla-Version=3.0.0.2
    Categories=GNOME;GTK;Core;
    OnlyShowIn=GNOME;
    NoDisplay=true
    X-GNOME-Autostart-Phase=WindowManager
    X-GNOME-Provides=panel;windowmanager;
    X-GNOME-Autostart-Notify=true
    X-GNOME-AutoRestart=true

  27. Nick
    April 22nd, 2011 at 14:29 | #27

    Matt, thanks for the lovely article, but after I’ve done all that you’ve asked and logged in, the GNOME 3 interface doesn’t boot. I tried the build command again and repeated the steps but I get this error : Gdk-ERROR: the program ‘lt-gnome-shell-real’ received an X window system error. This probably reflects a bug in the system. This error was ‘ BadRequest(invalid request code or no such operation).
    I just recently shifted to Linux and I would appreciate some help as I’m a newbie.
    Thanks.

  28. April 22nd, 2011 at 17:21 | #28

    @Jessica Could you try installing gnome3-session? sudo apt-get install gnome3-session. Then log out and select GNOME3 as your session when you log in.

  29. April 22nd, 2011 at 17:27 | #29

    @Nick
    I have to admire your guts – I don’t think I would have attempted compiling a new window manager from scratch, when I’d just switched over to Linux – so kudos! I’m impressed :)

    Maybe you could try a rebuild from scratch by using: jhbuild build -afc. Did you start from Ubuntu 10.10, or are you using 11.04?

  30. Nick
    April 22nd, 2011 at 19:29 | #30

    Hey Matt, thanks for the kind words. To be honest I have dual parted Linux Mint with Windows 7. So I have ALL my work files on my 7 installation and I’m just taking Mint 10 for a spin. I installed Mint yesterday, replaced Ooo with LibreOffice, updated the HPLIP and compiled/updated the kernel from 2.6.35 to .38. Linux has a crazy learning curve but I’m making speedy headway I guess.
    And I tried rebuilding from scratch, but it didn’t work. My GNOME 2 seems to be corrupted and my taskbar is missing; I’m typing this in Firefox from a terminal fired off from my desktop. I guess I have to reformat the system or is there a terminal command to restore GNOME 2 to factory settings? Boy, hasn’t this newbie gotten himself into quite the pickle? :-)
    Cheers,
    Nick.
    I always wanted to visit Dublin, but alas my student visa expired :(

  31. Jessica
    April 22nd, 2011 at 23:32 | #31

    @Matt Rudge

    That worked! Thank you!

  32. April 23rd, 2011 at 09:59 | #32

    @Jessica Excellent…glad it helped & thanks for the comments :)

  33. Andrey
    April 25th, 2011 at 01:38 | #33

    Here is something you. Installation went smoothly and everything is great, but after the login window is starts slower than with gnome 2,should it be so? And another thing i looked in administration Sysinfo and it still sees gnome 2.32 as the basis, but i start gnome 3. Maybe that’s why it is a bit slow? How can i entirely remove gnome 2 and stay with gnome 3, instruction above didn’t work for me

  34. koleoptera
    April 28th, 2011 at 16:10 | #34

    Man you rock…Installation on maverick went flawless with your instructions!!!!

  35. Cocoro Cara
    May 5th, 2011 at 19:26 | #35

    Hi

    Thanks for the instructions. I am using Natty (11.04) in Classic mode. Could build without problem. But when I try to start the session, it hangs at the point “Setting Update “fullscreen_visual_bell” and does not proceed further.

    Any ideas?

    CC

  36. Cocoro Cara
    May 5th, 2011 at 19:28 | #36

    Moreover, Ctrl-C does not return me back to Gnome-2 session. There are no panels, etc. So have to logout and login back again to resume.

  37. antonio
    May 26th, 2011 at 02:33 | #37

    The process bombed for me during the “jhbuild build” stage. Here is the error message;

    “*** Error during phase configure of startup-notification: ########## Error running ./configure –prefix /home/carioca/gnome-shell/install –libdir ‘/home/carioca/gnome-shell/install/lib’ –disable-static –disable-gtk-doc *** [11/43]”

    Any suggestions?

    antonio

  38. May 26th, 2011 at 19:57 | #38

    I like Ubuntu 11 with gnome 3. Much better than Unity. Everyone should know gnome 3 is highly customizable. You can have your max, min buttons at windows bar with gconf or gnome-tools. Press ALT and click your name (or other way around) to turn into button. More in my site.

  39. Benjy
    June 4th, 2011 at 22:26 | #39

    Prevent an update to restore the previously deleted files .la :

    $ sudo tee /etc/apt/apt.conf.d/90removela << /dev/null || true”; }; };’

    Other CMD after install:

    $sudo apt-get install gnome-session
    $–compiz replace

    ;-)

  40. diho
    July 17th, 2011 at 00:33 | #40

    hi guys,i have a problem… i can’t install ” libwebkitgtk-3.0-0 ” please help me :( (

    kin@kin-desktop:~$ ./gnome-shell-build-setup.sh
    Please run ‘sudo apt-get install libwebkitgtk-3.0-0 ‘ and try again.
    kin@kin-desktop:~$ sudo apt-get install libwebkitgtk-3.0-0
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Unable to locate package libwebkitgtk-3.0-0
    E: Couldn’t find any package by regex ‘libwebkitgtk-3.0-0′
    kin@kin-desktop:~$

  41. chofer
    July 30th, 2011 at 18:04 | #41

    hi, I face the same problem as diho. In the newest version of gnome 3 the library ” libwebkitgtk-3.0-0 ” is required and I can’t find it for Ubuntu 10.10. only ” libwebkitgtk-1.2-x” is available.

    Can anybody help?

  42. JackDanuls
    September 12th, 2011 at 04:08 | #42

    Having the same issue but more.

    Please run ‘sudo apt-get install accountsservice libwebkitgtk-3.0-0 ‘ and try again.

    Jack@Jack-M-7315U:~$ sudo apt-get install accountsservice libwebkitgtk-3.0-0
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Unable to locate package accountsservice
    E: Unable to locate package libwebkitgtk-3.0-0
    E: Couldn’t find any package by regex ‘libwebkitgtk-3.0-0′

  43. Sukanta Paul
    September 18th, 2011 at 11:11 | #43

    After Executing:

    ./gnome-shell-build-setup.sh

    I got an error:

    Please run ‘sudo apt-get install libxcb-aux0-dev libxcb-event1-dev accountsservice libx11-xcb-dev libwebkitgtk-3.0-0 libsane-dev libgudev-1.0-dev libical-dev ‘ and try again.

    So I run the command as suggested. but got another error:

    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Unable to locate package accountsservice
    E: Unable to locate package libwebkitgtk-3.0-0
    E: Couldn’t find any package by regex ‘libwebkitgtk-3.0-0′

    PLEASE HELP SOMEONE!!!!

  44. Peter
    October 22nd, 2011 at 13:37 | #44

    Shutdown button…
    If you click the menu (upper right corner) containing the “Suspend”, it will change to “Power Off” if you hold down the ALT key. I haven’t found a way to find the “Hibernate” function though…

    Cheers

  1. April 19th, 2011 at 12:32 | #1
  2. April 22nd, 2011 at 07:06 | #2