En/Trinity desktop environment 14.0.4 raspberry pi 3

From Studiosg
Jump to: navigation, search

Welcome to Simone Giustetti's wiki pages.

Languages: English - Italiano

TDE 14.0.4 and SlackwareArm 14.2

Trinity Desktop environment is a graphical user interface born to keep alive the legacy of the 3.5 branch of KDE. Slackware is the oldest among actively supported Linux distributions and a really stable one. The Raspberry Pi is a family of compact, credit card sized, cheap computers aimed at teaching programming to a young audience. Raspberry Pi 3, the most recent addition to the family, boasts a considerable computing power and provides an ideal platform for development and testing environments or for servers aimed at small networks. Ironically modern graphical user interfaces have the more trouble running on a Raspberry Pi because of the huge amount of resources they require. TDE represents a good compromise between functionality and good performance for computers with limited resources.

The Trinity Desktop Environment offers no official support for Slackware as a consequence no official packages are available to users of the Linux distribution. In a series of articles appearing in this very same web site I detailed how to build working packages for the several Slackware releases and architectures such as AMD, ARM or Intel. The 1st July 2016 Slackware 14.2 was officially released and is currently the stable release of the distribution, whose development cycle required more than two years of work. I owned an unused Raspberry Pi 3 and was only waiting for same spare time to install and try both. Sadly other activities always seemed to be more urgent. I almost managed to build all of the TDE 14.0.3 base packages between the end of July and the following August, but I had to stop before work completion. I kept postponing until the end of November when, with the release of TDE 14.0.4, I realized I could not delay the task anymore and I decided to make up for the wasted time writing the article you are reading.

The present paper will provide you step by step instructions for installing the recent release 14.0.4 of the Trinity Desktop Environment, TDE in short, on a SlackwareARM 14.2 powered Raspberry Pi 3.

SlackwareARM and Raspberry Pi 3

The first step of the activity consist of installing the latest available SlackwareARM release on a Raspberry Pi 3. The Raspberry Pi foundation provides no support Slackware and its derived distributions, similarly SlackwareARM provides no support for any of the Raspberry Pi models. Nevertheless the procedure is an easy one that does not differ much from a standard PC installation of Slackware, moreover good documentation is available surfing the net. The following guide is very similar to the one I wrote about installing SlackwareArm 14.1 on a Raspberry Pi 2 included in another article available somewhere in this web site. If you already managed to install the distribution on the device, please move along to the TDE dedicated chapter available later otherwise read on.

Before you start the installation some hardware is needed:

  • A MicroSD card with at least 16 Giga byte of free space we'll install the operating system to. A 32 Gbyte card is recommended.
  • A PC compatible MicroSD card reader.
  • An USB stick with 4 Gbyte or more free disk space where to save the installation packages.
  • USB mouse, USB keyboard, monitor, cables an everything else needed by the the Raspberry Pi to run.

Configure the MicroSD Card

Root privileges are needed to perform a successful installation. From now on, if not otherwise specified, assume to work as user root.

Connect the MicroSD card to the PC through the card reader. When correctly detected by the operating system the card will appear in the disk list returned by command fdisk like in the example below:

  fdisk -l
  Disk /dev/sdd: 16.0 GB, 16003366912 bytes
  255 heads, 63 sectors/track, 1945 cylinders, total 31256576 sectors
  Units = sectors of 1 * 512 = 512 bytes
  Sector size (logical/physical): 512 bytes / 512 bytes
  I/O size (minimum/optimal): 512 bytes / 512 bytes
  Disk identifier: 0x00000000
  Device      Boot       Start   End          Blocks   Id  System
  /dev/sdd1              8192    31256575    15624192    c   W95 FAT32 (LBA)

Download the SlacwareArm installation image to a local directory:

cd /tmp
wget http://rpi3.fatdog.eu/files/rpi3/142/img/sarpi3-installer_slack14.2_fd0.img.xz
wget http://rpi3.fatdog.eu/files/rpi3/142/img/sarpi3-installer_slack14.2_fd0.img.md5

When the download concludes check the image for consistency errors that could be a consequence of a partial or incomplete download:

md5sum -c rpi3.fatdog.eu/files/rpi3/142/img/sarpi3-installer_slack14.2_fd0.img.md5

Should the command return an error, please try downloading the image again. Hopefully the problem will not represent itself. In case no error is detected go on and copy the image on the card using the dd command:

xz -dc sarpi3-installer_slack14.2_fd0.img.xz | dd of=/dev/sdd bs=65536

Where /dev/sdd is the MicroSD card previously connected to the PC and detected by the operating system. The outcome of the copy can be tested using the fdisk command. Check for the partition size to be smaller and the boot flag to be active:

  fdisk -l
  Disk /dev/sdd: 16.0 GB, 16003366912 bytes
  4 heads, 32 sectors/track, 244192 cylinders, total 31256576 sectors
  Units = sectors of 1 * 512 = 512 bytes
  Sector size (logical/physical): 512 bytes / 512 bytes
  I/O size (minimum/optimal): 512 bytes / 512 bytes
  Disk identifier: 0xd4dd6bc4
  Device      Boot       Start   End          Blocks   Id  System
  /dev/sdd1   *          32      187519       93744    c   W95 FAT32 (LBA)

Installation Packages

SlackwareARM does not distribute ISO images as the majority of ARM based devices do not have a CD/DVD reader and even if an external one were attached through the USB port they could not boot from it. There are two convenient ways to install SlackwareARM after starting the setup program:

  1. Reading packages shared thorough the network via NFS.
  2. Reading packages from an USB attached drive or storage.

We'll recur to the latter option. A list of download locations for the packages can be found here. Once downloaded, copy SlackwareARM packages on the USB stick. We'll connect it to the Raspberry Pi later on during the installation.

Start the SlackwareARM Installation

To start the installation:

  • Connect the MicroSD card to the Raspberry Pi integrated reader.
  • Connect USB mouse and keyboard.
  • Connect the USB stick containing the previously downloaded installation packages.
  • Connect the HDMI/RCA cable to the monitor.
  • Turn the monitor on.
  • Connect the power cable to the Raspberry Pi.

If everything goes as planned the Raspberry Pi power red led will switch on briefly followed by the green one, connected to the MicroSD reader, the latter will then start blinking. On top of the monitor will appear a number of raspberries equal to the number of cores and somewhat lower the keyboard selection window will open. Were something not working: it could be a problem with the installation image that can be solved by overwriting the MicroSD card, or an issue with the card itself; then you should replace it and try with a new one.

Set Date and Time

The Raspberry Pi does not include a hardware clock: the system date is reset to 1st January 1970 at every shutdown and the current date and time must be configured at each boot. The date and time set up must be performed during the installation too otherwise the program will refuse to install packages younger than the system thinking of a configuration error. To set date and time:

  • Select a keyboard layout from the provided list.
  • Log-in as user root (You will not be required a password during the installation).
  • Run command date with the -s option to set the date:
date -s "<day> <month> <date> <hour>:<minute>:<second> <year>"


<day> = 3 character string setting the day of the week.
<month> = 3 character string setting the month of the year.
<date> = Day of the month represented with 2 numerical characters.
<year> = Year represented with 4 numerical characters.
<hour> = Hour represented with 2 numerical characters.
<minute> = Minutes represented with 2 numerical characters.
<second> = Seconds represented with 2 numerical characters.
Example: date -s "Thu Sep 3 16:06:35 2015"

If networking is configured and running you'll be able to update the system date querying a public NTP server using command:

ntpdate pool.ntp.org

Partition the MicroSD Card

The MicroSD card is managed like a hard disk and as such needs partitioning. Creating a number of partitions greater than one means better security for data against file system corruption and an increased flexibility when executing upgrades, back-ups or reinstalling the system. The first step consist of searching the card among the system detected devices through command fdisk. A synthesis of its output follows:

  fdisk -l

The card corresponds to device /dev/mmcblk0 while /dev/mmcblk0p1 is the first card partition, the one containing boot files. Run standard command cfdisk to partition the card:

cfdisk /dev/mmcblk0

The existing partition should not be touched. Create some other ones in addition to it: a swap partition of at least 256 Mb, a root partition, where to install the system binaries, and a home partition for user data. It is possible to create many more, the listed ones represent a bare minimum. Always check for the boot flag of the first VFAT partition to be active. When done write the partition table and exit cfdisk.

I'll recommend reserving a minimum of 8 Gbyte for the system, but 12 Gbyte are probably safer because building TDE requires a lot of spare disk space. The space can be freed after installing the desktop environment, but you risk to fill the disk at compile time causing an error and consequent build failure.

Copy Packages

Mount the USB stick containing the SlackwareARM packages to a local directory then run the installation program typing setup at the command prompt. The program will run through the standard Slackware Linux installation steps.

  • Activate the swap partition.
  • Activate the system partition and the remaining ones.
  • Save the partition configuration in file /etc/fstab.
  • Activate the boot partition (VFAT) being careful to set umask 177 while mounting it in order not to overwrite its content by mistake.
  • Select a package source: the directory where the USB stick was mounted.
  • Select the installation type then start package copy.

As previously stated the goal of this paper consist of proving for TDE to be a perfect replacement for KDE 4 therefore You are invited not to install KDE 4 packages nor the Qt4 libraries. Qt4 could be needed by programs other than KDE 4 applications and the library can in fact coexist with TQt: the Trinity project maintained version of Qt3. Unfortunately Qt4 presence could arise issues while building the many packages forming the Trinity Desktop Environment thus you are strongly suggested to install Qt4 after concluding the installation of TDE.

System Configuration

The SlackwareARM installation program follows step by step the standard Slackware one and the configuration procedure touches every aspect of the latter:

  • Mouse configuration.
  • Network configuration.
    • Setting a hostname.
    • Setting a domain for the host.
    • Set a static IP address or configure a client for the DHCP service.
  • Configure daemons and services to start at boot time.
  • Select a font for the console.
  • Configure the local timezone.
  • Configure the predefined Window Manager. This step should be performed again after TDE installation.
  • Set the root password.

Last the installation program will require a system reboot. Do not reboot immediately the machine and log-in to another terminal instead:

  • Remove unneeded packages:
ROOT=/mnt removepkg kernel_armv7 kernel-modules-armv7
ROOT=/mnt removepkg kernel_kirkwood kernel-modules-kirkwood
  • Remove the initrd.gz file from the root partition:
mount -t vfat /dev/mmcblk0p1 /mnt/boot
rm /mnt/boot/initrd.gz
  • Install the Raspberry Pi firmware and kernel data:
ROOT=/mnt installpkg /rpi3-extra/kernel* /rpi3-extra/rpi3*

After performing the above listed actions it is possible to proceed umounting the packages source then rebooting the system. The SlackwareARM installation on the Raspberry Pi is concluded and after the reboot it will be possible to log-in to the newly installed system and perform the TDE installation.

Installing Trinity Desktop Environment on Raspberry Pi 3

Trinity Desktop Environment 14.0.4 was released 7th November 2016. A bug fix release resulting from over seven months of work fixing bugs and other user reported issues. No binary TDE packages are available for Slackware Linux. None available for PC nor for the ARM architecture. The only feasible way to install TDE consists of building packages from the source code. Compressed archives of the source code for packages can be downloaded from the following link. The web page contains links for every single archive and a link to an archive including the whole source code and all of the localization files for the desktop environment. If you aim for a full build and have 750 Mbyte free disk space and a fast Internet connection, you are strongly encouraged to download the single archive. Being a bug fix release, 14.0.4 does not differ much from the previous ones. Some adjustments to the build scripts were needed to include new dependencies and some updates introduced in Slackware 14.2. Before you go on I'll suggest reading two earlier articles of mine about building TDE packages:

Below you'll find a brief description of the scripts used to build the Trinity Desktop Environement and some notes about the newly introduced changes.

The TDE Build Tree

Trinity Desktop Environment is a very complex software consisting of a multitude of packages, which can be sorted into four categories:

  • Prerequisites.
  • Base packages.
  • Optional Libraries.
  • Optional applications.

