Skip to content

Instantly share code, notes, and snippets.

@desaster
Created August 4, 2021 16:35
Show Gist options
  • Save desaster/4187356b9788f50056a7f06ea21976c8 to your computer and use it in GitHub Desktop.
Save desaster/4187356b9788f50056a7f06ea21976c8 to your computer and use it in GitHub Desktop.

CDE/NetBSD 9.2 Installation Notes

I was able to compile and install CDE on NetBSD 9.2 using the latest git checkout (2021-08-04, g93e280b0). Here are my notes for it.

Fresh NetBSD 9.2, full installation with X11.

Prepare git

pkgin install mozilla-rootcerts
mozilla-rootcerts install
pkgin install git

Requirements for cde

pkgin -y install git
pkgin -y install ast-ksh
pkgin -y install freetype2
pkgin -y install font-adobe-75dpi
pkgin -y install font-adobe-100dpi
pkgin -y install fontconfig
pkgin -y install motif
pkgin -y install pam-pwauth_suid
pkgin -y install tcl
pkgin -y install autoconf
pkgin -y install automake
pkgin -y install libtool
pkgin -y install gmake

pkgin -y install jpeg-9d
pkgin -y install bison
pkgin -y install byacc
pkgin -y install libiconv

Configuration required by cde

Add to /etc/rc.conf:

rpcbind=YES		rpcbind_flags="-l"

Add to /etc/X11/xorg.conf.d/01-fonts.conf or xorg.conf:

Section "Files"
	FontPath	"/usr/pkg/share/fonts/X11/100dpi/"
	FontPath	"/usr/pkg/share/fonts/X11/75dpi/"
EndSection
/sbin/reboot

clone cde repository

git clone git://git.code.sf.net/p/cdesktopenv/code cde-git
git describe --tags
2.4.0-429-g93e280b0

Add some workarounds in code

These were needed with the version I checked out on 2021-08-04.

diff --git a/cde/lib/csa/debug.h b/cde/lib/csa/debug.h
index c4238581..cd16f3b1 100644
--- a/cde/lib/csa/debug.h
+++ b/cde/lib/csa/debug.h
@@ -39,7 +39,7 @@
 #define DP(a)
 #endif /* CM_DEBUG */
 
-extern void		_DtCm_print_tick(long);
+extern void		_DtCm_print_tick(time_t t);
 
 extern void		_DtCm_print_errmsg(const char *);
 
diff --git a/cde/programs/dtinfo/DtMmdb/utility/config.h b/cde/programs/dtinfo/DtMmdb/utility/config.h
index 106e83b7..75196825 100644
--- a/cde/programs/dtinfo/DtMmdb/utility/config.h
+++ b/cde/programs/dtinfo/DtMmdb/utility/config.h
@@ -42,5 +42,8 @@
 # endif
 #endif
 
+/* hack, since this doesn't get defined like it should */
+#define MMDB_LITTLE_ENDIAN  // i386
+
 #endif

Build

cd cde-git/cde
./autoconf.sh
PATH="$PATH:/usr/X11R7/bin" ./configure --with-tcl=/usr/pkg/lib MAKE="gmake" LDFLAGS="-L/usr/pkg/lib" CFLAGS="-I/usr/pkg/include" CPPFLAGS="-I/usr/pkg/include"
PATH="$PATH:/usr/X11R7/bin" gmake

Install

PATH="$PATH:/usr/X11R7/bin" sudo gmake install

Post-install

The installation seemed to go fine, but dtterm was missing. It's built, though, so I just copied it manually. Probably more stuff is missing or broken, but I haven't done extensive testing.

sudo cp programs/dtterm/.libs/dtterm /usr/dt/bin/

Disable xdm in /etc/rc.conf, if enabled.

Add a startup script /etc/rc.d/dtlogin:

#!/bin/sh
# PROVIDE: dtlogin
# REQUIRE: DAEMON LOGIN wscons
# KEYWORD: shutdown

#
# TODO: I'm not a NetBSD expert, this might not be quite right
#

$_rc_subr_loaded . /etc/rc.subr

name="dtlogin"
rcvar=$name
command="/usr/dt/bin/${name}"
command_args="-daemon"
#pidfile="/var/run/${name}.pid"
extra_commands=""

load_rc_config $name
run_rc_command "$1"

Add to /etc/rc.conf:

dtlogin=YES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment