Categories
Tech

Compilation of Xfce-4.16pre2

Somebody may ask why should I compile Linux desktop environment. The answer is actually very simple. My old Xfce-4.14 always got stuck by screen unlock. That is the reason, nothing else. One week ago I have discovered official description of the bug and fix intended to be released in 4.16 Xfce version.

That screen stuck made me crazy so I have decided to try compile latest “unstable” Xfce and verify whether I’ll be more satisfied on this world or not.

Well written documentation about building Xfce is available here https://docs.xfce.org/xfce/building .

I will only summarize few steps needed for successful compilation of Xfce:

Download Xfce tarball

wget https://archive.xfce.org/xfce/4.16pre2/fat_tarballs/xfce-4.16pre2.tar.bz2

Extract data

Don’t be surprised about package versions (e.g. xfce4-panel-4.15.5.tar.bz2). They will be later on officially renamed to 4.16.

tar -xjf xfce-4.16pre2.tar.bz2
cd src
for f in *.tar.bz2; do tar -xjvf "$f"; done

Export environment variables

I have decided to install build to /opt/xfce4.16pre2 .

export PREFIX=/opt/xfce4.16pre2
export PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig:$PKG_CONFIG_PATH"
export CFLAGS="-O2 -pipe"

Compilation of packages

Due to packages dependencies, follow compilation order described here https://docs.xfce.org/xfce/building#xfce_dependencies_explained

Each package has been compiled in typical way (configure, make, make install). Just don’t forget use sudo for make install step.

# sudo before make install is needed because of
# installation of build under /opt directory
./configure --prefix=${PREFIX} && make && sudo make install

Activation of new desktop environment

Actually this was the most difficult part to figure out how to load new Xfce binaries. This part is not mentioned in Xfce documentation so I had to find a way how to do that . Keep in mind original binaries are still available for possible recovery.

The most simplest way was adding Xfce prefix path to PATH environment variable located at /etc/environment file. Do not forget to put build path to first place to ensure proper execution of new binaries.

cat /etc/environment
PATH="/opt/xfce4.16pre2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"

Advantage of this approach is simple switch back to older version of Xfce.

Reload Xfce binaries

I have restarted my OS to verify proper functionality of new Xfce binaries.

Finally, no more stuck after screen unlock.. yeaaaah!!

My 1st post

This is my first blog post. I have no idea why have I decided to create my own blog.

I will put here my thoughts about the life I am living.

I will see what this is gonna to bring me in the future.