Yet another desktop – Compiling CDE on Debian 8.0 (Jessie)

The Common Desktop Environment (CDE) used to be the ‘de facto’ desktop on UNIX Workstations, is still used on OpenVMS, and remains popular with some users for its consistent look and feel and low resource utilization – remember that back in the 1990’s 128MB was a lot of RAM. It is also probably true to say that the default colour scheme can take a bit of getting used to!

jessie-cde-desktop
This isn’t the first time I’ve tried to compile the CDE desktop environment from source, but I could not get it to work on my previous attempts using earlier versions of Debian, so this is the first time I’ve been successful. The build instructions are on the CDE website but you need to interpret them a bit so I’ve reproduced exactly the commands I used to build and install CDE below.

I have also managed to get the CDE login manager to start automatically when the system boots, however since CDE is not integrated with current display managers you need to start with a minimal system without a graphical desktop to avoid conflicts with the graphical display manager later.

In theory CDE should make a good desktop environment for devices like the Raspberry Pi if you are running Raspbian (Jessie) and providing you can wait long enough for it to compile! I’m going to try it for a bit and see how well it works.

Update Current Packages

Before downloading and installing anything we need to be running as root and it is a good idea to make sure that your system is up to date.

$ su
Password:

OR

$ sudo -i
Password:

# apt-get update;apt-get upgrade
  :
  :
  :
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  apt apt-utils base-files cron libapt-inst1.5 libapt-pkg4.12 libc-bin
  libc6 libdns-export100 libgnutls-deb0-28 libgnutls-openssl27
  libirs-export91 libisc-export95 libisccfg-export90 libsystemd0 libudev1
  locales multiarch-support rsyslog systemd systemd-sysv udev
22 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 18.3 MB of archives.
After this operation, 627 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
  :
  :
  :
Processing triggers for libc-bin (2.19-18+deb8u1) ...
#


Installing X Windows

Since CDE depends on X Windows we will need to install the minimal packages required to provide an X server first. I’ve saved some disk space by not installing the recommended packages using ‘–no-install-recommends’.

# apt-get install xserver-xorg xserver-xorg-core xfonts-base xinit\
> --no-install-recommends
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libegl1-mesa libelf1
  libepoxy0 libevdev2 libfontenc1 libgbm1 libgl1-mesa-glx libglapi-mesa
  libice6 libllvm3.5 libmtdev1 libpciaccess0 libpixman-1-0 libsm6
  libwayland-client0 libwayland-server0 libx11-6 libx11-data libx11-xcb1
  libxatracker2 libxau6 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0
  libxcb-present0 libxcb-render0 libxcb-shape0 libxcb-sync1 libxcb-util0
  libxcb-xfixes0 libxcb1 libxdamage1 libxdmcp6 libxext6 libxfixes3
  libxfont1 libxi6 libxkbfile1 libxmu6 libxmuu1 libxpm4 libxshmfence1
  libxt6 libxtst6 libxv1 libxvmc1 libxxf86vm1 x11-common x11-xkb-utils
  xauth xfonts-encodings xfonts-utils xserver-common xserver-xorg-input-all
  xserver-xorg-input-evdev xserver-xorg-input-mouse
  xserver-xorg-input-synaptics xserver-xorg-input-vmmouse
  xserver-xorg-video-all xserver-xorg-video-ati xserver-xorg-video-cirrus
  xserver-xorg-video-fbdev xserver-xorg-video-intel
  xserver-xorg-video-mach64 xserver-xorg-video-mga
  xserver-xorg-video-modesetting xserver-xorg-video-neomagic
  xserver-xorg-video-nouveau xserver-xorg-video-openchrome
  xserver-xorg-video-r128 xserver-xorg-video-radeon
  xserver-xorg-video-savage xserver-xorg-video-siliconmotion
  xserver-xorg-video-sisusb xserver-xorg-video-tdfx
  xserver-xorg-video-trident xserver-xorg-video-vesa
  xserver-xorg-video-vmware
Suggested packages:
  xfs xserver xfonts-100dpi xfonts-75dpi xfonts-scalable
  gpointing-device-settings touchfreeze firmware-linux
Recommended packages:
  libegl1-mesa-drivers libgl1-mesa-dri xterm x-session-manager
  x-window-manager x-terminal-emulator xserver-xorg-input-wacom
  xserver-xorg-video-qxl
