Skip to content

netrunner01/cde

Repository files navigation

CDE / Motif Theme for XFCE & GTK

A faithful Common Desktop Environment (CDE) / Motif look‑and‑feel for modern X11 Linux desktops. It ships a CDE‑style front panel (the dock with launchers, drawers, a workspace switcher and a clock/calendar), coordinated GTK 2/3/4 and XFWM4 themes, editable Motif colour palettes, and a CDE‑style icon theme. Editing a palette regenerates the desktop theme live.

Release: v1.5.3 (current) · Platform: X11 Linux (XFCE) · Wayland is not supported

Warning

🚧 Roadmap & end of life — the upcoming v1.5.4 will be the final release

The current release is v1.5.3. The next release, v1.5.4, is planned to be the last — a bug‑fix‑only release that will roll up the outstanding fixes for the v1.5.3 line and add no new features, maintained by netrunner01 solely to close out known bugs. v1.5.4 has not been released yet. Once it ships, this project is end‑of‑life — no further releases, fixes, or support.

➡️ File your bug reports now. If something is broken, open an issue as soon as possible — only bugs reported before v1.5.4 can be fixed. Once it's out, that's curtains.

After v1.5.4 the project is yours: the license lets you fork it and fix it yourself.

Interested in taking over as maintainer? If you'd like to continue the project past v1.5.4, email aec-junk@mail.com with the subject line CDE- Maintainer Volunteer.

CDE/Motif panel


Table of contents


Overview

This project recreates the classic CDE/Motif desktop experience on top of a contemporary XFCE + GTK stack. It consists of:

  • Front panel (cdepanel) — a PyQt5 dock rendered with Motif‑style pixmaps. It provides application launchers, expandable drawers grouped by category (Office, Internet, Graphics, …), a workspace switcher, and clock/date buttons that launch a calendar application.
  • Palette editor — open it from the panel to tweak a Motif colour palette; the GTK 2/3/4 colour files and XFWM4 window decorations regenerate to match.
  • Theme assets — GTK themes, XFWM4 decorations, backdrops, Motif .dp palettes, and the bundled NsCDE icon theme.

The panel is X11‑only (it uses python‑xlib) and is developed against XFCE; other desktops are best‑effort.


Requirements

  • X11 session (Wayland is not supported)
  • XFCE desktop environment (recommended)
  • Python 3 with:
    • PyQt5 · Pillow · pyxdg · python‑xlib · PyYAML · colors.py
  • ImageMagick (convert) — for icon colourisation and backdrop conversion
  • x11-xserver-utils (provides xhost etc.)

Python dependencies are pinned in requirements.txt:

pip install -r requirements.txt

On Debian/Ubuntu, the Qt and image libraries are usually cleaner to install from the distro rather than pip:

sudo apt install python3-pyqt5 python3-pil python3-xdg python3-xlib python3-yaml imagemagick x11-xserver-utils
pip install colors.py   # not packaged by most distros

Installation

Quick install

python3 install.py

Useful flags:

python3 install.py --force       # overwrite an existing install
python3 install.py --uninstall   # remove a previous install

The installer:

  • copies the theme to ~/.themes/cdetheme (and creates the cdetheme1 symlink used to force GTK theme reloads),
  • installs the panel config to ~/.config/CdePanel,
  • installs desktop entries to ~/.local/share/applications,
  • installs the NsCDE icon theme to ~/.local/share/icons/NsCDE.

Manual install

Place the theme folder in ~/.themes/ and run ./startpanel from the theme directory. The panel creates its config files on first run.


Running

./startpanel

startpanel launches the panel and picks the best way to run it for your system (see Platform support). It defaults DISPLAY to :0 if it is not already set.

Tip: The CDE panel does not replace xfce4-panel. If both appear, see Troubleshooting for how to disable the default XFCE panel.


Configuration

On first run the panel provisions ~/.config/CdePanel/, which holds:

Item Purpose
config Panel options (fonts, sizes, colours, workspaces)
layout The panel layout (button/drawer order)
drawers/ Per‑drawer application lists
preferredapps Priority order for apps placed into generated drawers
palettes/ Motif .dp colour palettes
cache/, tmp/ Colourised icon cache / scratch space

Drawers are auto‑generated from the applications found on your system, grouped by freedesktop category. You can also create your own drawers by copying a file in drawers/ and adding an entry to layout.

Palettes: open the palette editor from the panel to switch or edit palettes. Changes regenerate the GTK 2/3/4 and XFWM4 theme files so the whole desktop stays in sync.

Default applications and detection

