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 3 of 3)
  • Andrey Komarov

    Andrey Komarov - 2021-12-15

    Want to know the reason for the dtlogin login error?  My  / var / dt / authdir folder is empty.  And it should contain a folder with a file.  See the photo:
    P.S. I wrote that most likely there is no file

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

    Vào Th 2, 13 thg 12, 2021 lúc 4:30 SA, Andrey Komarovaak1978@users.sourceforge.net đã viết:
    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/

    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-15

      Remember dtlogin needs to run as root, I am not quite sure of your sequence where you said you logged in, and then ran dtlogin. The dtlogin-init should have run it as root.

       
      • Andrey Komarov

        Andrey Komarov - 2021-12-15

        dtlogin starts!  Authentication fails

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

        Vào Th 4, 15 thg 12, 2021 lúc 8:34 CH, Roger Brownrhubarb-geek-nz@users.sourceforge.net đã viết:
        Remember dtlogin needs to run as root, I am not quite sure of your sequence where you said you logged in, and then ran dtlogin. The dtlogin-init should have run it as root.

        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-15

          Those auth files look private to dtlogin going by the directory access rights

          root@freebsd:/var/dt # find /var/dt/au* | xargs ls -ld
          drwx------  3 root  wheel   3 Dec  1 04:02 /var/dt/authdir
          drwx------  2 root  wheel   3 Dec 15 15:50 /var/dt/authdir/authfiles
          -rw-------  1 root  wheel  44 Dec 15 15:50 /var/dt/authdir/authfiles/A:0-bT5pvu
          

          If the problem is down to pamd authentication on FreeBSD it would take some investigation to reproduce the problem and confirm why it works for some and not for others. For instance the 2,3,2 version does not use pamd, so if dtlogin works on 2.3.2 but not on 2.4.0 we could say it is likely to be a pamd problem. Now what makes that interesting is I have the tagged 2.4.0 version with my patches running on arm32, arm64 and amd64 and the dtlogin works on all of those. So we need to find what are the conditions where it then fails to work. Now I have noticed a distinct behavour difference between entering the wrong password and using an account that has no password set up.

          As another example I had log in problems with NetBSD 2.4.0 until I also added a pamd operating system package. But I could not see an equivalent for FreeBSD.

           
          • Andrey Komarov

            Andrey Komarov - 2021-12-15

            I am installing CDE 2.4.0 on FreeBSD 13.0 RELEASE i386.

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

            Vào Th 4, 15 thg 12, 2021 lúc 9:02 CH, Roger Brownrhubarb-geek-nz@users.sourceforge.net đã viết:
            Those auth files look private to dtlogin going by the directory access rights
            root@freebsd:/var/dt # find /var/dt/au* | xargs ls -ld
            drwx------ 3 root wheel 3 Dec 1 04:02 /var/dt/authdir
            drwx------ 2 root wheel 3 Dec 15 15:50 /var/dt/authdir/authfiles
            -rw------- 1 root wheel 44 Dec 15 15:50 /var/dt/authdir/authfiles/A:0-bT5pvu

            If the problem is down to pamd authentication on FreeBSD it would take some investigation to reproduce the problem and confirm why it works for some and not for others. For instance the 2,3,2 version does not use pamd, so if dtlogin works on 2.3.2 but not on 2.4.0 we could say it is likely to be a pamd problem. Now what makes that interesting is I have the tagged 2.4.0 version with my patches running on arm32, arm64 and amd64 and the dtlogin works on all of those. So we need to find what are the conditions where it then fails to work. Now I have noticed a distinct behavour difference between entering the wrong password and using an account that has no password set up.

            As another example I had log in problems with NetBSD 2.4.0 until I also added a pamd operating system package. But I could not see an equivalent for FreeBSD.

            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-15

              So it depends how important it is to get dtlogin working. It is very hard to offer assistance without hands on the machine. What I would like to suggest it that you replicate my working system by
              :
              1. starting with a brand new i386 virtual box
              2. install FreeBSD 13.0-RELEASE i386 on that
              3. create new user with new password
              4. install my precompiled binaries
              5. follow my instructions

              Then we can talk about 100% the same thing, otherwise we are just talking about the problem and making guesses. .

               

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

                Andrey Komarov - 2021-12-15

                I've tried this.  I've been reinstalling FreeBSD and compiling CDE for several days now, trying different options.  I have a Fujitsu Siemens P1610 laptop with 1GB of RAM and a 60GB hard drive.

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

                Vào Th 5, 16 thg 12, 2021 lúc 3:31 SA, Roger Brownrhubarb-geek-nz@users.sourceforge.net đã viết:
                So it depends how important it is to get dtlogin working. It is very hard to offer assistance without hands on the machine. What I would like to suggest it that you replicate my working system by
                :
                1. starting with a brand new i386 virtual box
                2. install FreeBSD 13.0-RELEASE i386 on that
                3. create new user with new password
                4. install my [precompiled binaries(https://sourceforge.net/projects/rhubarb-pi/files/FreeBSD/13.0-RELEASE/i386/)
                5. follow my instructions

                Then we can talk about 100% the same thing, otherwise we are just talking about the problem and making guesses. .

                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-15

                  Have you tried my precompiled binaries which are known to work in some environments? If they work it indicates a problem with your build environment, if they don't work it indicates a problem with your machine configuration.

                   
                  • Andrey Komarov

                    Andrey Komarov - 2021-12-15

                    What does the configuration of the computer have to do with it?  CDE 2.4.0 runs through startx and works.  dtlogin is up and running.  Error in user authentication in dtlogin.  FreeBSD is authenticated.

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

                    Vào Th 5, 16 thg 12, 2021 lúc 4:43 SA, Roger Brownrhubarb-geek-nz@users.sourceforge.net đã viết:
                    Have you tried my precompiled binaries which are known to work in some environments? If they work it indicates a problem with your build environment, if they don't work it indicates a problem with your machine configuration.

                    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-15

                      By configuration of the computer I mean some component or configuration that is preventing dtlogin performing the authentication, it could be a line in a config file, a missing shared library, a package that has not been installed.

                       
                  • Andrey Komarov

                    Andrey Komarov - 2021-12-15

                    I ran different DEs on this laptop (mate, xfce4, gnome3, lumina, lxde lxqt), installed various login managers (sddm, slim, gdm), installed CDE 2.3.X.  Installed FreeBSD 5.x, 6.x, 7.x, 8.x, 11.x, 12.x 13.x.  There have never been any problems with the configuration of the computer.  Install FreeBSD 13.0 and CDE 2.4.0 there were problems with the configuration of the computer.  How strange it is...

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

                    Vào Th 5, 16 thg 12, 2021 lúc 4:43 SA, Roger Brownrhubarb-geek-nz@users.sourceforge.net đã viết:
                    Have you tried my precompiled binaries which are known to work in some environments? If they work it indicates a problem with your build environment, if they don't work it indicates a problem with your machine configuration.

                    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-15

                      Yes, but you have a system where dtlogin does not work, and I have many systems where it does work. I am trying to reduce the things that are different to identify the thing that is causing the problem. And one of the things that is different is your build of CDE is different to everybody elses build. So my suggestion was if you use exactly the same binary package as one that works we have reduced the search area for looking for things that are different and preventing it working.

                       
                      • Roger Brown

                        Roger Brown - 2021-12-15

                        In /etc/pam.d/README

                        If no configuration file is found for a particular service, the /etc/pam.d/other is used instead.

                        My /etc/pam.d/other

                        #
                        # $FreeBSD$
                        #
                        # PAM configuration for the "other" service
                        #
                        
                        # auth
                        auth        sufficient  pam_opie.so     no_warn no_fake_prompts
                        auth        requisite   pam_opieaccess.so   no_warn allow_local
                        #auth       sufficient  pam_krb5.so     no_warn try_first_pass
                        #auth       sufficient  pam_ssh.so      no_warn try_first_pass
                        auth        required    pam_unix.so     no_warn try_first_pass
                        
                        # account
                        account     required    pam_nologin.so
                        #account    required    pam_krb5.so
                        account     required    pam_login_access.so
                        account     required    pam_unix.so
                        
                        # session
                        #session    optional    pam_ssh.so      want_agent
                        session     required    pam_permit.so
                        
                        # password
                        password    required    pam_permit.so
                        

                        And the modules

                        root@freebsd:/etc/pam.d # ls -ld /usr/lib/pam*.so
                        lrwxr-xr-x  1 root  wheel  15 Apr  9  2021 /usr/lib/pam_chroot.so -> pam_chroot.so.6
                        lrwxr-xr-x  1 root  wheel  13 Apr  9  2021 /usr/lib/pam_deny.so -> pam_deny.so.6
                        lrwxr-xr-x  1 root  wheel  13 Apr  9  2021 /usr/lib/pam_echo.so -> pam_echo.so.6
                        lrwxr-xr-x  1 root  wheel  13 Apr  9  2021 /usr/lib/pam_exec.so -> pam_exec.so.6
                        lrwxr-xr-x  1 root  wheel  17 Apr  9  2021 /usr/lib/pam_ftpusers.so -> pam_ftpusers.so.6
                        lrwxr-xr-x  1 root  wheel  14 Apr  9  2021 /usr/lib/pam_group.so -> pam_group.so.6
                        lrwxr-xr-x  1 root  wheel  14 Apr  9  2021 /usr/lib/pam_guest.so -> pam_guest.so.6
                        lrwxr-xr-x  1 root  wheel  13 Apr  9  2021 /usr/lib/pam_krb5.so -> pam_krb5.so.6
                        lrwxr-xr-x  1 root  wheel  12 Apr  9  2021 /usr/lib/pam_ksu.so -> pam_ksu.so.6
                        lrwxr-xr-x  1 root  wheel  16 Apr  9  2021 /usr/lib/pam_lastlog.so -> pam_lastlog.so.6
                        lrwxr-xr-x  1 root  wheel  21 Apr  9  2021 /usr/lib/pam_login_access.so -> pam_login_access.so.6
                        lrwxr-xr-x  1 root  wheel  16 Apr  9  2021 /usr/lib/pam_nologin.so -> pam_nologin.so.6
                        lrwxr-xr-x  1 root  wheel  13 Apr  9  2021 /usr/lib/pam_opie.so -> pam_opie.so.6
                        lrwxr-xr-x  1 root  wheel  19 Apr  9  2021 /usr/lib/pam_opieaccess.so -> pam_opieaccess.so.6
                        lrwxr-xr-x  1 root  wheel  17 Apr  9  2021 /usr/lib/pam_passwdqc.so -> pam_passwdqc.so.6
                        lrwxr-xr-x  1 root  wheel  15 Apr  9  2021 /usr/lib/pam_permit.so -> pam_permit.so.6
                        lrwxr-xr-x  1 root  wheel  15 Apr  9  2021 /usr/lib/pam_radius.so -> pam_radius.so.6
                        lrwxr-xr-x  1 root  wheel  15 Apr  9  2021 /usr/lib/pam_rhosts.so -> pam_rhosts.so.6
                        lrwxr-xr-x  1 root  wheel  15 Apr  9  2021 /usr/lib/pam_rootok.so -> pam_rootok.so.6
                        lrwxr-xr-x  1 root  wheel  18 Apr  9  2021 /usr/lib/pam_securetty.so -> pam_securetty.so.6
                        lrwxr-xr-x  1 root  wheel  13 Apr  9  2021 /usr/lib/pam_self.so -> pam_self.so.6
                        lrwxr-xr-x  1 root  wheel  12 Apr  9  2021 /usr/lib/pam_ssh.so -> pam_ssh.so.6
                        lrwxr-xr-x  1 root  wheel  16 Apr  9  2021 /usr/lib/pam_tacplus.so -> pam_tacplus.so.6
                        lrwxr-xr-x  1 root  wheel  13 Apr  9  2021 /usr/lib/pam_unix.so -> pam_unix.so.6
                        
                         
                  • Andrey Komarov

                    Andrey Komarov - 2021-12-16

                    I need a work laptop.  I will not test your patches for months.  For questions about compiling CDE 2.4.0, write to the FreeBSD committers.  They will give you details on why CDE 2.4.0 cannot be installed on FreeBSD i386.

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

                    Vào Th 5, 16 thg 12, 2021 lúc 4:43 SA, Roger Brownrhubarb-geek-nz@users.sourceforge.net đã viết:
                    Have you tried my precompiled binaries which are known to work in some environments? If they work it indicates a problem with your build environment, if they don't work it indicates a problem with your machine configuration.

                    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-16

                      Do you have /etc/pam.d/dtlogin and /etc/pam.d/dtsession ? I don't have those files and it works. You may have those files as a result of make install.

                       
                  • Andrey Komarov

                    Andrey Komarov - 2021-12-17

                    Now I understand why I get an error when logging into dtlogin.  On each computer (laptop) CDE is compiled differently and there is no guarantee that CDE will start.

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

                    Vào Th 5, 16 thg 12, 2021 lúc 4:43 SA, Roger Brownrhubarb-geek-nz@users.sourceforge.net đã viết:
                    Have you tried my precompiled binaries which are known to work in some environments? If they work it indicates a problem with your build environment, if they don't work it indicates a problem with your machine configuration.

                    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-17

                    $FreeBSD$

                    PAM configuration for the "passwd" service

                    passwd(1) does not use the auth, account or session services.

                    password

                    password requisite pam_passwdqc.so enforce=users

                    password required pamunix.so nowarn try_first_pass nullok

                    Of course there will be an error during authorization

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

                    Vào Th 5, 16 thg 12, 2021 lúc 4:43 SA, Roger Brownrhubarb-geek-nz@users.sourceforge.net đã viết:
                    Have you tried my precompiled binaries which are known to work in some environments? If they work it indicates a problem with your build environment, if they don't work it indicates a problem with your machine configuration.

                    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/

                     

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

                      Roger Brown - 2021-12-17

                      https://sourceforge.net/p/cdesktopenv/tickets/124/

                      Can you validate my findings?

                      Have you tried deleting the /usr/local/etc/pam.d/dtlogin and dtsession ?

                       
  • Roger Brown

    Roger Brown - 2021-12-12

    This is one of the reasons why I am a fan of known working compiled binary packages which people can use directly. Where the packages have been tested and when people say something isnt working we can talk about exactly the same thing. Unfortunately with end-user built software everybodies own build is unique, we don't know what was included in your build, what special options you used to control the build, what files failed to compile, what dependencies were missed etc. So if I can point to an exact RPM, TGZ, PKG or DEB that can be downloaded and say does that work then we can talk about the same thing because we are using exactly the same binary package.

     
  • Андрей

    Андрей - 2021-12-18

    /usr/local/etc/pam.d/dtlogin and dtsession removed. The authorization was successful.

     
    👍
    2
  • marcel alexandre

    I'm virtualizing the latest version of freebsd 13.2 RELEASE with qemu/kvm and virt-manager. Yesterday I installed the CDE desktop environment and followed the installation recommendations by editing the configuration files. The mouse works and the pointer moves but the button doesn't click, any suggestions?

     
    • Cy Schubert

      Cy Schubert - 2023-04-25

      To narrow down the problem, can you try with motif (mwm)?

      I run (and maintain) CDE on FreeBSD on a FreeBSD 14-CURRENT
      laptop. I also use CDE in a FreeBSD 13.2 VirtualBox VM at $JOB.

      We need to establish whether this is a CDE problem or something deeper
      within FreeBSD's implementation of xorg. You can do this by,

      1. Create .xinitrc containing the line:
        exec /usr/local/bin/mwm

      2. Log into a console, not CDE dtlogin, xdm, gdm or any other login
        manager. (Not that this is the cause but the approach we will use will
        reduce the work required to run this test.)

      3. At the console $ prompt type in, startx.

      4. Open up a terminal and do some things. You can terminate your
        session anytime by selecting exit or quit in the mwm menu.

      If the problem persists when using startx, the problem is not CDE but
      something deeper: could be xorg, kernel or a kvm driver.

       
      • Cy Schubert

        Cy Schubert - 2023-04-27

        Suggest you go to https://bugs.freebsd.org/bugzilla/. We can track it there.

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

Log in to post a comment.