Skip to main content Logo

Quis custodiet ipsos custodes?
Home | About | All pages | Cluster Status | RSS Feed | Gopher

The Common Desktop Environment (CDE) is still developed and modern in 2021

Published: 28-01-2021 | Author: Remy van Elst | Text only version of this article

❗ This post is over two years old. It may no longer be up to date. Opinions may have changed.

CDE on Debian 10

CDE on Debian 10 with Firefox open

While playing around with the GUI on OpenVMS I was looking for CDE documentation and I found out CDE is still being developed and can be installed on modern linux. This quick post shows you how to install CDE on Debian 10 and includes a bit on compiling GENERIC TETRIS, the same program I installed on OpenVMS.

Recently I removed all Google Ads from this site due to their invasive tracking, as well as Google Analytics. Please, if you found this content useful, consider a small donation using any of the options below:

I'm developing an open source monitoring app called Leaf Node Monitoring, for windows, linux & android. Go check it out!

Consider sponsoring me on Github. It means the world to me if you show your appreciation and you'll help pay the server costs.

You can also sponsor me by getting a Digital Ocean VPS. With this referral link you'll get $100 credit for 60 days.

Really cool to compile and run a game from 1992 on a retro/modern desktop environment. Makes you wonder how the world could look, if everyone was on CDE still. Resource usage is low and everything is so snappy and quick, it feels amazing. I might even consider switching to CDE fulltime.


Tetris from 1992 on CDE on Debian 10 in 2021

Preparation and dependencies

The CDE project page has great documentation on installing on modern linux. This guide is specific for Debian 10 and does not use the dtlogin session manager, but integrates CDE in the "regular" login manager, either lightdm, gdm or sddm. This guide by mike632t (Mike?) was very helpful, but I didn't have any problems with locales. He also adds a service for dtlogin, which I won't, I'll be using the regular login manager.

I assume all steps are run as root, in root's home folder (/root/).

There's a whole bunch of packages you'll need to build CDE. Here's the entire bunch:

apt install xserver-xorg xserver-xorg-core xfonts-base xinit lightdm git
build-essential libxt-dev libxmu-dev libxft-dev libxinerama-dev libxpm-dev
libmotif-common 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 xfonts-75dpi 
xfonts-75dpi-transcoded rpcbind bison xbitmaps libjpeg-dev libssl-dev x11proto-fonts-dev

The CDE documentation has information on locales, but my debian 10 XFCE install did not require any of those steps.

Get the CDE source code with git

Use git to get the source code for CDE:

git clone cdesktopenv-code

Go into the new folder and continue on to the next section.

cd cdesktopenv-code/cde/

Compile CDE

Execute the make command to build the desktop environment. This will take a long time, on my virtual machine with 4 cores and 4 GB RAM it took almost an hour. You can edit the Makefile and add -j4 at the beginning of the MAKE_OPTS line, which will then use more cores. Still takes long though.

# pre 2.4.0: make World

When the build finishes, use the following command to install CDE:

# pre 2.4.0: ./admin/IntegTools/dbTools/installCDE -s /root/cdesktopenv-code/cde/
sudo make install

Finally, copy the session file for your regular login manager. If you do this, you will be able to select CDE next to XFCE, GNOME or whatever you currently use.

 cp /root/cdesktopenv-code/cde/contrib/desktopentry/cde.desktop /usr/share/xsessions/

Reboot to make this active.

Why not use dtlogin? That will probably mess with your current settings so much that you will have difficulty going back. Also, in my case, dtlogin sets the resolution to 800x600, lightdm uses the regular resolution. You can use xrandr or arandr to change the resolution in CDE, but if it works right away that's just easier.


This is optional, but if you want to keep your system clean and be able to remove CDE afterwards, you can use checkinstall to build .deb packages for easy installation and removal. When building .deb packages for other people, checkinstall is not recommended but for your own system, it helps keep things tidy.

checkinstall is not in the main repo's for Debian Buster, but is in the backports. Add the following line to /etc/apt/sources.list:

deb buster-backports main

Do an update and then install checkinstall from backports:

apt update
apt install checkinstall/buster-backports

Execute checkinstall instead of make install after the make:

checkinstall --pkgname=local-cde -s /root/cdesktopenv-code/cde/

Afterwards install the .deb package created by checkinstall:

dpkg -i *.deb

Using CDE

If you do follow Mike's guide, then you can use dtlogin as login manager. It looks like this:

dtlogin debian

If you follow this guide, you'll use your regular login manager, select the CDE session in there to login.

After logging in the first time, a big blue screen with some version information is shown:

version info

The desktop is nice, clear and clean, with a help window popping up, just like on OpenVMS. The below screenshot shows a few open programs, like firefox and the Application Starter:


Go play around with all the programs, like the file manager, terminal, style manager and the dock. If you use local mail, there is a mail client and also a print program. Works with CUPS so if you've got a printer setup, it should be usable right away. Resource usage is low and everything is so snappy and quick, amazing.

Autostart programs on CDE login

If you want to auto-start applications on CDE when logging in, you can simply open them and not close them before logging out, it will remember them. You can also put them in a file:

mkdir -p ~/.dt/sessions/
vim ~/.dt/sessions/sessionetc

Add one command per line, ending with an ampersand (&):

firefox &

Afterwards don't forget to make the file executable:

chmod +x ~/.dt/sessions/sessionetc

Now onto the fun part, gaming!


After posting the OpenVMS CDE article on Lobsters, user kidon replied on the tetris part. It's written by Qiang Alex Zhao and although the Makefile being outdated, you can manually compile and run it. First download the source, I mirrored it on this site:


Unzip and go into the folder:

cd tetris_3_1_2

Compile it manually:

 cc -o tetris tetris.c utils.c playing.c -lX11 -lXaw

(You do need all the CDE development package dependencies as installed in the above paragraph)

There should now be a binary in the folder which you can execute:

remy@debian:~/tetris_3_1_2$ \ls -la ./tetris
-rwxr-xr-x 1 remy remy 67064 Jan 28 15:35 ./tetris

Running it pops up a graphical window with the game:



Use the arrow keys to move the piece around, space to plop it down instantly, k to rotate and n to see the next piece.

Afterwards your score is shown:

                 GENERIC TETRIS V3.1.2
Copyright (C) 1992-93      Q. Alex Zhao,

- Thu Jan 28 15:37:48 2021
- Your final score is 333, at level 3 with 1 rows.
Tags: blog , cde , debian , gui , linux , openvms , ubuntu , vms