The panel builds its launchers and drawers by scanning the applications installed on your system and, where it can, by reading your desktop's default‑application settings — the web browser, file manager, terminal, and the calendar app used by the clock/date buttons.

This detection is best‑effort. The panel checks the common, standards‑based locations across the major desktops and distributions — XDG mimeapps.list, xdg‑settings, XFCE helpers.rc, MATE/Cinnamon dconf, the Debian alternatives system, and a fallback list of well‑known apps — and it verifies that the chosen .desktop entry points to a program that is actually installed before using it. But the freedesktop "default application" mechanism is inconsistently implemented, and many apps, desktops, and distributions do not follow it correctly. There is no way to detect every non‑standard configuration, so on an unusual setup the panel may pick a sensible app rather than your exact preferred one. When that happens, refresh detection or set the launcher by hand (below) — we can't work around every third‑party mistake, but you can always override the result.

Refreshing app detection

The layout is generated once, on first run, and then cached — it does not change automatically when you install a new app or change your default browser. To rebuild it from your currently installed apps and current defaults:

rm ~/.config/CdePanel/layout
./startpanel

This regenerates the launcher bar and the drawer contents only; your panel options (config), palettes, and other settings are left untouched.

To set a single launcher by hand instead, edit ~/.config/CdePanel/layout and change the .desktop path on the relevant line — for example, point the Internet launcher at a specific browser:

launcher /usr/share/applications/org.kde.falkon.desktop Internet

Then restart the panel.


Building a standalone binary (optional)

No pre‑built cdepanel binary is shipped. If you want one, build it on the machine that will run it (a binary built against a newer glibc can fail on older distros):

python3 -m pip install -r requirements.txt pyinstaller
python3 -m PyInstaller cdepanel.spec
cp dist/cdepanel ./cdepanel && chmod +x ./cdepanel

Run ./cdepanel to test the binary directly. Note that ./startpanel may still prefer the Python source if files under scripts/ are newer than the binary; set CDEPANEL_PREFER_SOURCE=1 to force source execution.

Do not build a PyInstaller binary on ARM — it will not run there. Use the Python source directly (which startpanel does automatically on ARM).


Platform support

X11 Linux / XFCE (primary)

The primary and best‑supported target. Requires an X11 session and works best under XFCE. This release was tested on Xubuntu (XFCE).

ARM (aarch64 / armv7l)

startpanel detects the architecture and runs the Python source directly on ARM.

sudo apt install python3-pyqt5 imagemagick
pip3 install -r requirements.txt
./startpanel

Android via Termux (experimental)

Experimental / for tinkering only. Android/Termux is a secondary target and is not well supported. Expect rough edges.

The theme can run on Android through Termux + Termux:X11, inside a proot-distro Linux environment (e.g. Debian), which gives a standard Linux filesystem and correct GTK3 theming.

  1. Install Termux (from F‑Droid, not Google Play) and the Termux:X11 APK (from the termux-x11 releases).
  2. In Termux, set up a distro:
    pkg update && pkg upgrade
    pkg install x11-repo proot-distro
    proot-distro install debian
    proot-distro login debian --shared-tmp
  3. Inside the distro, install dependencies and run:
    apt update && apt install -y xfce4 python3 python3-pip imagemagick \
        x11-xserver-utils python3-pyqt5 python3-pil python3-yaml python3-xdg python3-xlib
    pip3 install colors.py --break-system-packages
    python3 install.py
    cd ~/.themes/cdetheme && ./startpanel
    The Termux:X11 server must be running first.

Known Android/Termux limitations:

Issue Workaround
Phantom Process Killer kills the desktop (Android 12+) Android 14+: Developer Options → "Disable child process restrictions". Android 12–13: adb shell settings put global settings_enable_monitor_phantom_procs false
Black screen with only a cursor Start Termux:X11 with -legacy-drawing
Swapped red/blue colours Add the -force-bgra flag
Panel too small/large (high‑DPI phones) Adjust XFCE Appearance settings or the -dpi flag
GTK3 apps ignore the theme (native Termux) Use proot-distro (this bug does not occur there)

Troubleshooting

Both the CDE panel and the XFCE panel appear at the bottom. The CDE panel does not replace xfce4-panel. Disable the XFCE panel:

xfce4-panel --quit

To stop it starting permanently, write an empty panel config:

mkdir -p ~/.config/xfce4/xfconf/xfce-perchannel-xml
cat > ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<channel name="xfce4-panel" version="1.0">
  <property name="configver" type="int" value="2"/>
  <property name="panels" type="array"/>
</channel>
EOF