The following NEW packages will be installed:
  libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libegl1-mesa libelf1
  libepoxy0 libevdev2 libfontenc1 libgbm1 libgl1-mesa-glx libglapi-mesa
  libice6 libllvm3.5 libmtdev1 libpciaccess0 libpixman-1-0 libsm6
  libwayland-client0 libwayland-server0 libx11-6 libx11-data libx11-xcb1
  libxatracker2 libxau6 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0
  libxcb-present0 libxcb-render0 libxcb-shape0 libxcb-sync1 libxcb-util0
  libxcb-xfixes0 libxcb1 libxdamage1 libxdmcp6 libxext6 libxfixes3
  libxfont1 libxi6 libxkbfile1 libxmu6 libxmuu1 libxpm4 libxshmfence1
  libxt6 libxtst6 libxv1 libxvmc1 libxxf86vm1 x11-common x11-xkb-utils
  xauth xfonts-base xfonts-encodings xfonts-utils xinit xserver-common
  xserver-xorg xserver-xorg-core xserver-xorg-input-all
  xserver-xorg-input-evdev xserver-xorg-input-mouse
  xserver-xorg-input-synaptics xserver-xorg-input-vmmouse
  xserver-xorg-video-all xserver-xorg-video-ati xserver-xorg-video-cirrus
  xserver-xorg-video-fbdev xserver-xorg-video-intel
  xserver-xorg-video-mach64 xserver-xorg-video-mga
  xserver-xorg-video-modesetting xserver-xorg-video-neomagic
  xserver-xorg-video-nouveau xserver-xorg-video-openchrome
  xserver-xorg-video-r128 xserver-xorg-video-radeon
  xserver-xorg-video-savage xserver-xorg-video-siliconmotion
  xserver-xorg-video-sisusb xserver-xorg-video-tdfx
  xserver-xorg-video-trident xserver-xorg-video-vesa
  xserver-xorg-video-vmware
0 upgraded, 87 newly installed, 0 to remove and 0 not upgraded.
Need to get 30.2 MB of archives.
After this operation, 76.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
  :
  :
  :
Setting up xserver-xorg (1:7.7+7) ...
Processing triggers for libc-bin (2.19-18+deb8u1) ...
Processing triggers for systemd (215-17+deb8u2) ...
#


Install the prerequisites

Then we need to install the packages required to download the code from github and build CDE from source.

# apt-get install git build-essential libxp-dev libxt-dev libxmu-dev \
> libxft-dev libxinerama-dev libxpm-dev libmotif3 libmotif-dev \
> libxaw7-dev libx11-dev libXSs-dev libtirpc-dev x11-xserver-utils \
> libjpeg62-turbo-dev libfreetype6-dev tcl-dev ksh m4 ncompress \
> xfonts-100dpi xfonts-100dpi-transcoded rpcbind bison xbitmaps\
> --no-install-recommends
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  binutils bzip2 cpp cpp-4.9 dpkg-dev fontconfig-config fonts-dejavu-core
  g++ g++-4.9 gcc gcc-4.9 git-man libasan1 libatomic1 libbison-dev
  libc-dev-bin libc6-dev libcilkrts5 libcloog-isl4 libcurl3-gnutls
  libdpkg-perl liberror-perl libexpat1-dev libfontconfig1
  libfontconfig1-dev libgcc-4.9-dev libglib2.0-0 libgomp1 libice-dev
  libisl10 libitm1 libjpeg62-turbo libldap-2.4-2 liblsan0 libmotif-common
  libmpc3 libmpfr4 libmrm4 libpng12-dev libpthread-stubs0-dev libquadmath0
  librtmp1 libsasl2-2 libsasl2-modules-db libsigsegv2 libsm-dev libssh2-1
  libstdc++-4.9-dev libtcl8.6 libtimedate-perl libtirpc1 libtsan0 libubsan0
  libuil4 libxau-dev libxcb1-dev libxcursor1 libxdmcp-dev libxext-dev
  libxft2 libxinerama1 libxm4 libxmu-headers libxp6 libxrandr2
  libxrender-dev libxrender1 libxss1 linux-libc-dev make patch perl
  perl-modules pkg-config tcl tcl8.6 tcl8.6-dev uil x11proto-core-dev
  x11proto-input-dev x11proto-kb-dev x11proto-print-dev x11proto-render-dev
  x11proto-scrnsaver-dev x11proto-xext-dev x11proto-xinerama-dev
  xorg-sgml-doctools xtrans-dev xz-utils zlib1g-dev
