How to install gnome 3.29.92 or 3.30 in Ubuntu 18.04?
Yes, it is possible to upgrade any software you want from any ubuntu release if you're willing to do things a little unconventionally and have to deal with more complexity, potential risk and issues of compatibility.
I too could not upgrade to 18.10 as it breaks some essential software for me. On the other hand, Gnome 3.30 is by far superior to 3.28 and 3.26 in terms of stability and performance. Most especially true for Gnome Wayland which goes from disastrous to actually usable as of 3.30...
Here is the general gist of what I did:
- temporarily modify apt repo list to use cosmic's repos instead of bionic.
- update ONLY gnome shell to 3.30 and the files it needs to run in a stable manner and nothing more.
- make a list of the files updated in 2.
- undo step 1, so that the rest of the packages on the machine can use the LTS updates
- the rest of the packages can be updated normally but the files I updated in 2 will need to be updated manually via a script that will be built with the list made in step 3.
I've made a very thorough tutorial on how to do this. Should you follow this closely, you should not have any trouble but know that there are no guaranties and that you are playing with things that could break an install, so backup your install before doing this or do this on a virtual machine to see how it goes for you.
Detailed Instructions (numbers don't correspond to the list above):
Prep
Unless I specify otherwise, assume all commands are in elevated privileges and that I just don't feel like typing sudo
100 times. To go into sudo
mode enter:
sudo -H bash #or sudo su
Before doing anything, make sure all is in order by running:
apt-get --fix-broken install
Step 1
Make a copy of the original and temporarily modify the apt repository lists so that it checks the Cosmic repos for updates instead of the Bionic ones:
cp /etc/apt/sources.list /etc/apt/sources.list.bionic
#make a cosmic version of the apt list
cat /etc/apt/sources.list.bionic| sed 's/bionic/cosmic/g' > /etc/apt/sources.list.cosmic
# set the apt list to cosmic
cp /etc/apt/sources.list.cosmic /etc/apt/sources.list
# backup your two list files to another directory - just in case some smart ass updater decides to delete them.
mkdir /etc/apt.bak
cp /etc/apt/sources.* /etc/apt.bak
Step 2
Update package lists and check for upgradable packages:
apt update
apt list --upgradable > upgradable
Step 3
Using grep
, run a text based search for the numbers 3.30 and 3.28. This should only show you the updates related to the Gnome Shell. Additionally, you can search for packages related to Wayland (essential!) and glib
, gir
, gtk
(up to you). I really don't care about Xorg, as I think it's terribly insecure, but if you want to use gnome-x11
, you can search for xorg
packages to update as well. The idea behind this approach is to avoid upgrading too many packages to the Cosmic branch, because Cosmic only has 9 months of fixes and Bionic will have 5-10 years of security updates and fixes, so it is to your interest to keep as much of your system as possible on the Bionic line.
#updates directly related to 3.30 or needed by it.
cat upgradable | grep "3.30" | grep --color=NEVER "3.28" > upgradable-3.30 #this got me 78 packages
cat upgradable | grep --color=NEVER -i "nautilus" >> upgradable-3.30 #if you endup choosing to do step 9, don't do this
cat upgradable | grep --color=NEVER -i "gdm" >> upgradable-3.30
cat upgradable | grep --color=NEVER -i "gnome-shell-extension-appindicator" >> upgradable-3.30
cat upgradable | grep --color=NEVER -i "gnome-shell-extension-ubuntu-dock" >> upgradable-3.30
cat upgradable | grep --color=NEVER -i "gvfs" >> upgradable-3.30
cat upgradable | grep --color=NEVER -i "network-manager" >> upgradable-3.30
#wayland
cat upgradable | grep --color=NEVER -i "wayland" > upgradable-wayland
#x11
cat upgradable | grep --color=NEVER -i "xorg" > upgradable-xorg
cat upgradable | grep --color=NEVER -i "x11" >> upgradable-xorg
Not sure how necessary the upgrades below are. I would imagine that the library packages needed for the healthy functioning of Gnome Shell 3.30 would be automatically downloaded if I install the files in uprgradable-3.30
. I would say, try without them and if you feel it's not stable, install them.
cat upgradable | grep --color=NEVER -i "gnome-bluetooth" >> upgradable-3.30 #version change doesn't seem very for this one, maybe keep it on bionic
cat upgradable | grep --color=NEVER -i "gnome-keyring" >> upgradable-3.30 #version change doesn't seem very for this one, maybe keep it on bionic
cat upgradable | grep --color=NEVER -i "gnome" >> upgradable-3.30
cat upgradable | grep --color=NEVER -i "gtk" > upgradable-libs
cat upgradable | grep --color=NEVER -i "glib" >> upgradable-libs
cat upgradable | grep --color=NEVER -i "gir" >> upgradable-libs
Each upgradable
list should look something like this:
adwaita-icon-theme/cosmic,cosmic 3.30.0-0ubuntu1 all [upgradable from: 3.28.0-1ubuntu1] baobab/cosmic 3.30.0-1 amd64 [upgradable from: 3.28.0-1] cheese/cosmic 3.30.0-0ubuntu1 amd64 [upgradable from: 3.28.0-1ubuntu1] cheese-common/cosmic,cosmic 3.30.0-0ubuntu1 all [upgradable from: 3.28.0-1ubuntu1] etc... etc... etc...
You should be upgrading a max of 100 to 250 packages out of 1500
Step 4
Using sed
, reformat the lists made in step 3 to turn this:
adwaita-icon-theme/cosmic,cosmic 3.30.0-0ubuntu1 all [upgradable from: 3.28.0-1ubuntu1] baobab/cosmic 3.30.0-1 amd64 [upgradable from: 3.28.0-1] cheese/cosmic 3.30.0-0ubuntu1 amd64 [upgradable from: 3.28.0-1ubuntu1] cheese-common/cosmic,cosmic 3.30.0-0ubuntu1 all [upgradable etc...etc.... etc..
into this:
apt-get install --assume-yes adwaita-icon-theme baobab cheese cheese-common etc... etc... etc..
cat upgradable-3.30 | sed 's/\[//g'| sed 's/\/cosmic/\[/g'| sed 's/), /\] /g'| sed 's/)/\]/g'| sed -e 's/\[\([^]]*\)\]//g'|sed '/^\s*$/d'|sed "s/^/apt-get install --assume-yes /g" > up-3.30
cat upgradable-wayland | sed 's/\[//g'| sed 's/\/cosmic/\[/g'| sed 's/), /\] /g'| sed 's/)/\]/g'| sed -e 's/\[\([^]]*\)\]//g'|sed '/^\s*$/d'|sed "s/^/apt-get install --assume-yes /g" > up-wayland
#again, xorg is optional for those using it, don't upgrade it if you don't use it. You want to keep as many files as possible on the LTS track.
cat upgradable-xorg | sed 's/\[//g'| sed 's/\/cosmic/\[/g'| sed 's/), /\] /g'| sed 's/)/\]/g'| sed -e 's/\[\([^]]*\)\]//g'|sed '/^\s*$/d'|sed "s/^/apt-get install --assume-yes /g" > up-xorg
#same for the libs
cat upgradable-libs | sed 's/\[//g'| sed 's/\/cosmic/\[/g'| sed 's/), /\] /g'| sed 's/)/\]/g'| sed -e 's/\[\([^]]*\)\]//g'|sed '/^\s*$/d'|sed "s/^/apt-get install --assume-yes /g" > up-libs
make the newly created script executable
chmod +x up-*
Step 5
Taking note of the time and date before beginning, I used the results of 4 to update the packages that need updating:
date > upgrade-start
./up-3.30
./up-wayland
#etc...
#Install the Yaru themes (they're not included in 18.04 and are need in 3.30)
apt-get install yaru-theme-*
#as regular user (non-sudo), activate themes via:
gsettings set org.gnome.desktop.interface gtk-theme 'Yaru' #or 'Yaru.dark'
gsettings set org.gnome.desktop.interface cursor-theme 'Yaru'
gsettings set org.gnome.desktop.interface icon-theme 'Yaru'
gsettings set org.gnome.desktop.sound theme-name 'Yaru'
#or use gnome-tweaks to do it
#If you get any errors, run
apt-get --fix-broken install
date > upgrade-finished
#reboot your machine
reboot
Step 6
The files upgraded in 5 are no longer on the LTS update track. Meaning, when step 1 is undone and an update is initiated, the normal Bionic packages will update, but these ones will always be considered newer. Furthermore, any dependencies updated or installed in step 5 will be in the same situation. Updating these packages will require the creation of a script that will update them manually.
Let's use the apt
history log file to figure out what files will need manual updating:
cp /var/log/apt/history.log ./cosmics-upgrade.log
Do nano cosmics-upgrade.log
and delete any entries from before upgrade-start
and those that are after upgrade-finished
(in step 5).
Now, let's make a script that will manually upgrade our non-LTS packages for us:
echo '#!/bin/bash' > update-cosmics
echo 'cp /etc/apt/sources.list.cosmic /etc/apt/sources.list;apt update' >> update-cosmics
The next step will use sed
to format the logs into something we can put in our update-cosmics
file (same idea as in step 4).
cat cosmics-upgrade.log | sed 's/([^)]*)//g'| sed 's/,//g'|sed "s/End-Date:/# End-Date:/g"|sed "s/Start-Date:/\n\n\n# Start-Date:/g"|sed "s/Commandline: /# Commandline: /g"|sed 's/Install: /\napt-get install --assume-yes /g'|sed 's/Update: /\napt-get install --assume-yes /g'|sed 's/Remove: /\napt-get remove --assume-yes /g'|sed 's/Upgrade: /\napt-get install --assume-yes /g'|sed "s/Requested-By:/\n\n\n# Requested-By:/g" >> update-cosmics
Finally, add the following line to the very end of update-cosmics
:
echo 'cp /etc/apt/sources.list.bionic /etc/apt/sources.list;apt update' >> update-cosmics
Make the script executable and move it to /usr/bin
chmod +x update-cosmics
cp update-cosmics /usr/bin
Step 7
Undo Step 1 to allow your system to perform updates normally.
cp /etc/apt/sources.list.bionic /etc/apt/sources.list;apt update
Step 8
Use update-cosmics
to temporarily switch to Cosmic repos and update the packages on the Cosmic track. You can run it manually or schedule it using cron
.
Step 9: Bonus Round: Ditch Nautilus 3.26
This is a matter of preference: if you don't use Desktop icons or if you want to give the Desktop icons extension a try, you can get rid of the outdated Nautilus 3.26 that Ubuntu has forked for the much improved Nautilus 3.30. I like 3.30 because it has WAY better touch screen support and because 3.26's implementation of Desktop icons injects an X11 layer (XWayland really) - even if you are running a Wayland session. The Desktop icons Gnome Shell extension only works with 3.30. It is about 80% feature-complete, but does not inject an X11 layer into your Wayland session.
Nautilus 3.30 can be obtained by downloading the deb files from Debian's servers:
wget http://ftp.us.debian.org/debian/pool/main/n/nautilus/nautilus_3.30.4-1_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/n/nautilus/libnautilus-extension1a_3.30.4-1_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/n/nautilus/nautilus-data_3.30.4-1_all.deb
Use dpkg
to install them:
dpkg -i *nautilus*.deb
Future updates to Nautilus can be found here and you'll have to manually install them (click modification date twice to see the latest debs).
The desktop icons extension can be found here.
If you decide to stick with the Debian 3.30 Nautilus, you'll have to remove these 3 packages from the update-cosmics
script we generated earlier. You will also have to do:
apt-mark hold libnautilus-extension1a nautilus-data nautilus
This avoids Ubuntu's updater accidently "uprgrading" Nautilus from 3.30 back to 3.26 (yes, it actually can't tell that 3.30 is a higher number than 3.26).
To undo this, you can just do:
apt-mark unhold libnautilus-extension1a nautilus-data nautilus
apt-get install nautilus nautilus-data libnautilus-extension1a #and unstill the desktop-icons extension
Well I have managed to compile it on Ubuntu 18.04 using JHBuild tool provided by gnome team! Except for a few dependencies and little modifications, the rest is fine with default bionic installations.
The only module that doesn't compile is ibus-anthy
, and the error I get is not dependency-related:
anthygcontext.c:55:5: error: ‘g_type_class_add_private’ is deprecated
I tried a few apps like gedit and they work, but I haven't yet tested the whole system to see if it actually runs!
I will report back when I'm home...
Good news guys, there was a few problem regarding the compilation and I have now managed to sort them out...
So far the gnome 3-30 session starts completely, applications run... The only problem I am facing now is folders doesn't have any icons!
I will post a guide here, if I manage to fix it and no new problem comes out!
Just to give you an update! After spending a few days of messing with jhbuild, I was not able to figure out why the major applications don't open under new user account while running the newly compiled gnome-shell.
I have already requested for help here, but no response yet:
https://gitlab.gnome.org/GNOME/jhbuild/issues/4
Meanwhile, I have just installed Ubuntu 18.10 daily build and I should say its pretty stable and smooth using gnome-shell 3.30! The only bug I have found so far is that Ubuntu software center sometimes behave strangely and needs to be terminated to become responsive! I'm going to remain on Ubuntu 18.10 for sure, receiving daily updates also will ensure more stability.
I have also updated gjs from this ppa as it is said to be the reason behind the laggy gnome-shell on Ubuntu 18.04!
https://launchpad.net/~gnome3-team/+archive/ubuntu/gnome3-staging
Final words, Expect noticeable performance boost from gnome-shell 3.30 and gjs 1.54, but don't expect windows like smoothness!