A locally built cdepanel binary fails on an older distro. This is usually a glibc mismatch. startpanel automatically falls back to running the Python source. You can also delete ./cdepanel or set CDEPANEL_PREFER_SOURCE=1.

WSL2 / VcXsrv. The panel forces the X11 backend for XFCE components by overriding Wayland environment variables (WAYLAND_DISPLAY, XDG_SESSION_TYPE), so it runs under an X server on WSL2.

Clicking the calendar button does nothing. The clock/date buttons auto‑detect a calendar app; install one if none is present, e.g. sudo apt install gsimplecal.

A launcher opens the wrong app, or an app you removed. Launchers are detected once on first run and then cached, so they don't follow later changes to your installed apps or default applications. Rebuild them from your current system:

rm ~/.config/CdePanel/layout
./startpanel

App detection is best‑effort and cannot account for every non‑standard default‑application configuration; see Default applications and detection for how the panel chooses apps and how to set a launcher by hand.


What's new in v1.5.3

  • Color‑scheme selection now works — picking a colour scheme in the panel's settings dialog was broken: the colour picker crashed on open because of a PyQt4 signal API that was removed in PyQt5. It is fixed, so palettes can again be chosen from the dialog — and the change now applies quickly.
  • Calendar buttons — the clock/date panel buttons now launch a calendar app, auto‑detected across desktops (XFCE Orage, GNOME Calendar, gsimplecal, …). A blocklist prevents non‑calendar apps (LibreOffice, editors, Thunderbird) that merely register for the text/calendar MIME type from being chosen. Legacy targets (NOAPP, xfcalendar, Orage) are upgraded to a working entry at runtime.
  • Backdrop tiling fix — tiled backdrops are tiled (not scaled) via the XFCE image-style property; gradient backdrops are stretched.
  • GTK theme regeneration — GTK2 (gtkrc) and GTK3/4 (CSS) colour files are now regenerated when the palette changes (previously dead code after a return).
  • Workspace‑switch fix — the panel keeps a stable application identity and is placed on all desktops in XFCE, so it no longer disappears when a workspace button is clicked.
  • First‑run theming — the XFCE/GTK theme is applied synchronously before the panel becomes interactive, so apps launched immediately inherit CDE styling.
  • NsCDE icon theme bundled and installed on first run.
  • startpanel robustness — architecture detection; falls back to Python source when a built binary fails (e.g. a glibc mismatch on an older distro) or when the source is newer than the binary (CDEPANEL_PREFER_SOURCE=1 to force).
  • Installer rewrite (install.py v2.0) — correct paths and --uninstall.
  • Python 3 / modern Qt & Pillow — resolved PyQt5 deprecations across 15+ files, worked around ImageQt removal in Pillow, and fixed cross‑platform signal handling.

Credits & attribution

  • Original author (credit only): Jos van Riswick. The theme originated as his "CDE / Motif theme for Xfce / Gtk etc" on https://www.gnome-look.org/p/1231025/. He is credited here for that original work only; he ceased maintenance and all support of the theme some years ago, so please do not direct support requests to him.
  • The port to Python 3.x and newer GTK was produced with AI coding assistants.
  • NsCDE icon theme — from the NsCDE project ("Not so Common Desktop Environment"), licensed GPL‑3.0, © NsCDE contributors. Installed automatically on first run.

License

This project is licensed under the GNU General Public License, version 3 or later (GPL‑3.0‑or‑later). The complete licence text is in the LICENSE file, or online at https://www.gnu.org/licenses/gpl-3.0.html.

CDE / Motif Theme for XFCE & GTK Copyright (C) 2026 Arthur Clark (netrunner01)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

This work builds on the original CDE/Motif theme by Jos van Riswick (published via gnome‑look.org), whose author granted permission to fork, publish, and continue the project.

The bundled NsCDE icon theme (icon_themes/NsCDE/) is a separate component distributed under its own GPL‑3.0‑only licence — see icon_themes/NsCDE/COPYING.


Support

Bug reports are accepted until v1.5.4 ships — please open an issue as early as possible (see the End of life notice at the top of this README). v1.5.4 will be a bug‑fix‑only, final release (not yet released); after it the project is end‑of‑life and provided as‑is, with no further releases, fixes, or support — you are free to fork it and continue it yourself.

Even now, support is limited to bugs in this theme. The maintainer (netrunner01) is not the original developer and cannot answer general questions about Python, GTK, or XFCE — please research those independently. The original author ceased maintenance of the theme some years ago, so please do not direct questions to him.

About

CDE 1.5.3 — a Motif/CDE-style desktop panel and theme for X11 Linux (XFCE), based on the original by Jos Van Riswick

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages