Menu

FreeBSDBuild

There is a newer version of this page. You can find it here.

CDE for FreeBSD is currently Alpha Quality

We are currently requesting that all contributions to the project are licenced under the MIT licence. Find out why?

WARNING: THIS GUIDE IS FOR ADVANCED USERS FOR USE IN BUILDING AND PORTING.

Note, The following components do not build at all: Dtlogin, DtInfo, DtCm (Calendar).
Most of other items do not work properly.

You should be able to launch the desktop, start Dtterm and change settings using Dtstyle ("Style manager" icon).

1. First steps

Install freebsd9-amd64, get lib32 and ports (Note: ignore lib32 if you using FreeBSD9-i386)

Add your hostname to the localhost line in /etc/hosts

Update your ports tree with portsnap

2. install packages

pkg_add -r xorg
pkg_add -r git
pkg_add -r iconv
pkg_add -r bdftopcf
pkg_add -r libXp
cd /usr/ports/shells/ksh93 && make
make install

3. OpenMotif

Build OpenMotif from ports, fix the Makefile first (fixes a problem building dtpad and dtmail related to XmPrintCallbackStruct)
cd /usr/ports/x11-toolkits/open-motif
{texte editor of your choice} Makefile
change the line
CPPFLAGS+= -DCSRG_BASED -DXUSE_MTSAFE_API -DXNO_MTSAFE_PWDAPI
to:
CPPFLAGS+= -DCSRG_BASED -DXUSE_MTSAFE_API -DXNO_MTSAFE_PWDAPI -I${LOCALBASE}/include

Then:

make
make install

After OpenMotif is installed, please make sure that /usr/local/include/Xm/Xm.h file contains

#ifndef PRINTING_SUPPORTED
#define PRINTING_SUPPORTED 1
#endif

Otherwise something is wrong with the libXp installation and its dependencies or the Makefile has not been changed.

4. Edit /etc/rc.conf

Add to /etc/rc.conf

hald_enable="YES"
dbus_enable="YES"
rpcbind_enable="YES"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"

Reboot

5. Clone the source from the git repository

cd ~
git clone http://sourceforge.net/u/saperski/cde-freebsd/

6. Record all actions for troubleshooting

In case of trouble it is important to have a log file to report problems.

Use the command:

script /tmp/log.txt

to open a log file that will log everything in your terminal (also all letters
and passwords that you might type!) into the /tmp/log.txt file.

After install is complete, you can close the log file using the command "exit".

cd ~/cde-freebsd/cde
mkdir -p imports/x11
ln -s /usr/local/bin /usr/local/include /usr/local/lib imports/x11
mkdir -p imports/motif/include
ln -s /usr/local/include/Xm imports/motif/include

8. Attempt Build

cd ~/cde-freebsd/cde/
make World

This has to be done as root

Create symbolic link for the Korn Shell

# ln -s /usr/local/bin/ksh93 /bin/ksh

10. Install CDE

This has to be done as root

# cd ~/cde-freebsd/cde/admin/IntegTools/dbTools
# ksh93 ./installCDE -s /path/to/cde-freebsd/cde/

11. Create directory required for calendar service

This has to be done as root

# mkdir -p /var/spool/calendar
# ln -s /var/spool /usr/spool

12. Create directory required for ToolTalk

This has to be done as root

# mkdir -p /etc/tt
# cp ~/cde-freebsd/cde/programs/tttypes/types.xdr /etc/tt

13. Close logfile

Type "exit"

/tmp/log.txt should contain recording of all your actions in this terminal.

14. Start CDE

As root:

# ldconfig -m /usr/dt/lib

As normal user:

export PATH=/usr/dt/bin:$PATH
export LANG=C
startx /usr/dt/bin/Xsession

15. Reporting problems

Please check if your logfile (/tmp/log.txt) does not contain sensitive information
and feel free to send it to us.