Other CDE Users Unite!

Can you imagine how much cool could be a mobile phone with freeBSD installed,with a physical keyboard and CDE as desktop manager ?


We're working in a secure perimeter, and I haven't explored that closely. I think that things are not so good there, if you do not take additional actions on network protection. Here is an article, for example (very old) -
Don't put dtspcd in your inetd.conf. It's not needed.
  • Thanks
Reactions: _al
Motif window decorations; awesome. The "toolbar" or whatever it was called at the bottom, was/is awesome. Combination of a Mac toolbar, desktop pager, always very useful.
  • Like
Reactions: cy@
I don't want to offend anyone. But I think it's a /restrike/Neuprägung ( in terms of numismatics) . But that doesn't mean it's worse than the real thing.
I suggest also the NsCDE however it want bring down a lot of QT stuff... 🤷‍♂️

Any Windowmanager/desktop environment is basically "Look and Feel". How it looks and how it works. Looks: lots of window managers can be tweaked to look like something else. How many things have fvwm emulations? I couldn't do it, but one could probably tweak KDE/Gnome to look like Motif. The Feel is often harder to emulate. A lot depends on specific applications and how they interact with each other.
Seriously, the toolbar at the bottom is one of the things I found most useful with CDE. MacOS/NeXt/WindowMaker Dock, pager, a bit of "taskbar" from other OSes. Simple, useful, elegant (engineering POV). Overall CDE was/is a Desktop Environment that didn't use a ton of resources.

Getting back the the post I'm replying to:
Modern graphical toolkits make it easier to implement things like CDE. Once you understand how the toolkit works, you wind up writing less code than you would programming against pure X and Motif but you are at the mercy of the toolkit behaving correctly.
mer I guess they put steroids on FWWM to overcome the shortcoming of CDE while preserving the same behavior and looks and feel... 🤔
  • Like
Reactions: mer
Thank you. I did not configure rpcbind and inetd to listen localhost only (as you said early) yet. But I am going to do that.
Cool. Yeah if you are offline its obviously not a problem but certainly the network elements of those programs haven't been maintained so well over the years so better to not risk it.


I started using CDE on DEC Alpha on OSF/1 (before it became Tru64) and occasionally on Solaris -- the Alpha was my primary workstation. That was in 1992. I had tried a commercial product on FreeBSD in 1996 or 1997 but it was poorly supported and klunky, not like on OSF/1.

I'm currently running 2.5.0 here using the yet to be committed port. It's a little faster, at least it feels faster. The default font is annoyingly bigger, but that can be changed. Other than that it's looking good.

Yet todo: run it through my poudriere and reinstall the binary package from my package repo. Then, finally push it to ports.

It's looking good.


No, I'm online all the time. But luckily I don't use dtlogin.
I don't use dtlogin either. I use xdm. My .xsession has this code that allows me to pick and choose at login.

'')     case $XDMWM in
        '')     case $HOSTNAME in
                cwtest) XDMWM=`/usr/local/bin/xmessage -buttons cde,mwm,fvwm2,tw
m,ctwm,xsm,lxde,xfce,mate,gnome,xterm,logout -file /etc/motd -print -timeout 60
-default cde -center`;;
                *)      XDMWM=`/usr/local/bin/xmessage -buttons cde,mwm,fvwm2,tw
m,ctwm,xsm,lxde,xfce,mate,gnome,xterm,logout -file /etc/motd -print -timeout 60
-default cde -center`;;

Ok, you might ask why? Well sometime I'm with others, like at OpenHack. They look at my desktop, thinking FreeBSD is retro. So, I log in with one of the others they're more familiar with to show off something a little more modern. Given that the vast majority of developers here are web developers and UX designers are plentiful here, advocacy is part of what I, as a developer, need to do in this part of the world.


Didn't HP-UX use CDE by default? Last time I used that was early 2000s.
Yes it did.

Though I have to say, I never did like HP-UX. Most of our machines were headless servers but the couple that did have graphical consoles, CDE was the same as on the DEC Alpha and Solaris.


More on cde 2.5.0 and fonts. It's not fonts per se. It's X resources. Traditional apps, those built using Athena, Motif, and Xt, not newer apps built using gtk* or qt, are unable to find fonts. Xm (motif) uses X resources. The font resources appear to be a problem.

I plan on renaming cde to cde-24, committing cde-25 and adding a cde meta port that will initially point to cde-24. While here at home I'm cobbling up a patch to cde-25 to allow it to coexist (be installed on the same computer) as cde-24 (at least for myself) to play around with it without breaking too much here. One can have XDM to listen to two X servers on the same machine or ctrl-alt-F8 (or whatever) to startx cde-25 when I have time to play, in between all the other projects. (This of course might mean keeping two different copies of ~/.dt or testing under a different user account -- wiser option.)

Having said that, I did have, until today, an uncommitted cde-devel port. I'm kind-of liking that idea better for playing with CDE and reporting bugs upstream. I'll probably need a bit of time to consider options but right now CDE isn't my #1 priority (unless it's a very quick win, which sadly it appears it won't be).
I use xdm. My .xsession has this code that allows me to pick and choose at login.
Thanks for sharing this.

Your settings are advanced. Mine are more primitive (I only use two WMs - CDE and Gnome).

I use a terminal login and run startx from there.
Befote that, I configure .xinitrc for WM I'm going to use .
If I'm going to use Gnome. I run ~/2gnome.
If I'm going to use CDE, I run ~/2cde.
(Most often I work in CDE, so this is one-time action)

cp ~/.xinitrc_GNOME ~/.xinitrc

setxkbmap -layout us,ru -option grp:win_space_toggle &
xscreensaver -no-splash & exec /usr/local/bin/gnome-session > ~/.xsession-errors_GNOME 2>&1

cp ~/.xinitrc_CDE ~/.xinitrc

setxkbmap -layout us,ru -option grp:alt_shift_toggle &
(sleep 5 && xrdb -merge ~/.Xresources_CDE) &
exec /usr/dt/bin/Xsession > ~/.xsession-errors_CDE 2>&1

xterm*faceName: Monospace
xterm*faceSize: 9
XTerm*selectToClipboard: true

For the last 10 years I have been working in Debian and Windows (and continue to work) , which do not require such tuning (there is "all inclusive" there, which is not always good...)
More on cde 2.5.0 and fonts. It's not fonts per se. It's X resources.
I use ru_RU.UTF-8 locale, but I could not use fonts with iso10646-1 character set. Instead, I use iso8859-5 fonts.

I have the following fonts:
[lanin@freebsd /usr/local/share/fonts]$ ls -l -D %F
total 264
drwxr-xr-x  2 root   wheel  71680 2022-04-08 100dpi
drwxr-xr-x  2 root   wheel  87040 2022-04-08 75dpi
drwxr-xr-x  2 root   wheel   1024 2022-04-09 bitstream-vera
drwxr-xr-x  2 root   wheel    512 2022-04-11 Caladea
drwxr-xr-x  2 root   wheel    512 2022-04-08 cantarell
drwxr-xr-x  2 root   wheel    512 2022-04-11 Carlito
drwxr-xr-x  2 root   wheel   4096 2022-04-08 cyrillic
drwxr-xr-x  2 root   wheel   1024 2022-07-27 dejavu
drwxr-xr-x  3 root   wheel   2048 2022-04-08 encodings
drwxr-xr-x  2 root   wheel    512 2022-04-11 GentiumBasic
drwxr-xr-x  2 root   wheel   1024 2022-07-25 Liberation
drwxr-xr-x  2 root   wheel   1024 2022-04-11 LinLibertineG
drwxr-xr-x  2 root   wheel  18432 2022-04-08 misc
drwxr-xr-x  2 root   wheel   1536 2022-04-08 OTF
drwxr-xr-x  2 root   wheel  12800 2022-07-20 terminus-font
drwxr-xr-x  2 root   wheel    512 2022-07-20 TerminusTTF
drwxr-xr-x  2 root   wheel   1024 2022-07-20 TTF
drwxr-xr-x  2 root   wheel    512 2022-04-11 twemoji-color-font-ttf
drwxr-xr-x  2 root   wheel   2048 2022-04-08 Type1
drwxr-xr-x  2 lanin  lanin   1024 2022-07-20 wqy-bitmapsong
drwxr-xr-x  2 root   wheel    512 2022-07-20 wqymhr

which I connect like this (thanks to https://forums.freebsd.org/threads/installing-truetype-fonts-on-freebsd.65261/post-382970):
[lanin@freebsd /usr/local/etc/X11/xorg.conf.d]$ ls -l -D %F
total 8
-rw-r--r--  1 root  wheel  1005 2022-07-20 10-files.conf
-rw-r--r--  1 root  wheel    49 2022-07-20 15-modules.conf

Section "Files"
    FontPath "/usr/local/share/fonts/100dpi/"
    FontPath "/usr/local/share/fonts/75dpi/"
    FontPath "/usr/local/share/fonts/bitstream-vera/"
    FontPath "/usr/local/share/fonts/Caladea/"
    FontPath "/usr/local/share/fonts/cantarell/"
    FontPath "/usr/local/share/fonts/Carlito/"
    FontPath "/usr/local/share/fonts/cyrillic/"
    FontPath "/usr/local/share/fonts/dejavu/"
    FontPath "/usr/local/share/fonts/GentiumBasic/"
    FontPath "/usr/local/share/fonts/Liberation/"
    FontPath "/usr/local/share/fonts/LinLibertineG/"
    FontPath "/usr/local/share/fonts/misc/"
    FontPath "/usr/local/share/fonts/OTF/"
    FontPath "/usr/local/share/fonts/TTF/"
    FontPath "/usr/local/share/fonts/twemoji-color-font-ttf/"
    FontPath "/usr/local/share/fonts/Type1/"
    FontPath "/usr/local/share/fonts/wqymhr/"
    FontPath "/usr/local/share/fonts/wqy-bitmapsong/"
    FontPath "/usr/local/share/fonts/terminus-font/"
    FontPath "/usr/local/share/fonts/TerminusTTF/"

Section "Module"
    Load  "freetype"

And (in CDE 2.5.0) I use the system-wide font alias file - /usr/dt/etc/cde/fontaliases/fonts.alias

I edited it for myself (for using in ru_RU.UTF-8 locale), here it is.


  • fonts.alias.zip
    19.2 KB · Views: 20


The problem with CDE 2.5.0 is definitely resources, not just fonts. X resources are used by older -- Athena (Xaw), Motif (Xm), and others - to allow apps to find X resources such as fonts, colours, pointers, icons, etc. This is controlled by a number of files, one of which is ~/.Xresources or in the case of CDE ~/.dt/sessions/*/dt.resources. Same format file different location. The file is loaded into X memory using xrdb(1). XDM through its Xsession scripts and startx through its scripts issues this command. I suspect that CDE is probably not passing the correct parameters to xrdb(1) missing some important resources.

The the difference I noticed is that CDE 2.3 used ~/.dt/sessions/current whereas CDE 2.4 uses ~/.dt/sessions/home, with the current session is in ~/.dt/dtwmfp.session. CDE 2.5 restored the CDE 2.3 behaviour.

Until I sort this out CDE 2.4.0 will remain our CDE in ports. However I do have some local commits which rename cde to cde-24, create a cde metaport that points to cde-24 (making it our default CDE), and adds a cde-25 port, which can optionally be installed in ${LOCALBASE}/dt25, allowing it to coexist with cde 2.4 while the either "bug" or misunderstanding is sorted out. Are people interested in this? If not I will continue to poke around at this during my spare time (this becomes project with priority 3 behind two other more important FreeBSD problems I'm working on). Or do people want to play around with this? Should I commit this so some other person might be able to find the solution before I get to it.



Indeed it is resources. xrdb -merge ~/.Xresources resolves some of my issues.

However, my .xsession contains:


if [ -f $resources ]; then
        xrdb -load $resources
       [... some other unrelated code for firefox under mwm...]

This suggests that CDE 2.5.0 is running some script after my .xsession to replace my resources probably using xrdb(1). This is why colours and fonts are missing.

What is puzzling is that my .dt/sesssions/home/dt.resources contains the following manual edit at the end of the file:

#include "/home/cy/.Xresources"

It should have loaded my resources anyway. Is it ignoring a user's resources?

People who do not run Xaw, Xm, or other older apps, running only CDE apps, gtk, and qt apps (gtk, qt, and newer toolkits don't use Xresources), will not notice this problem.

Enough playing with CDE. Gotta get back to more pressing issues for now.
  • Thanks
Reactions: _al
Are people interested in this? If not I will continue to poke around at this during my spare time (this becomes project with priority 3 behind two other more important FreeBSD problems I'm working on).
Thank you.

As for me, it is not a first necessity. I'm quite happy with the solution I found. I understand that it is far from the best, but so far it suits me. Of course, it would be nice if Xm, CDE could work with iso10646-1 fonts (in the Russian locale ru_RU.UTF-8 inclusive). And as for me, I switched to CDE 2.5.0, and I do not plan to return to CDE 2.4.0. I don't want to take you away from your primary tasks. I think CDE can wait.

I once wrote a GUI application using Motif a long time ago. But now it's not fashionable (at least customers don't need it - give them KDE). Now I write only console applications. And if I ever write GUI applications again, then only for myself and only on Motif.