Menu

NetBSD

Jon Trulson Christopher Turkel Danilo Pecher
There is a newer version of this page. You can find it here.
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.

1. First steps

Install NetBSD/i386 or NetBSD/amd64.
(versions from 5.1.2 to 7.0 have been tested)

2. Install packages

The build expects the following packages under /usr/pkg:

git
ast-ksh
freetype2
font-adobe-75dpi
font-adobe-100dpi
fontconfig

All other required packages are installed as dependency.

Note
If you are using pkgsrc to install these packages, please note that ast-ksh does not build in NetBSD 7.0 and it doesn't look like it is going to be fixed anytime soon. Check your PKG_PATH environment variable and make sure it contains:

ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/6.1/All/ (for the i386 version) or
ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/6.0/All/ (for the x64 version)

then install it by issuing pkg_add -v ast-ksh

3. Install Motif

Build Motif from source! This has to be done as root.

Download pkgsrc from http://ftp.netbsd.org/pub/pkgsrc/stable/pkgsrc.tar.gz
and install it under /usr

Change into motif directory:
cd /usr/pkgsrc/x11/motif

Apply the following patch: (the two empty lines have a space-character!)

--- Makefile.orig 2013-03-07 14:54:03.000000000 +0100
+++ Makefile 2013-10-28 23:48:56.000000000 +0100
@@ -46,3 +46,3 @@

-CONFIGURE_ARGS+= --disable-printing
+CONFIGURE_ARGS+= --enable-printing

@@ -113,2 +113,4 @@
.include "../../x11/libXft/buildlink3.mk"
+.include "../../x11/libXp/buildlink3.mk"
+.include "../../x11/printproto/buildlink3.mk"
.include "../../x11/xbitmaps/buildlink3.mk"

Save the patch in file motif_xprint.diff.
Run the command:
patch < motif_xprint.diff

Build and install motif:
make
make install

Note
add the two lines

.include "../../x11/libXp/buildlink3.mk"
.include "../../x11/printproto/buildlink3.mk"

at the end of /usr/pkgsrc/mk/motif.buildlink3.mk or other Motif dependent packages will not build properly.

4. Edit system files

Add your hostname and ip address to /etc/hosts

Add to /etc/rc.conf
rpcbind=YES rpcbind_flags="-l -i"

Add to "Files"-section of /etc/X11/xorg.conf
FontPath "/usr/pkg/share/fonts/X11/100dpi/"
FontPath "/usr/pkg/share/fonts/X11/75dpi/"

Reboot

5. Clone the source from the git repository

Use the git clone command to talk to the Git repository:
git clone git://git.code.sf.net/p/cdesktopenv/code cdesktopenv-code

Alternatively you can download and unpack the CDE tarball:
http://sourceforge.net/projects/cdesktopenv/files/latest/download

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.

If you use the native X11 installation that came with NetBSD, create the following symlinks

cd cdesktopenv-code/cde
mkdir -p imports/x11/include
ln -s /usr/X11R7/include/X11 imports/x11/include/
ln -s /usr/pkg/include/Xm imports/x11/include/
ln -s /usr/pkg/include/fontconfig imports/x11/include/
ln -s /usr/pkg/include/freetype2/ft2build.h imports/x11/include/

If you installed modular-xorg from the pkgsrc tree, create the following symlinks instead:

ln -s /usr/pkg /usr/X11R7
cd cdesktopenv-code/cde
mkdir -p imports/x11/include
ln -s /usr/X11R7/include/X11 imports/x11/include/
ln -s /usr/X11R7/include/Xm imports/x11/include/
ln -s /usr/X11R7/include/fontconfig imports/x11/include/
ln -s /usr/X11R7/include/freetype2/ft2build.h imports/x11/include/

8. Build CDE

cd cdesktopenv-code/cde
make World

9. Install CDE

This has to be done as root:
cd cdesktopenv-code/cde/admin/IntegTools/dbTools
./installCDE -s /path/to/cdesktopenv-code/cde

Note
If any programs didn't build properly, you will be notified of missing programs during the first installation step. Check the log file if that happens.

10. Close logfile

Type "exit"
/tmp/log.txt should contain recording of all actions in the terminal.

11. Start CDE

You can now start CDE login manager as root:
/usr/dt/bin/dtlogin -nodaemon

Alternatively, you can start an X session as a normal user:
env LANG=C startx /usr/dt/bin/Xsession

12. Reporting problems

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


MongoDB Logo MongoDB