Menu

FreeBSDBuild

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: Compilation with system clang is now supported on FreeBSD 10 and later

Table of Contents

Supported Versions

These instructions have been successfully tested on :

  • FreeBSD 12.3-RELEASE aarch64 (Raspberry Pi3)
  • FreeBSD 12.3-RELEASE x86_64
  • FreeBSD 12.4-RELEASE aarch64 (Raspberry Pi3)
  • FreeBSD 12.4-RELEASE x86_64
  • FreeBSD 12-STABLE x86_64
  • FreeBSD 13.1 x86_64
  • FreeBSD 13-STABLE x86_64
  • FreeBSD 14.0-CURRENT x86_64

First steps

Install FreeBSD 12-RELEASE or FreeBSD 13-RELEASE and install/update your ports tree.

freebsd-update fetch
freebsd-update install

reboot.

Complete install documentation can be found in the FreeBSD Handbook.

If you plan to install the dependencies from source, fetch the current ports tree and build the portmaster utility:

portsnap fetch extract update
cd /usr/ports/ports-mgmt/portmaster
make -DBATCH install clean

Install packages

Install packages from source

the source packages can be built and installed using the following sequence

portmaster -C -D --no-confirm -y \
  x11/xorg \
  devel/git \
  converters/iconv \
  shells/ksh93 \
  x11-toolkits/open-motif \
  lang/tcl86
  textproc/opensp

If you don't want to wade through the many configuration steps and build with the standard configuration instead, add the -G parameter to portmaster.

More information about ports and packages can be found in the FreeBSD Handbook Ports chapter. More information about X11 in FreeBSD can also be found in the X11 Chapter in the FreeBSD Handbook.

Install binary packages

To install precompiled binary packages, make the following call

pkg install cde xorg

If you wish to track the CDE development branch,

pkg install cde-devel xorg

The development branch is updated monthly though it may be updated more frequently.

Edit /etc/rc.conf

Add to /etc/rc.conf

rpcbind_enable="YES"
inetd_enable="YES"

Reboot

Clone or download the source code

Use the git clone command here:

On most platform you can use HTTPS:

git clone https://git.code.sf.net/p/cdesktopenv/code cdesktopenv-code

If that doesn't work (for instance some BSD distros) , use the native git protocol instead

git clone git://git.code.sf.net/p/cdesktopenv/code cdesktopenv-code

Or download the latest source release:

Note: The source archive will become out of date. When you want the latest code, clone the git repository.

Build CDE

Version 2.5.0 and newer (autoconf)

For the BSD's, you must use gmake, and you must specify the location of the TCL install directory (the below example assumes TCL v8.6).

$ ./autogen.sh
$ ./configure --with-tcl=/usr/local/lib/tcl8.6 MAKE="gmake"
$ gmake
$ sudo gmake install

Version 2.4.0 and earlier (imake) - deprecated

cd cdesktopenv-code/cde
make World
admin/IntegTools/dbTools/installCDE -s `pwd`

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:

startx /usr/dt/bin/Xsession

Install dtlogin as Login Manager

Switch to the CDE build directory and copy and enable the rc-file

cp contrib/rc/freebsd/dtlogin /usr/local/etc/rc.d/
echo 'dtlogin_enable="YES"' >> /etc/rc.conf
echo "allowed_users=anybody" > /usr/local/etc/X11/Xwrapper.config

reboot


Related

Wiki: SupportedPlatforms

Discussion