The first two groups are the backbone of the base environment which is functional and suitable for generic usage. Libraries add functionality to the base environment and are often required by the many optional applications included in the fourth group. A single script is not enough to build the whole environment while maintaining a high level of flexibility; not even a complex one. We'll use many scripts capable of performing a specific task well and a main one for supervising and controlling the others. To guarantee consistency for the whole environment we'll use a single centralized configuration file containing all of the build options and sane default values. Local configuration files will be used for packages requiring special options that overwrite in full or partially default ones. The build tree was described in a previous article and I'll spotlight the introduced changes only:


Many packages included in TDE raise issues in recognizing recent libtool versions shipping in many modern Linux distributions. Such issues arise with Slackware too in spite of its very conservative policy when updating the included software list. Briefly the source code of TDE packages refers to libtool 2.2.6: an obsolete release of the software often replaced by newer ones. This is not a novelty issue introduced with TDE 14.0.4, but a well known problem propagating to each and every new release. Slackware 14.2 comes with libtool 2.4.6 making the patches used for Slackware 14.1 and earlier obsolete and useless. ltmain_version_update.patch was updated as follows:

   *** admin/ltmain.sh	2013-08-29 14:58:12.136925711 +0200
   --- admin/ltmain.sh	2013-08-29 12:10:51.935987043 +0200
   *** 73,81 ****
   ! VERSION="2.2.6b Debian-2.2.6b-2ubuntu1"
   ! package_revision=1.3017
   # Be Bourne compatible
   if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   --- 73,81 ----
   ! VERSION="2.4.6"
   ! package_revision=2.4.6
   # Be Bourne compatible
   if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then

The updated file should be copied in the build directory of every package needing it. An updated list of packages requiring the patch is available below:

  • base/tdeaccessibility
  • base/tdeaddons
  • base/tdeadmnin
  • base/tdebindings
  • base/tdeedu
  • base/tdegames
  • base/tdemultimedia
  • base/tdewebdev
  • library/kipi-plugins
  • library/libkdcraw
  • library/libkexiv2
  • library/libkipi
  • library/libksquirrel
  • library/libtdeldap
  • library/libtqt-perl

MLT and MLT++

MLT and MLT++ are a couple of libraries suffering from coexistence issues with Qt4 and tQt. In the past the problem prevented building working packages and both libraries were ignored. Anyway both libraries are unused by the base environment and their presence was useless and their absence meant no loss. The 14.0.4 release of TDE solved the dependency problem and both libraries are included in the environment at last. Some new files were added to the build tree:

  |   |-- mlt
  |   |   |-- local.options
  |   |   |-- mlt-R14.0.4.tar.bz2
  |   |   |-- mlt.SlackBuild
  |   |   |-- slack-desc
  |   |   |-- sox_configure.patch
  |   |   `-- sox_makefile.patch
  |   |-- mlt++
  |   |   |-- local.options
  |   |   |-- mlt++-R14.0.4.tar.bz2
  |   |   |-- mlt++.SlackBuild
  |   |   `-- slack-desc

and the TDE.SlackBuild script was updated accordingly.


Some of the scripts in the config directory are not needed anymore, but were included nevertheless. They will be probably removed in future versions of the build tree.


Tdebindings provides libraries to bind the graphical user interface to programming languages other than C++ the native one. Language bindings are useful for developers wishing to write TDE compatible applications in any programming language. Java is one among the supported languages, but it is somewhat of a problem for the ARM platform as it is very difficult to find a working virtual machine for the architecture. Obviously applications require a virtual machine to run properly and the binding libraries are not built unless one is installed on the system. Where to find a working Java virtual machine for SlackwareArm 14.2 ? In the past the answer was nowhere, but starting with SlackwareArm 14.0 the task is not impossible.

Oracle, the actual owner of the Java language, web site provides download links for some ARM based devices. Linux distributions running on ARM platforms can be sorted into two categories: hard float and soft float depending on the way they handle floating point numbers. SlackwareARM 14.2 ranks in the latter category and as such needs a soft float virtual machine. Oracle provides only hard float versions of its JDK8, you'll have to resort to the JDK7 which ships a soft float version. Step by step instructions about how to install the Java virtual machine are available here. For those interested, details about the difference between hard and soft float ARM architectures are available in the Raspian forum.

