How to compile and install the latest version of Cinnamon

Cinnamon has become one of the best alternatives to Gnome Shell, due to the fact that it returns us the traditional arrangement of the Desktop elements, which with the new versions of Gnome they have been lost.

This article I have rescued from the site of the LinuxMint Community, since it can help us to compile the latest version of Cinnamon which is available in Github, whenever we have a little time or suffer from acute versionitis. 

Add APT repositories

  • Open the file /etc/apt/sources.list
  • For each deb line, we add the same line replacing deb by deb-src.

For example, this is how it should be in Linux Mint 13:

deb http://packages.linuxmint.com maya main upstream import
deb-src http://packages.linuxmint.com maya main upstream import

deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse

deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main

Install all necessary packages to compile Muffin and Cinnamon.

In a terminal:

apt update
apt install dpkg-dev
apt build-dep muffin
apt build-dep cinnamon

Get the latest git code for Muffin and Cinnamon.

In a terminal:

git clone git://github.com/linuxmint/muffin.git
git clone git://github.com/linuxmint/Cinnamon.git

Compile and install the new Muffin

In a terminal:

cd muffin
dpkg-buildpackage

Next, be sure to install the packages you just built, in particular:

  • libmuffin-dev
  • gir1.2-muffin-3.0
  • libmuffin0
  • muffin (not necessary to compile Cinnamon, but possible also if Muffin is already installed on your system)
  • muffin-common

To install these, you can use "dpkg -i" in the terminal. Assuming there are no other deb packages in the directory, you can type "sudo dpkg -i * .deb".

Compile and install the new Cinnamon.

In a terminal:

cd Cinnamon
./autogen.sh
dpkg-buildpackage

This produces a cinnamon deb file in the parent directory, which can be installed with gdebi or dpkg-i.

Optional: Build the stable branch

The instructions above are for compiling Muffin and Cinnamon from their "master" branch, which is not always stable. To compile the stable branch, the following is required (for muffin and cinnamon):

cd muffin
git checkout -b stable origin/stable
dpkg-buildpackage

And with Cinnamon:

cd Cinnamon
git checkout -b stable origin/stable
./autogen.sh
dpkg-buildpackage

Note that at the time of writing this tutorial, Muffin does not have a stable branch yet, and that Cinnamon 1.4 UP3 (on the stable branch) must be compiled with Muffin 1.0.3-UP1 (use this link to download it instead of the one in git: https://github.com/linuxmint/muffin/tags )