<< < 1 2 3 > >> (Page 2 of 3)
  • Danilo Pecher

    Danilo Pecher - 2021-11-02

    I 'll have a look into it

    On Tue, 2 Nov 2021 at 15:12, Andrey Komarov
    aak1978@users.sourceforge.net wrote:

    CDE 2.4.0: i386 is now broken because it cannot bind to a temporary of type va_list.


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cdesktopenv/wiki/FreeBSDBuild/

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     
    • Roger Brown

      Roger Brown - 2021-12-06

      patch

      I have a patch that lets you build 2.4.0 on FreeBSD i386, it is not a general patch, it is just applied only when building for that platform.

       
      • Andrey Komarov

        Andrey Komarov - 2021-12-07

        Can I write a quick guide to installing CDE 2.4.0

        Vào 15:59:43 GMT+7, Thứ Hai, 6 tháng 12, 2021, Roger Brown <rhubarb-geek-nz@users.sourceforge.net> đã viết:
        

        patch

        I have a patch that lets you build 2.4.0 on FreeBSD i386, it is not a general patch, it is just applied only when building for that platform.

        Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cdesktopenv/wiki/FreeBSDBuild/

        To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

         
        • Roger Brown

          Roger Brown - 2021-12-10

          The patch mentioned in the message can be applied with "git apply" before the build.

          https://sourceforge.net/p/rhubarb-pi/code/HEAD/tree/trunk/pkg/cdesktopenv/patches/8e4de154957ff3230bd18ae4110a2e7c1b9db87d.FreeBSD.i386

          So do the clone of the git repository with the flag --branch 2.4.0 to get the correct code for the patch to be applied to, apply the patch with

          $ git apply ../8e4de154957ff3230bd18ae4110a2e7c1b9db87d.FreeBSD.i386
          

          Then proceed with the build as you normally would.

          I have my own scripted build process which applies the patch automatically when it matches the commit hash. So it works best when you specify a specific tag or branch, eg

          $ ./package.sh 2.4.0
          

          Alternatively you could try the package I created.

           

          Last edit: Roger Brown 2021-12-10
          • Roger Brown

            Roger Brown - 2021-12-12

            Thanks for the patch. Installed CDE 2.4.0. Only I can not enter through dtlogin "login incorrect"

            The big change from 2.3.2 to 2.4.0 is the use of the pamd modules. These may require additional configuration

            I have just tested with my build, I use the dtlogin init script from the contrib directory

            https://sourceforge.net/p/cdesktopenv/code/ci/master/tree/cde/contrib/rc/freebsd/dtlogin

            in rc.conf

            rpcbind_enable=YES
            ldconfig_paths="/usr/local/lib /usr/dt/lib"
            dtlogin_enable="YES"
            
            echo "allowed_users=anybody" > /usr/local/etc/X11/Xwrapper.config
            
             
            • Andrey Komarov

              Andrey Komarov - 2021-12-12

              I am starting CDE via startx.  This is even better for me, since I am still using openmotif (mwm)

              Được gửi từ Yahoo Mail trên Android

              Vào CN, 12 thg 12, 2021 lúc 3:44 CH, Roger Brownrhubarb-geek-nz@users.sourceforge.net đã viết:

              Thanks for the patch. Installed CDE 2.4.0. Only I can not enter through dtlogin "login incorrect"

              The big change from 2.3.2 to 2.4.0 is the use of the pamd modules. These may require additional configuration

              I have just tested with my build, I use the dtlogin init script from the contrib directory

              https://sourceforge.net/p/cdesktopenv/code/ci/master/tree/cde/contrib/rc/freebsd/dtlogin

              in rc.conf
              rpcbind_enable=YES
              ldconfig_paths="/usr/local/lib /usr/dt/lib"
              dtlogin_enable="YES"
              echo "allowed_users=anybody" > /usr/local/etc/X11/Xwrapper.config

              Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cdesktopenv/wiki/FreeBSDBuild/

              To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

               
              • Roger Brown

                Roger Brown - 2021-12-12

                CDE builds on top of openmotif and has "dtwm" to replace "mwm", with CDE I suggest it is better with using the CDE window manager.

                 
                • Andrey Komarov

                  Andrey Komarov - 2021-12-12

                  After several attempts to log in with dtlogin, I had to reinstall FreeBSD 13.0 because the rc.conf error was thrown at boot time.  I need to add dtlogin_enable = "YES", but I couldn't login.  Moreover, I have already configured CDE.  Installed programs, created program icons.  It all takes a very long time.

                  Được gửi từ Yahoo Mail trên Android

                  Vào CN, 12 thg 12, 2021 lúc 7:28 CH, Roger Brownrhubarb-geek-nz@users.sourceforge.net đã viết:
                  CDE builds on top of openmotif and has "dtwm" to replace "mwm", with CDE I suggest it is better with using the CDE window manager.

                  Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cdesktopenv/wiki/FreeBSDBuild/

                  To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

                   
                  • Roger Brown

                    Roger Brown - 2021-12-12

                    The two ways do run CDE are...

                    dtsession, when already logged in as a user

                    dtlogin, which starts as root and provides complete login and authentication

                    in neither scenario should MWM be involved at all.

                    So if using dtsession then that should just be talking to the X server and taking control with dtwm

                    If using dtlogin, then that should be starting X, running the dthello/dtgreet and then passing control to dtsession+dtwm

                    So before moving to using the dtlogin rc script, should be able to start with a root login at the console and run /usr/dt/bin/dtlogin -nodaemon, if you can't get past that stage then the rc script will not help

                    It looks like a pamd problem, with NetBSD I had to add a dependency on pam-pwauth_suid, but I could not see an equivalent for FreeBSD

                    Also, make sure you have SSH server running, then if locked out of console you get back in over the network

                     
                    • Andrey Komarov

                      Andrey Komarov - 2021-12-12

                      I installed CDE 2.4.0a using your patch.  Prior to that, CDE would hang on startup after logging in.  Dtlogin does not work now.  I am a user, not a developer

                      Được gửi từ Yahoo Mail trên Android

                      Vào CN, 12 thg 12, 2021 lúc 11:11 CH, Roger Brownrhubarb-geek-nz@users.sourceforge.net đã viết:
                      The two ways do run CDE are...

                      dtsession, when already logged in as a user

                      dtlogin, which starts as root and provides complete login and authentication

                      in neither scenario should MWM be involved at all.

                      So if using dtsession then that should just be talking to the X server and taking control with dtwm

                      If using dtlogin, then that should be starting X, running the dthello/dtgreet and then passing control to dtsession+dtwm

                      So before moving to using the dtlogin rc script, should be able to start with a root login at the console and run /usr/dt/bin/dtlogin -nodaemon, if you can't get past that stage then the rc script will not help

                      It looks like a pamd problem, with NetBSD I had to add a dependency on pam-pwauth_suid, but I could not see an equivalent for FreeBSD

                      Also, make sure you have SSH server running, then if locked out of console you get back in over the network

                      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cdesktopenv/wiki/FreeBSDBuild/

                      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

                       
                    • Andrey Komarov

                      Andrey Komarov - 2021-12-12

                      CDE is not in the FreeBSD repository (https://www.freshports.org/x11/cde).  I don’t think that if the FreeBSD committers didn’t want to run CDE on the i386, then there’s a problem.

                      Được gửi từ Yahoo Mail trên Android

                      Vào CN, 12 thg 12, 2021 lúc 11:11 CH, Roger Brownrhubarb-geek-nz@users.sourceforge.net đã viết:
                      The two ways do run CDE are...

                      dtsession, when already logged in as a user

                      dtlogin, which starts as root and provides complete login and authentication

                      in neither scenario should MWM be involved at all.

                      So if using dtsession then that should just be talking to the X server and taking control with dtwm

                      If using dtlogin, then that should be starting X, running the dthello/dtgreet and then passing control to dtsession+dtwm

                      So before moving to using the dtlogin rc script, should be able to start with a root login at the console and run /usr/dt/bin/dtlogin -nodaemon, if you can't get past that stage then the rc script will not help

                      It looks like a pamd problem, with NetBSD I had to add a dependency on pam-pwauth_suid, but I could not see an equivalent for FreeBSD

                      Also, make sure you have SSH server running, then if locked out of console you get back in over the network

                      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cdesktopenv/wiki/FreeBSDBuild/

                      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

                       
                    • Roger Brown

                      Roger Brown - 2021-12-12

                      With Freebsd

                      root@freebsd:/var/dt # ls -l /etc/pam.d/
                      total 68
                      -r--r--r--  1 root  wheel  2840 Apr  9  2021 README
                      -rw-r--r--  1 root  wheel   257 Apr  9  2021 atrun
                      -rw-r--r--  1 root  wheel   135 Apr  9  2021 cron
                      -rw-r--r--  2 root  wheel   467 Apr  9  2021 ftp
                      -rw-r--r--  2 root  wheel   467 Apr  9  2021 ftpd
                      -rw-r--r--  1 root  wheel   301 Apr  9  2021 imap
                      -rw-r--r--  1 root  wheel   308 Apr  9  2021 login
                      -rw-r--r--  1 root  wheel   606 Apr  9  2021 other
                      -rw-r--r--  1 root  wheel   252 Apr  9  2021 passwd
                      -rw-r--r--  1 root  wheel   301 Apr  9  2021 pop3
                      -rw-r--r--  1 root  wheel   684 Apr  9  2021 sshd
                      -rw-r--r--  1 root  wheel   322 Apr  9  2021 su
                      -rw-r--r--  1 root  wheel   648 Apr  9  2021 system
                      -rw-r--r--  1 root  wheel   697 Apr  9  2021 telnetd
                      -rw-r--r--  1 root  wheel   466 Apr  9  2021 xdm
                      

                      I do get an error in /var/dt/Xerror

                      (EE) Failed to open authorization file "/var/dt/authdir/authfiles/A:0-RkSYxJ": Permission denied
                      

                      But my login does work.

                      With NetBSD

                      netbsd386# ls -l /etc/pam.d/
                      total 48
                      -r--r--r--  1 root  wheel  2959 Oct 18  2020 README
                      -rw-r--r--  1 root  wheel   255 Oct 18  2020 cron
                      -rw-r--r--  1 root  wheel   801 Oct 18  2020 display_manager
                      -rw-r--r--  1 root  wheel   211 Nov 11 17:05 dtlogin
                      -rw-r--r--  1 root  wheel   176 Nov 11 17:05 dtsession
                      -rw-r--r--  1 root  wheel   660 Oct 18  2020 ftpd
                      -rw-r--r--  1 root  wheel   230 Oct 18  2020 gdm
                      -rw-r--r--  1 root  wheel   172 Oct 18  2020 imap
                      -rw-r--r--  1 root  wheel   230 Oct 18  2020 kde
                      -rw-r--r--  1 root  wheel   395 Oct 18  2020 login
                      -rw-r--r--  1 root  wheel   297 Oct 18  2020 other
                      -rw-r--r--  1 root  wheel   209 Oct 18  2020 passwd
                      -rw-r--r--  1 root  wheel   173 Oct 18  2020 pop3
                      -rw-r--r--  1 root  wheel   226 Oct 18  2020 ppp
                      -rw-r--r--  1 root  wheel   232 Oct 18  2020 racoon
                      -rw-r--r--  1 root  wheel   431 Oct 18  2020 rexecd
                      -rw-r--r--  1 root  wheel   379 Oct 18  2020 rsh
                      -rw-r--r--  1 root  wheel   820 Oct 18  2020 sshd
                      -rw-r--r--  1 root  wheel   611 Oct 18  2020 su
                      -rw-r--r--  1 root  wheel   564 Oct 18  2020 system
                      -rw-r--r--  1 root  wheel   478 Oct 18  2020 telnetd
                      -rw-r--r--  1 root  wheel   272 Oct 18  2020 xdm
                      -rw-r--r--  1 root  wheel   260 Oct 18  2020 xserver
                      

                      With OpenBSD I could not find anything similar

                      It may be that FreeBSD is wanting some configuration in /etc/pam.d like NetBSD

                       
                      • Roger Brown

                        Roger Brown - 2021-12-12

                        The hang on login is normally caused by portmapper/rpcbind not running or the hostname not in /etc/hosts

                        I am running the straight 2.4.0 build, I have published my binaries here

                        I avoid running anything that is not a formal release, so I build from an explicit tagged commit from git, and then publish any patch I needed to make to get it going.

                        The autoconf builds are not ready in my opinion

                         
                        • Roger Brown

                          Roger Brown - 2021-12-12

                          The FreeBSD 13.0-RELEASE running CDE 2.4.0 amd64 has exactly the same configuration, same error in /var/dt/Xerror but still allows login with correct password

                           

                          Last edit: Roger Brown 2021-12-12
                    • Andrey Komarov

                      Andrey Komarov - 2021-12-12

                      / usr / dt / bin / dtlogin -nodaemon starts. ssh is running too. Normal user and root authentication fails in dtlogin.

                      Được gửi từ Yahoo Mail trên Android

                      Vào CN, 12 thg 12, 2021 lúc 11:11 CH, Roger Brownrhubarb-geek-nz@users.sourceforge.net đã viết:
                      The two ways do run CDE are...

                      dtsession, when already logged in as a user

                      dtlogin, which starts as root and provides complete login and authentication

                      in neither scenario should MWM be involved at all.

                      So if using dtsession then that should just be talking to the X server and taking control with dtwm

                      If using dtlogin, then that should be starting X, running the dthello/dtgreet and then passing control to dtsession+dtwm

                      So before moving to using the dtlogin rc script, should be able to start with a root login at the console and run /usr/dt/bin/dtlogin -nodaemon, if you can't get past that stage then the rc script will not help

                      It looks like a pamd problem, with NetBSD I had to add a dependency on pam-pwauth_suid, but I could not see an equivalent for FreeBSD

                      Also, make sure you have SSH server running, then if locked out of console you get back in over the network

                      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cdesktopenv/wiki/FreeBSDBuild/

                      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

                       
                      • Roger Brown

                        Roger Brown - 2021-12-12

                        I would suggest go back to the 2,4.0 version and solve the hanging. If the hanging was occuring it was after the authentication was succesful. The hanging is a known problem and hopefully can be addressed with making sure that rpcbind is started and your hostname is in /etc/hosts against 127.0.01.

                         

                        Last edit: Roger Brown 2021-12-12
  • Roger Brown

    Roger Brown - 2021-12-12

    I found that I didn't have the /home/user/.dt/dtwmrc file. I think I don't have any files yet. Therefore dtlogin starts, but authorization fails. I copied the dtwmrc file to /home/user/.dt.

    That sounds wrong. dtlogin should be running as root, not as an already logged in user. The authentication should occur before the contents of $HOME are examined. The user should not need any specific CDE configurations setup before behand, it should all be initialised on first run by dtsession.

     
  • Roger Brown

    Roger Brown - 2021-12-12

    I start FreeBSD, enter my username and password. And then I start CDE via startx. I am running FreeBSD. Dtlogin starts. I enter my username and password, but there is no user data in the system.

    That is not how it is designed to be used, there is nothing gained by trying to login again when you are already logged in. If you are already logged in as a user you should be using dtsession to establish the desktop environment with the X server. And dtsession will expect a blank X server with no existing window manager running as it will want to use dtwm

     
    • Jon Trulson

      Jon Trulson - 2021-12-12

      Actually using startx works great and is fine for starting CDE... Especially if you do not enable a GUI login manager like dtlogin. My VM's generally run this way. Then I can login normally and just run

      startx /usr/dt/bin/Xsession

      when I want to fire up CDE.

       
      👍
      1

      Last edit: Jon Trulson 2021-12-12
      • Andrey Komarov

        Andrey Komarov - 2021-12-12

        I'm using CDE and OpenMotif and I'm happy with the startx login.  But it’s interesting to know the reason

        Được gửi từ Yahoo Mail trên Android

        Vào Th 2, 13 thg 12, 2021 lúc 3:22 SA, Jon Trulsonjon13@users.sourceforge.net đã viết:
        Actually using startx works great and is fine for starting CDE... Expecially if you do not enable a GUI login manager like dtlogin. My VM's generally run this way. Tehn I can login normally and just run

        startx /usr/dt/bin/Xsession

        when I want to fire up CDE.

        Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cdesktopenv/wiki/FreeBSDBuild/

        To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

         
        • Roger Brown

          Roger Brown - 2021-12-12

          Very pleased you are now up and running.

          In terms of terminology, startx is not doing a login. You are already logged in. Startx is starting an X windows session. When you use CDE that is ultimately a desktop managed by dtsession which in this case is invoked by /usr/dt/bin/Xsession. CDE already uses OpenMotif so you should not be trying to use mwm in addition, dtwm is a superset of mwm, and many components of CDE require dtwm to be the window manager to function properly.

           
          • Andrey Komarov

            Andrey Komarov - 2021-12-12

            I find it difficult to express my thoughts in English.  My native language is Russian.  Why am I logging into FreeBSD, but through dtlogin it gives an error.  This means that the window manager has no user data.  Perhaps there is no file.  This thought came to my mind when I discovered that the dtwmrc file was missing.  That's why I asked

            Được gửi từ Yahoo Mail trên Android

            Vào Th 2, 13 thg 12, 2021 lúc 3:38 SA, Roger Brownrhubarb-geek-nz@users.sourceforge.net đã viết:
            Very pleased you are now up and running.

            In terms of terminology, startx is not doing a login. You are already logged in. Startx is starting an X windows session. When you use CDE that is ultimately a desktop managed by dtsession which in this case is invoked by /usr/dt/bin/Xsession. CDE already uses OpenMotif so you should not be trying to use mwm in addition, dtwm is a superset of mwm, and many components of CDE require dtwm to be the window manager to function properly.

            Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cdesktopenv/wiki/FreeBSDBuild/

            To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

             
  • Roger Brown

    Roger Brown - 2021-12-12

    Yes it is a mystery why the dtlogin from boot does not work. I have CDE 2.4.0 working on FreeBSD 13.0-RELEASE on ARM64, I386 and AMD64, all happily with the dtlogin process as I have described using the dtlogin-init sequence. Yes typos in /etc/rc.conf can be disaster, hence why testing by logging in at the TTY console as root then manually running /usr/dt/bin/dtsession and using SSH to look at the log files is a good first step.

     
    • Andrey Komarov

      Andrey Komarov - 2021-12-12

      I couldn't run CDE 2.4.0 without your patch.  CDE hangs after logging in on a blue screen.  There were a lot of errors when compiling CDE, but CDE started up and works through startx.  Perhaps dtlogin does not work due to compilation errors.  In fact, the fact that I ran CDE 2.4.0a makes me very happy.  thanks for the help

      Được gửi từ Yahoo Mail trên Android

      Vào Th 2, 13 thg 12, 2021 lúc 4:00 SA, Roger Brownrhubarb-geek-nz@users.sourceforge.net đã viết:
      Yes it is a mystery why the dtlogin from boot does not work. I have CDE 2.4.0 working on FreeBSD 13.0-RELEASE on ARM64, I386 and AMD64, all happily with the dtlogin process as I have described using the dtlogin-init sequence. Yes typos in /etc/rc.conf can be disaster, hence why testing by logging in at the TTY console as root then manually running /usr/dt/bin/dtsession and using SSH to look at the log files is a good first step.

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/cdesktopenv/wiki/FreeBSDBuild/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
      👍
      1
<< < 1 2 3 > >> (Page 2 of 3)

Log in to post a comment.