Otherwise you can build a virtual machine based on the OpenJDK project: a fully Open Source implementation of Java sharing a consistent amount of source code with the Oracle one. Thanks to the work of Eric Hameleers (Aka Alien Bob) OpenJDK was included in SlackwareArm. You can find step by step instructions to build and install the package in Eric's package repository. Building the virtual machine requires good skills, time and resources: over 10 Giga bytes of free disk space, and could represent somewhat of a problem. For those feeling intimidated by the task prebuilt packages are available from the Slackware UK website. The package name is a bit confusing as it includes the armhfp string, but binary files are built for a soft-float architecture:

  root@system:/tmp/openjdk7/usr/lib/java/bin# readelf -a java
  ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x84c4
  Start of program headers:          52 (bytes into file)
  Start of section headers:          6512 (bytes into file)
  Flags:                             0x5000202, has entry point, Version5 EABI, soft-float ABI
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         8
  Size of section headers:           40 (bytes)
  Number of section headers:         38
  Section header string table index: 35

and they can run on SlackwareARM 14.2.


Previous versions of tdenetwork required a patch, file threads_sprintf.patch, to solve a compatibility issue with the vsprintf function. The last version available is not afflicted by the issue therefore the patch file was removed and the build script updated accordingly by removing every reference to it.


A brief synopsis of the guidelines used to manage a project as big as TDE:

  1. Use /opt/trinity as package root directory in order for TDE 14.0.4 to be installed alongside KDE 4 without one overwriting the other one files.
  2. Build all packages in the Prerequisites, Base and Libraries groups ignoring the Additional Applications one.
  3. Write SlackBuild scripts working on all of the Slackware Linux supported platforms: amd64, ARM and i486.
  4. Write down a build script for each and every working package and a main one calling for the specific ones in the right build order. This way it will be possible to build either the whole environment or a single package running but a script.
  5. Put all shared configuration options for the Trinity Desktop Environment in a single file: TDE.options.
  6. Put custom package options in local files. Options included in local files will overwrite wholly or in part the ones from TDE.options.

I have been following the listed rules for each and every TDE version I worked on in the past and they remain substantially unchanged for release 14.0.4 too.

New Dependencies

Some dependencies are needed to obtain a full build of the Trinity Desktop Environment many packages. The dependencies are listed in a previous article of mine. The list should be updated introducing imlib: a library to read image files and quickly render them to screen. The library was removed from the list of supported packages in Slackware 14.2, but should be built and installed anyway otherwise tdegraphics will be impossible to build.

Imlib support is now provided by the SlackBuilds.org project an effort to provide users with build script for a multitude of libraries and software not included in the Slackware Linux distribution. To build and install a working imlib package:

  • Download the imlib 1.9.15 source code and the archive containing the build scripts from the following page.
  • Move into the directory where you downloaded the files. /tmp for example:
  cd /tmp
  • Decompress the script archive using the tar command:
  tar -zxf imlib.tar.gz
  • Move into the build script root directory:
  cd imlib
  • Move the source code archive into the build script root directory:
  mv /tmp/imlib-1.9.15.tar.bz2 .
  • Start the build process:

The build script will apply patches and will execute all tasks needed in order to build a complete package for the library.

The package will be saved into the /tmp directory and can be installed using command installpkg as usual:

  installpkg /tmp/imlib-1.9.15-arm-1_SBo.tgz

Please note: All command listed above should be executed by the root user.

Do not install the imlib package shipped with Slackware 14.1. It appears to work but in fact doesn't. The library within is linked against obsolete versions of jpeg, png, etc. as a consequence including it in tdegraphics will trigger an error at compile time resulting in a failure. Install a recent Imlib package.

Updates to the Build Order

There is no significant update to the build order described in a previous article.

Build TDE

To easily build TDE I wrote a main script: TDE.SlackBuild meant to drive the whole procedure building the single packages in the correct, documentation suggested order. A copy of the script and the whole build tree can be downloaded as a compressed archive here. Download the build tree and the source code for the TDE project in a local directory like /tmp then follow the steps listed below:

  • Create directory /usr/src/trinity:
mkdir /usr/src/trinity
  • Copy the build tree archive in the new directory
cp /tmp/tde_build_tree_sg-14.0.4.tar.bz2 /usr/src/trinity/
  • Move to directory /usr/src/trinity
cd /usr/src/trinity/
  • Extract the archive using the tar command:
tar -jxf tde_build_tree_sg-14.0.4.tar.bz2

The /usr/src/trinity directory will be populated with files and sub-directories

  ls -la
  total 14
  drwxr-xr-x   7 root root 1024 Sep 14 19:52 .
  drwxr-xr-x   5 root root 1024 Sep 14 19:52 ..
  -rw-r--r--   1 root root  314 Sep 14 14:53 TDE.options
  drwxr-xr-x 113 root root 7168 Sep 14 17:40 application
  drwxr-xr-x  22 root root 1024 Jan  1  1970 base
  drwxr-xr-x  13 root root 1024 Jan  1  1970 library
  drwxr-xr-x  16 root root 1024 Jan  1  1970 prerequisite
  drwxr-xr-x   4 root root 1024 Jan  1  1970 tde_build_script
  • Distribute the source file archives among the sub-directories in base, library and prerequisite. The TDE.options file, a synthesis follows, includes build options for the whole environment:
   # Global options used to build TDE.
   # Do not place here package specific options. Use a file named
   # "local.options" in the build root directory of the package
   # instead.
  • Open the options file with a text editor of choice and set the desired values for the variables therein. A minimum number of variables should be assigned a value fitting the target architecture and personal preferences:
    • ARCH and MARCH used to set the target architecture for the build: arm for the Raspberry Pi 3.
    • BUILD should be incremented for each update to the procedure.
    • JOB_NUM sets the concurrency level while building packages.
    • PREFIX sets the root directory for TDE. Use /opt/trinity to grant TDE and KDE 4 coexistence.
    • SRCVER the TDE release.
    • TAG a customizable identifier for the person performing the build.
  • Move into directory /usr/src/trinity/tde_build_script/bin then run the build script:
cd /usr/src/trinity/tde_build_script/bin
sh ./TDE.SlackBuild

The script will autonomously build and install every package. A copy of each built package and related log files will be saved in directory /tmp.

The tde-i18n package, containing localization files for each TDE supported language, needs special mentioning. The main script contains the lines of code needed to build packages, but the procedure is a time consuming one and not very useful for a standard user thus the lines were commented out and localization packages are ignored. To build the localization packages the TDE.SlackBuild script should be modified removing the comment from line:

   #   bash ./${PKG}.SlackBuild

changing it to

      bash ./${PKG}.SlackBuild


This paper provided instructions about how to install a recent release of SlackwareARM and Trinity Desktop Environment on a Raspberry Pi model 3. The whole experience turned out to be rather easy and straightforward providing the Raspberry Pi with a full, light and feature rich desktop environment. Some images depicting the running desktop are available below.

Tde 1404 desktop clean.png

Fig: 1 - A freshly installed TDE desktop at start time.

Tde 1404 konqueror version.png

Fig: 2 - The TDE release number shown in the Konqueror window.

Tde 1404 periodic table.png

Fig: 3 - A bit of chemistry.

Tde 1404 java plugin configure.png

Fig: 4 - The Java plug-in configuration windows provided by IcedTea.

Tde 1404 gparted.png

Fig: 5 - GParted: A partitioning program for hard disks.

Tde 1404 task manager.png

Fig: 6 - A Task Manager warning.

Tde 1404 calendar.png

Fig: 7 - A calendar to help you in scheduling tasks and activities.

Tde 1404 disk usage.png

Fig: 8 - A graphical representation of the root user disk usage.

Tde 1404 tdevelop.png

Fig: 9 - TDevelop an IDE for developers integrated in the desktop environment.

Tde 1404 ddd.png

Fig: 10 - After the development environment the debugger you can't do without.

I'd like to thank the TDE development team for the hard work and invite you to check this web site for updates and further reading.

For any feedback, questions, errors and such, please e-mail me at studiosg [at] giustetti [dot] net

External links

Languages: English - Italiano