Suggested packages:
  binutils-doc bison-doc bzip2-doc cpp-doc gcc-4.9-locales debian-keyring
  g++-multilib g++-4.9-multilib gcc-4.9-doc libstdc++6-4.9-dbg gcc-multilib
  manpages-dev autoconf automake libtool flex gdb gcc-doc gcc-4.9-multilib
  libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan1-dbg
  liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libquadmath0-dbg
  git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui gitk
  gitweb git-arch git-cvs git-mediawiki git-svn glibc-doc libice-doc
  libsm-doc libstdc++-4.9-doc libxaw-doc libxcb-doc libxext-doc libxt-doc
  make-doc ed diffutils-doc perl-doc libterm-readline-gnu-perl
  libterm-readline-perl-perl libb-lint-perl libcpanplus-dist-build-perl
  libcpanplus-perl libfile-checktree-perl liblog-message-simple-perl
  liblog-message-perl libobject-accessor-perl tcl-doc tcl-tclreadline
  tcl8.6-doc nickle cairo-5c xorg-docs-core
Recommended packages:
  fakeroot libalgorithm-merge-perl rsync ca-certificates
  libfile-fcntllock-perl libglib2.0-data shared-mime-info xdg-user-dirs
  libsasl2-modules libx11-doc rename libarchive-extract-perl
  libmodule-pluggable-perl libpod-latex-perl libterm-ui-perl
  libtext-soundex-perl libcgi-pm-perl libmodule-build-perl
  libpackage-constants-perl
The following NEW packages will be installed:
  binutils bison build-essential bzip2 cpp cpp-4.9 dpkg-dev
  fontconfig-config fonts-dejavu-core g++ g++-4.9 gcc gcc-4.9 git git-man
  ksh libasan1 libatomic1 libbison-dev libc-dev-bin libc6-dev libcilkrts5
  libcloog-isl4 libcurl3-gnutls libdpkg-perl liberror-perl libexpat1-dev
  libfontconfig1 libfontconfig1-dev libfreetype6-dev libgcc-4.9-dev
  libglib2.0-0 libgomp1 libice-dev libisl10 libitm1 libjpeg62-turbo
  libjpeg62-turbo-dev libldap-2.4-2 liblsan0 libmotif-common libmotif-dev
  libmotif3 libmpc3 libmpfr4 libmrm4 libpng12-dev libpthread-stubs0-dev
  libquadmath0 librtmp1 libsasl2-2 libsasl2-modules-db libsigsegv2
  libsm-dev libssh2-1 libstdc++-4.9-dev libtcl8.6 libtimedate-perl
  libtirpc-dev libtirpc1 libtsan0 libubsan0 libuil4 libx11-dev libxau-dev
  libxaw7-dev libxcb1-dev libxcursor1 libxdmcp-dev libxext-dev libxft-dev
  libxft2 libxinerama-dev libxinerama1 libxm4 libxmu-dev libxmu-headers
  libxp-dev libxp6 libxpm-dev libxrandr2 libxrender-dev libxrender1
  libxss-dev libxss1 libxt-dev linux-libc-dev m4 make ncompress patch perl
  perl-modules pkg-config rpcbind tcl tcl-dev tcl8.6 tcl8.6-dev uil
  x11-xserver-utils x11proto-core-dev x11proto-input-dev x11proto-kb-dev
  x11proto-print-dev x11proto-render-dev x11proto-scrnsaver-dev
  x11proto-xext-dev x11proto-xinerama-dev xbitmaps xfonts-100dpi
  xfonts-100dpi-transcoded xorg-sgml-doctools xtrans-dev xz-utils
  zlib1g-dev
0 upgraded, 116 newly installed, 0 to remove and 0 not upgraded.
Need to get 89.7 MB of archives.
After this operation, 277 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
  :
  :
  :
Setting up xfonts-100dpi (1:1.0.3) ...
Setting up xfonts-100dpi-transcoded (1:1.0.3) ...
Setting up libmotif3:amd64 (2.3.4-6+deb8u1) ...
Setting up libtirpc-dev (0.2.5-1) ...
Processing triggers for libc-bin (2.19-18+deb8u1) ...
Processing triggers for systemd (215-17+deb8u2) ...
#


Downloading the source code

Create a clone of the current source code posted on github using git in a new sub-folder.

# git clone git://git.code.sf.net/p/cdesktopenv/code cdesktopenv-code
Cloning into 'cdesktopenv-code'...
remote: Counting objects: 35959, done.
remote: Compressing objects: 100% (19081/19081), done.
remote: Total 35959 (delta 21735), reused 27909 (delta 15786)
Receiving objects: 100% (35959/35959), 60.88 MiB | 647.00 KiB/s, done.
Resolving deltas: 100% (21735/21735), done.
Checking connectivity... done.
Checking out files: 100% (19616/19616), done.
#


Compiling CDE

Finally we can actually compile the code, this can be expected to take a while even on a fast system and will generate a lot of output, including a lot of warning messages which it seems safe to ignore.

# cd cdesktopenv-code/cde
cdesktopenv-code/cde# make World

Building Release 2.2.3 of CDE

I hope you checked the configuration parameters in ./config/cf
to see if you need to pass BOOTSTRAPCFLAGS.

Sun  6 Sep 21:01:24 BST 2015

cd ./config/imake && make  -f Makefile.ini BOOTSTRAPCFLAGS="" clean
  :
  :
  :
make[1]: Leaving directory '/root/cdesktopenv-code/cde'

Sun  6 Sep 21:12:19 BST 2015

Full build of Release 2.2.3 of CDE complete.
cdesktopenv-code/cde#

Unfortunatly on a Raspberry Pi it will take a little longer…

Building Release 2.2.3 of CDE

I hope you checked the configuration parameters in ./config/cf
to see if you need to pass BOOTSTRAPCFLAGS.

Fri Sep 11 02:48:23 UTC 2015

cd ./config/imake && make  -f Makefile.ini BOOTSTRAPCFLAGS="" clean
make[1]: Entering directory '/root/cdesktopenv-code/cde/config/imake'
  :
  :
  :
make[3]: Leaving directory '/root/cdesktopenv-code/cde/doc/en_US.UTF-8'
make[2]: Leaving directory '/root/cdesktopenv-code/cde/doc'
make[1]: Leaving directory '/root/cdesktopenv-code/cde'

Fri Sep 11 10:09:49 UTC 2015

Full build of Release 2.2.3 of CDE complete.

#

Actually quite a lot longer, approximately seven hours and twenty minutes, and that is after you have installed all the prerequisites! It should be interesting to see how much quicker this is on my Pi2 Model B.

Installing CDE

Providing the compilation was successful then you can install the compiled binaries in their proper places using the installation script.

# cd ~/cdesktopenv-code/cde/admin/IntegTools/dbTools
# ./installCDE -s /root/cdesktopenv-code/cde/
Options specified...
  - get the build tree to extract from

 
Load the Desktop from /root/cdesktopenv-code/cde/
  1. installing database CDE-RUN
      - creating CDE-RUN.lst file
      - installing ... 
        done.
      - checking for errors ...
  :
  :
  :
Desktop installed in /usr/dt
 
Executing linux specific CDE-TT customize script
Executing linux specific CDE-MIN customize script
Executing linux specific CDE-SHLIBS customize script
Executing linux specific CDE-RUN customize script
Unable to compile /usr/dt/config/dtterm.ti
Done.

See installCDE.15781.log for a log of this install session.

# 


Starting CDE automatically

To have the CDE login screen start automatically when the system boots we need to insert the command to start it in ‘/etc/rc.local’.

# vi /etc/rc.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

/usr/dt/bin/dtlogin -daemon &

exit 0

Note – On the Raspberry Pi this causes the system to hang when you shutdown – do not know why yet. No problems on an intel machine though.

If everything went according to plan you should be greeted with the CDE login screen after rebooting the system.

jessie-cde-login


Raspberry Pi is a trademark of the Raspberry Pi Foundation

This entry was posted in Debian, Raspbian and tagged , , . Bookmark the permalink.

One Response to Yet another desktop – Compiling CDE on Debian 8.0 (Jessie)

  1. r8qt7 says:

    Did you create some jessie packages to install?

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s