Tag Archives: xfce

Desktop Environments Resource Usage Comparison

Some of them use more RAM. Some less. Today in a rather simplified benchmark I will check some popular desktop environments for their RAM usage. I recently came to see some more or less old comparisons of various desktop environments RAM usage.

They were focused on difference between XFCE and KDE/Plasma environments. I am used to idea that XFCE is smaller and lighter of the two – so it should be also lighter on resources – but these two movies state that they RAM usage is similar and sometimes even KDE/Plasma is lighter. These results seemed strange to me so I wanted to test them under latest FreeBSD 13.1-RELEASE UNIX system.

Example XFCE on FreeBSD desktop screenshot from the XFCE Cupertino Way article.

xfce-ghostbsd

Upon some popular demand I also added GNOME (the 42 version) to the comparison.

Today we will test these desktop environments:

  • XFCE (4.16)
  • MATE (1.26)
  • KDE/Plasma (5.24)
  • Openbox (3.6)
  • GNOME (42)

We all know that Openbox is just a window manager but I wanted to include it here just from comparison.

Test Environment and Process

To save time I used VirtualBox virtual machine for the purpose of these simplified benchmarks. For that purpose he created VM had:

  • 1 x CPU
  • 8 GB RAM
  • 128 MB GPU Memory
  • 30 GB Disk

After installing the vanilla FreeBSD 13.1-RELEASE I switched to the latest pkg(8) repository. Then I added needed packages:

# pkg install xorg xfce kde5 mate openbox dzen2 tint2 xbindkeys xterm geany gnome

All of the desktop environments and their dependencies were installed on that test machine. The main FreeBSD config at /etc/rc.conf file had following contents.

% cat /etc/rc.conf
hostname="freebsd"
ifconfig_em0="DHCP"
sshd_enable="YES"
moused_enable="YES"
powerd_enable="YES"
dumpdev="AUTO"
zfs_enable="YES"
dbus_enable="YES"

The only thing I added after installation was the dbus service startup. I did not changed any settings in these environments. The were compared at their default settings.

The test was rather simple and naive but these were the tasks that I done on each of them.

  • Run gstat(8) command in terminal application.
  • Display /etc/ in file manager with scroll to end of display of dir.
  • Open /etc/ssh/moduli file in text editor with scroll to end of file.

These were different for various environments:

XFCE

  • xfce4-terminal
  • thunar
  • mousepad

MATE

  • mate-terminal
  • caja
  • pluma

KDE/Plasma

  • konsole
  • dolphin
  • kate

Openbox

  • xterm
  • caja
  • geany

GNOME

  • gnome-terminal
  • nautilus
  • gedit

I powered off that FreeBSD machine before each test – so each test looked like:

  • boot cold FreeBSD system
  • login into system (in text console)
  • type xinit(1) command
  • do the 3 defined tasks

Each desktop environment had different ~/.xinitrc file. Below you will find their contents.

% cat ~/.xinitrc.xfce
. /usr/local/etc/xdg/xfce4/xinitrc

% cat ~/.xinitrc.mate
exec ck-launch-session mate-session

% cat ~/.xinitrc.kde
exec ck-launch-session startplasma-x11

% cat ~/.xinitrc.openbox
dzen2 &
tint2 &
xbindkeys &
exec openbox

% cat ~/.xinitrc.gnome
exec gnome-session

Each of them were started like that:

% xinit ~/.xinitrc.xfce

% xinit ~/.xinitrc.mate

% xinit ~/.xinitrc.kde

% xinit ~/.xinitrc.openbox

% xinit ~/.xinitrc.gnome

RAM Usage Results

To be honest I was surprised by the results.

Clean Text Console FreeBSD

The text console of FreeBSD 13.1-RELEASE system used about 97 MB of RAM. That result is the sum of the RES column from the top(1) command.

Below you will find the top(1) output for FreeBSD text console only system.

% top -b -o res 1000
last pid:   871;  load averages:  1.92,  0.90,  0.36; battery: 99%  up 0+00:01:09    00:34:01
28 processes:  2 running, 26 sleeping
CPU:  2.0% user,  0.0% nice,  3.7% system,  0.2% interrupt, 94.0% idle
Mem: 18M Active, 21M Inact, 138M Wired, 40K Buf, 7746M Free
ARC: 43M Total, 18M MFU, 23M MRU, 335K Header, 1556K Other
     20M Compressed, 61M Uncompressed, 3.09:1 Ratio
Swap: 2048M Total, 2048M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    WCPU COMMAND
  852 vermaden      1  20    0    21M  9492K RUN      0:00   0.00% sshd
  849 root          1  33    0    21M  9300K select   0:00   0.00% sshd
  799 root          1  22    0    21M  8208K select   0:00   0.00% sshd
  817 root          1  20    0    18M  7140K select   0:00   0.00% sendmail
  820 smmsp         1  52    0    18M  6704K pause    0:00   0.00% sendmail
  749 messagebus    1  52    0    14M  3648K select   0:00   0.00% dbus-daemon
  853 vermaden      1  20    0    13M  3256K wait     0:00   0.00% sh
  871 vermaden      1  20    0    14M  3220K RUN      0:00   0.00% top
  846 vermaden      1  52    0    13M  3208K ttyin    0:00   0.00% sh
  838 root          1  25    0    13M  3100K wait     0:00   0.00% login
  463 _dhcp         1  52    0    13M  2828K select   0:00   0.00% dhclient
  668 root          1  20    0    13M  2748K select   0:00   0.00% syslogd
  830 root          1  52    0    13M  2736K wait     0:00   0.00% sh
  402 root          1  52    0    13M  2708K select   0:00   0.00% dhclient
  399 root          1  52    0    13M  2632K select   0:00   0.00% dhclient
  802 root          1  20    0    13M  2516K nanslp   0:00   0.00% cron
  831 root          1  52    0    13M  2440K piperd   0:00   0.00% logger
  754 root          1  52    0    13M  2380K select   0:00   0.00% moused
  837 root          1  52    0    13M  2316K select   0:00   0.00% logger
  842 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  845 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  843 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  844 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  841 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  839 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  840 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  833 root          1  52    0    12M  2080K nanslp   0:00   0.00% sleep
  464 root          1  20    0    11M  1540K select   0:00   0.00% devd

XFCE

Next one is XFCE and it used about 1548 MB of RAM.

Below you will find the top(1) output for XFCE.

% top -b -o res 1000
last pid:  1076;  load averages:  0.58,  0.84,  0.51; battery: 99%  up 0+00:07:06    00:31:07
71 processes:  2 running, 69 sleeping
CPU:  7.6% user,  0.1% nice,  6.5% system,  1.1% interrupt, 84.8% idle
Mem: 292M Active, 337M Inact, 389M Wired, 56K Buf, 6897M Free
ARC: 240M Total, 98M MFU, 133M MRU, 1762K Header, 7212K Other
     194M Compressed, 461M Uncompressed, 2.37:1 Ratio
Swap: 2048M Total, 2048M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    WCPU COMMAND
  945 vermaden      3  20    0   344M   251M select   0:11   0.00% Xorg
 1010 vermaden      4  20    0   311M   121M select   0:01   0.00% kgpg
 1004 vermaden      5  20    0   196M   100M select   0:04   0.00% xfwm4
 1008 vermaden      4  20    0   130M    92M select   0:01   0.00% xfdesktop
  948 vermaden      4  20    0   172M    76M select   0:04   0.00% xfce4-session
 1012 vermaden      6  40   19   160M    63M select   0:00   0.00% tumblerd
 1064 vermaden      5  21    0    89M    59M select   0:05   0.00% mousepad
 1013 vermaden      3  20    0   130M    52M select   0:00   0.00% kalendarac
 1007 vermaden      4  24    0    75M    51M select   0:04   0.00% thunar
 1006 vermaden      4  20    0    75M    48M select   0:04   0.00% xfce4-panel
 1056 vermaden      4  20    0    69M    42M select   0:01   0.00% xfce4-terminal
 1020 vermaden      4  20    0    65M    41M select   0:00   0.00% wrapper-2.0
 1021 vermaden      4  20    0    65M    41M select   0:00   0.00% wrapper-2.0
 1022 vermaden      4  20    0    52M    32M select   0:00   0.00% wrapper-2.0
 1005 vermaden      4  20    0    49M    30M select   0:02   0.00% xfsettingsd
 1019 vermaden      4  20    0    46M    30M select   0:00   0.00% wrapper-2.0
 1027 vermaden      3  40   19   256G    29M select   0:00   0.00% baloo_file
 1009 vermaden      4  20    0    46M    28M select   0:00   0.00% xfce4-power-manager
  975 polkitd       7  20    0  2125M    27M select   0:01   0.00% polkitd
 1029 vermaden      4  20    0    45M    27M select   0:00   0.00% xfce4-notifyd
  977 vermaden      5  20    0    49M    26M select   0:01   0.00% mate-screensaver
  983 root          7  20    0    64M    16M select   0:01   0.00% bsdisks
  981 vermaden      5  20    0    27M    11M select   0:00   0.00% gvfs-udisks2-volume
 1067 vermaden      5  20    0    24M    10M select   0:00   0.00% gvfsd-network
 1038 vermaden      4  20    0    27M    10M select   0:00   0.00% gvfsd-trash
 1070 vermaden      4  20    0    24M    10M select   0:00   0.00% gvfsd-dnssd
 1063 vermaden      4  20    0    24M    10M select   0:00   0.00% gvfsd-computer
  865 vermaden      1  20    0    21M  9492K RUN      0:00   0.00% sshd
 1042 vermaden      2  22    0    86M  9440K select   0:00   0.00% pulseaudio
  862 root          1  28    0    21M  9264K select   0:00   0.00% sshd
  979 vermaden      4  32    0    24M  8836K select   0:00   0.00% gvfsd
  973 vermaden      4  20    0    21M  8712K select   0:00   0.00% at-spi2-registryd
  966 vermaden      5  20    0    21M  8296K select   0:00   0.00% at-spi-bus-launcher
  972 root         16  20    0    24M  8256K select   0:00   0.00% console-kit-daemon
  815 root          1  22    0    21M  8208K select   0:00   0.00% sshd
  991 vermaden      5  20    0    21M  7948K select   0:00   0.00% gvfs-gphoto2-volume
 1044 root          4  22    0    20M  7916K select   0:00   0.00% accounts-daemon
 1040 vermaden      4  20    0    19M  7460K select   0:00   0.00% gvfsd-metadata
 1017 root          4  20    0    19M  7452K select   0:00   0.00% upowerd
  988 vermaden      5  20    0    19M  7208K select   0:00   0.00% gvfs-mtp-volume-mon
  833 root          1  20    0    18M  7140K select   0:00   0.00% sendmail
 1066 vermaden      4  20    0    19M  7004K select   0:00   0.00% dconf-service
  969 vermaden      4  20    0    19M  6936K select   0:00   0.00% xfconfd
  998 vermaden      1  21    0    18M  6900K select   0:00   0.00% ssh-agent
  836 smmsp         1  52    0    18M  6576K pause    0:00   0.00% sendmail
  960 vermaden      1  20    0    14M  4580K select   0:01   0.00% dbus-daemon
 1003 vermaden      1  20    0    16M  4116K select   0:00   0.00% gpg-agent
  765 messagebus    1  20    0    14M  4100K select   0:00   0.00% dbus-daemon
  955 vermaden      1  23    0    15M  3912K select   0:00   0.00% dbus-launch
  967 vermaden      1  20    0    14M  3812K select   0:01   0.00% dbus-daemon
 1058 vermaden      1  20    0    14M  3772K nanslp   0:00   0.00% gstat
 1076 vermaden      1  20    0    14M  3464K RUN      0:00   0.00% top
 1057 vermaden      1  28    0    13M  3276K wait     0:00   0.00% sh
  866 vermaden      1  20    0    13M  3256K wait     0:00   0.00% sh
  941 vermaden      1  20    0    13M  3212K wait     0:00   0.00% sh
  854 root          1  20    0    13M  3136K wait     0:00   0.00% login
  944 vermaden      1  20    0    14M  3096K wait     0:00   0.00% xinit
  479 _dhcp         1  52    0    13M  2828K select   0:00   0.00% dhclient
  684 root          1  20    0    13M  2748K select   0:00   0.00% syslogd
  418 root          1   4    0    13M  2708K select   0:00   0.00% dhclient
  415 root          1  49    0    13M  2632K select   0:00   0.00% dhclient
  818 root          1  20    0    13M  2516K nanslp   0:00   0.00% cron
  770 root          1  20    0    13M  2404K select   0:00   0.00% moused
  855 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  858 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  861 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  859 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  860 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  856 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  857 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  480 root          1  20    0    11M  1540K select   0:00   0.00% devd

MATE

Next one is MATE and it used about 1361 MB of RAM.

This is first strange thing for me. Keep in mind that MATE is a fork of GNOME 2 which was expected to be heavy compared to light XFCE … at least more then a decade ago. Seems that now MATE developers are doing better job then XFCE devs πŸ™‚

Below you will find the top(1) output for MATE.

% top -b -o res 1000
last pid:   966;  load averages:  1.75,  1.02,  0.43; battery: 99%  up 0+00:01:53    00:40:42
66 processes:  2 running, 64 sleeping
CPU: 25.7% user,  0.0% nice,  8.9% system,  0.4% interrupt, 65.0% idle
Mem: 279M Active, 269M Inact, 381M Wired, 56K Buf, 6986M Free
ARC: 230M Total, 88M MFU, 131M MRU, 1753K Header, 8250K Other
     183M Compressed, 435M Uncompressed, 2.37:1 Ratio
Swap: 2048M Total, 2048M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    WCPU COMMAND
  857 vermaden      3  23    0   344M   246M select   0:08   7.96% Xorg
  922 vermaden      4  20    0   311M   122M select   0:01   0.00% kgpg
  869 vermaden      5  20    0   172M    77M select   0:01   0.00% mate-session
  913 vermaden      6  20    0    92M    68M select   0:03   0.00% caja
  961 vermaden      5  29    0    91M    59M select   0:07  15.97% pluma
  951 vermaden      5  20    0    86M    55M select   0:01   0.00% mate-terminal
  919 vermaden      3  20    0   130M    52M select   0:00   0.00% kalendarac
  911 vermaden      5  20    0    74M    49M select   0:01   0.00% mate-panel
  941 vermaden      5  20    0    70M    45M select   0:00   0.00% notification-area-a
  902 vermaden      5  20    0    70M    44M select   0:01   0.00% marco
  917 vermaden      4  20    0    66M    43M select   0:00   0.00% mate-volume-control
  899 vermaden      6  20    0    60M    38M select   0:02   0.00% mate-settings-daemo
  939 vermaden      5  20    0    60M    38M select   0:00   0.00% clock-applet
  927 vermaden      5  20    0    57M    37M select   0:00   0.00% wnck-applet
  921 vermaden      5  20    0    55M    35M select   0:00   0.00% mate-power-manager
  915 vermaden      5  20    0    50M    32M select   0:00   0.00% mate-screensaver
  864 polkitd       7  20    0  2125M    27M select   0:00   0.00% polkitd
  914 vermaden      4  20    0    44M    26M select   0:00   0.00% polkit-mate-authent
  883 root          7  52    0    64M    16M select   0:00   0.00% bsdisks
  881 vermaden      5  20    0    27M    12M select   0:00   0.00% gvfs-udisks2-volume
  962 vermaden      5  20    0    24M    11M select   0:00   0.00% gvfsd-network
  965 vermaden      4  20    0    24M    10M select   0:00   0.00% gvfsd-dnssd
  954 vermaden      4  20    0    24M    10M select   0:00   0.00% gvfsd-computer
  929 vermaden      4  20    0    26M    10M select   0:00   0.00% gvfsd-trash
  852 vermaden      1  20    0    21M  9480K RUN      0:00   0.00% sshd
  931 vermaden      2  21    0    86M  9396K select   0:00   0.00% pulseaudio
  849 root          1  30    0    21M  9300K select   0:00   0.00% sshd
  879 vermaden      4  28    0    24M  9180K select   0:00   0.00% gvfsd
  901 vermaden      4  20    0    21M  8860K select   0:00   0.00% at-spi2-registryd
  895 vermaden      5  20    0    21M  8272K select   0:00   0.00% gvfs-gphoto2-volume
  862 root         16  20    0    24M  8244K select   0:00   0.00% console-kit-daemon
  799 root          1  23    0    21M  8208K select   0:00   0.00% sshd
  875 vermaden      5  20    0    21M  8128K select   0:00   0.00% at-spi-bus-launcher
  956 vermaden      4  20    0    19M  7704K select   0:00   0.00% gvfsd-metadata
  893 vermaden      5  20    0    19M  7544K select   0:00   0.00% gvfs-mtp-volume-mon
  924 root          4  20    0    19M  7524K select   0:00   0.00% upowerd
  817 root          1  20    0    18M  7140K select   0:00   0.00% sendmail
  897 vermaden      4  20    0    19M  6936K select   0:00   0.00% dconf-service
  820 smmsp         1  52    0    18M  6700K pause    0:00   0.00% sendmail
  912 vermaden      1  20    0    17M  4892K piperd   0:00   0.00% libgtop_server2
  873 vermaden      1  20    0    14M  4164K select   0:00   0.00% dbus-daemon
  860 vermaden      1  22    0    17M  4124K wait     0:00   0.00% ck-launch-session
  876 vermaden      1  20    0    14M  4004K select   0:01   0.00% dbus-daemon
  749 messagebus    1  20    0    14M  3984K select   0:00   0.00% dbus-daemon
  872 vermaden      1  20    0    15M  3912K select   0:00   0.00% dbus-launch
  953 vermaden      1  20    0    14M  3708K nanslp   0:00   0.00% gstat
  966 vermaden      1  20    0    14M  3392K RUN      0:00   0.00% top
  853 vermaden      1  20    0    13M  3248K wait     0:00   0.00% sh
  846 vermaden      1  21    0    13M  3212K wait     0:00   0.00% sh
  952 vermaden      1  38    0    13M  3208K wait     0:00   0.00% sh
  838 root          1  25    0    13M  3100K wait     0:00   0.00% login
  856 vermaden      1  20    0    14M  3096K wait     0:00   0.00% xinit
  463 _dhcp         1  52    0    13M  2828K select   0:00   0.00% dhclient
  668 root          1  20    0    13M  2748K select   0:00   0.00% syslogd
  402 root          1  52    0    13M  2708K select   0:00   0.00% dhclient
  399 root          1  52    0    13M  2632K select   0:00   0.00% dhclient
  802 root          1  20    0    13M  2516K nanslp   0:00   0.00% cron
  754 root          1  20    0    13M  2404K select   0:00   0.00% moused
  839 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  845 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  841 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  843 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  842 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  844 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  840 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  464 root          1  20    0    11M  1540K select   0:00   0.00% devd

KDE/Plasma

Next one is KDE/Plasma and without surprise (at least for me) it uses more RAM then other desktop environments – about 2843 MB of RAM – that is more then twice as much as MATE and almost twice as much as XFCE.

Below you will find the top(1) output for KDE/Plasma.

% top -b -o res 1000
last pid:  1075;  load averages:  2.10,  1.56,  0.79; battery: 99%  up 0+00:05:22    00:38:14
67 processes:  2 running, 65 sleeping
CPU: 30.8% user,  0.1% nice,  8.8% system,  0.2% interrupt, 60.0% idle
Mem: 530M Active, 316M Inact, 441M Wired, 56K Buf, 6633M Free
ARC: 272M Total, 119M MFU, 139M MRU, 2012K Header, 12M Other
     211M Compressed, 514M Uncompressed, 2.44:1 Ratio
Swap: 2048M Total, 2048M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    WCPU COMMAND
  935 vermaden     12  21    0   588M   298M select   0:22   0.00% plasmashell
  874 vermaden      3  23    0   344M   241M select   0:15   9.96% Xorg
 1065 vermaden      7  30    0   365M   190M select   0:12  15.97% kate
  918 vermaden      5  31    0   376M   179M select   0:22  15.97% kwin_x11
 1035 vermaden      8  20    0   320M   156M select   0:03   0.00% dolphin
 1029 vermaden      3  20    0   312M   150M select   0:02   0.00% konsole
  959 vermaden      4  20    0   314M   143M select   0:01   0.00% kgpg
 1063 vermaden      5  52    0   304M   140M select   0:02   0.00% kioslave5
 1073 vermaden      4  20    0   303M   139M select   0:01   0.00% kioslave5
  916 vermaden     11  20    0   179M    84M select   0:02   0.00% kded5
  958 vermaden      3  20    0   147M    67M select   0:01   0.00% kalendarac
  944 vermaden      4  20    0   174M    63M select   0:01   0.00% DiscoverNotifier
  941 vermaden      6  20    0   130M    58M select   0:01   0.00% polkit-kde-authenti
  920 vermaden      4  20    0   131M    58M select   0:01   0.00% ksmserver
  940 vermaden      7  20    0   118M    56M select   0:01   0.00% org_kde_powerdevil
  942 vermaden      3  20    0   128M    56M select   0:01   0.00% kaccess
  922 vermaden      3  20    0   127M    55M select   0:01   0.00% kglobalaccel5
  968 vermaden      7  20    0   104M    47M select   0:01   0.00% kactivitymanagerd
  905 vermaden      3  20    0   127M    45M select   0:00   0.00% klauncher
  901 vermaden      3  26    0   113M    43M select   0:00   0.00% plasma_session
  904 vermaden      1  20    0   112M    41M select   0:00   0.00% kdeinit5
  885 vermaden      3  38    0   113M    41M select   0:00   0.00% startplasma-x11
 1041 vermaden      2  42    0    88M    37M select   0:00   0.00% kioslave5
 1069 vermaden      1  23    0   256G    37M select   0:00   0.00% kioslave5
 1039 vermaden      1  36    0   256G    37M select   0:00   0.00% kioslave5
 1027 vermaden      1  36    0   256G    36M select   0:00   0.00% kioslave5
  997 vermaden      3  28    0    86M    35M select   0:00   0.00% kioslave5
  943 vermaden      3  40   19   256G    32M select   0:00   0.00% baloo_file
  945 vermaden      4  20    0    87M    32M select   0:00   0.00% gmenudbusmenuproxy
  939 vermaden      3  20    0    83M    30M select   0:00   0.00% xembedsniproxy
  976 vermaden      3  20    0    76M    28M select   0:00   0.00% kscreen_backend_lau
  881 polkitd       7  20    0  2125M    27M select   0:00   0.00% polkitd
  926 root          7  20    0    67M    19M select   0:00   0.00% bsdisks
  966 vermaden      2  20    0    86M  9520K select   0:00   0.00% pulseaudio
  852 vermaden      1  20    0    21M  9512K RUN      0:00   0.00% sshd
  849 root          1  33    0    21M  9300K select   0:00   0.00% sshd
  879 root         16  20    0    24M  8320K select   0:00   0.00% console-kit-daemon
  799 root          1  22    0    21M  8208K select   0:00   0.00% sshd
  937 root          4  20    0    19M  7404K select   0:00   0.00% upowerd
  817 root          1  20    0    18M  7140K select   0:00   0.00% sendmail
  982 vermaden      4  20    0    19M  6732K select   0:00   0.00% dconf-service
  820 smmsp         1  52    0    18M  6704K pause    0:00   0.00% sendmail
  749 messagebus    1  20    0    14M  4452K select   0:00   0.00% dbus-daemon
  896 vermaden      1  28    0    15M  4252K select   0:00   0.00% dbus-launch
  897 vermaden      1  20    0    14M  4164K select   0:01   0.00% dbus-daemon
  877 vermaden      1  21    0    17M  4124K wait     0:00   0.00% ck-launch-session
 1034 vermaden      1  20    0    14M  3836K nanslp   0:00   0.00% gstat
 1075 vermaden      1  20    0    14M  3392K RUN      0:00   0.00% top
  853 vermaden      1  20    0    13M  3256K wait     0:00   0.00% sh
 1032 vermaden      1  26    0    13M  3232K wait     0:00   0.00% sh
  846 vermaden      1  20    0    13M  3212K wait     0:00   0.00% sh
  838 root          1  25    0    13M  3100K wait     0:00   0.00% login
  873 vermaden      1  20    0    14M  3096K wait     0:00   0.00% xinit
  463 _dhcp         1  52    0    13M  2828K select   0:00   0.00% dhclient
  668 root          1  20    0    13M  2748K select   0:00   0.00% syslogd
  402 root          1  52    0    13M  2708K select   0:00   0.00% dhclient
  399 root          1  52    0    13M  2632K select   0:00   0.00% dhclient
  802 root          1  20    0    13M  2516K nanslp   0:00   0.00% cron
  754 root          1  20    0    13M  2404K select   0:01   0.00% moused
  842 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  845 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  843 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  844 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  841 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  839 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  840 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  464 root          1  20    0    11M  1540K select   0:00   0.00% devd

Openbox

Not really a desktop environment but just for the sake of comparison I wanted to check it. With the default ‘ugly’ settings it consumed about 614 MB or RAM.

Below you will find the top(1) output for Openbox.

% top -b -o res 1000
last pid:   991;  load averages:  0.66,  0.77,  0.43; battery: 99%  up 0+00:04:35    00:52:31
43 processes:  1 running, 41 sleeping, 1 stopped
CPU:  8.8% user,  0.0% nice,  3.8% system,  0.5% interrupt, 86.9% idle
Mem: 126M Active, 196M Inact, 391M Wired, 40K Buf, 7210M Free
ARC: 210M Total, 78M MFU, 120M MRU, 1783K Header, 10M Other
     164M Compressed, 374M Uncompressed, 2.28:1 Ratio
Swap: 2048M Total, 2048M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    WCPU COMMAND
  894 vermaden      3  20    0   307M   217M select   0:02   0.00% Xorg
  942 vermaden      6  20    0   208M   112M select   0:02   0.00% caja
  981 vermaden      3  20    0   100M    60M select   0:02   0.00% geany
  897 vermaden      1  20    0    54M    25M select   0:00   0.00% openbox
  898 vermaden      1  20    0    53M    25M select   0:01   0.00% tint2
  939 vermaden      1  20    0    25M    13M select   0:00   0.00% xterm
  916 vermaden      1  20    0    25M    13M select   0:00   0.00% xterm
  986 vermaden      1  20    0    21M  9500K select   0:00   0.00% sshd
  983 root          1  28    0    21M  9360K select   0:00   0.00% sshd
  953 vermaden      4  20    0    21M  9228K select   0:00   0.00% at-spi2-registryd
  949 vermaden      5  49    0    21M  8736K select   0:00   0.00% at-spi-bus-launcher
  934 vermaden      1  20    0    20M  8608K STOP     0:00   0.00% dzen2
  799 root          1  20    0    21M  8208K select   0:00   0.00% sshd
  817 root          1  20    0    18M  7140K select   0:00   0.00% sendmail
  955 vermaden      4  30    0    19M  6916K select   0:00   0.00% dconf-service
  820 smmsp         1  52    0    18M  6636K pause    0:00   0.00% sendmail
  946 vermaden      1  30    0    15M  4380K select   0:00   0.00% dbus-launch
  947 vermaden      1  43    0    14M  3908K select   0:00   0.00% dbus-daemon
  937 vermaden      1  20    0    14M  3760K nanslp   0:00   0.00% gstat
  950 vermaden      1  20    0    14M  3732K select   0:00   0.00% dbus-daemon
  749 messagebus    1  52    0    14M  3648K select   0:00   0.00% dbus-daemon
  991 vermaden      1  22    0    14M  3428K RUN      0:00   0.00% top
  987 vermaden      1  21    0    13M  3316K wait     0:00   0.00% sh
  918 vermaden      1  20    0    13M  3292K wait     0:00   0.00% sh
  941 vermaden      1  22    0    13M  3280K wait     0:00   0.00% sh
  982 vermaden      1  52    0    13M  3272K ttyin    0:00   0.00% sh
  846 vermaden      1  20    0    13M  3212K wait     0:00   0.00% sh
  838 root          1  26    0    13M  3100K wait     0:00   0.00% login
  893 vermaden      1  20    0    14M  3096K wait     0:00   0.00% xinit
  463 _dhcp         1  52    0    13M  2828K select   0:00   0.00% dhclient
  668 root          1  20    0    13M  2748K select   0:00   0.00% syslogd
  402 root          1   4    0    13M  2708K select   0:00   0.00% dhclient
  399 root          1  52    0    13M  2632K select   0:00   0.00% dhclient
  802 root          1  20    0    13M  2516K nanslp   0:00   0.00% cron
  754 root          1  20    0    13M  2404K select   0:00   0.00% moused
  843 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  842 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  845 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  844 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  840 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  839 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  841 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  464 root          1  20    0    11M  1540K select   0:00   0.00% devd


GNOME

GNOME with the same test procedure used 2622 MB of RAM.

Below you will find the top(1) output for GNOME.

% top -b -o res 1000
last pid:  1114;  load averages:  2.62,  1.76,  0.81; battery: 99%  up 0+00:03:38    12:44:58
91 processes:  2 running, 89 sleeping
CPU: 45.9% user,  0.0% nice,  9.1% system,  0.3% interrupt, 44.7% idle
Mem: 531M Active, 560M Inact, 2152K Laundry, 522M Wired, 56K Buf, 6295M Free
ARC: 319M Total, 151M MFU, 156M MRU, 2354K Header, 9740K Other
     266M Compressed, 640M Uncompressed, 2.41:1 Ratio
Swap: 2048M Total, 2048M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    WCPU COMMAND
  904 vermaden      9  23    0  2656M   379M select   0:29   9.96% gnome-shell
  855 vermaden      3  22    0   333M   238M select   0:10   6.98% Xorg
 1040 vermaden     12  20    0   349M   192M select   0:10   0.00% epiphany-search-pro
  962 vermaden      4  20    0   312M   136M select   0:01   0.00% kgpg
 1026 vermaden      8  20    0   215M   125M select   0:01   0.00% gnome-calendar
 1107 vermaden      5  20    0   187M   108M select   0:01   0.00% gnome-control-cente
  958 vermaden      7  20    0   211M    81M select   0:01   0.00% evolution-alarm-not
 1058 vermaden     15  20    0   194M    78M select   0:01   0.00% WebKitNetworkProces
 1071 vermaden      6  20    0   144M    77M select   0:03   0.00% nautilus
 1112 vermaden      5  52    0    85M    59M select   0:13  19.97% gedit
 1065 vermaden      5  20    0   114M    56M select   0:01   0.00% gnome-terminal-serv
  961 vermaden      3  20    0   132M    53M select   0:00   0.00% kalendarac
  917 vermaden      5  20    0   146M    51M select   0:00   0.00% goa-daemon
 1034 vermaden      5  20    0    70M    50M select   0:00   0.00% seahorse
  921 vermaden      7  20    0   109M    48M select   0:00   0.00% evolution-addressbo
  919 vermaden     10  20    0    81M    44M select   0:00   0.00% evolution-calendar-
  912 vermaden      5  20    0    78M    42M select   0:00   0.00% evolution-source-re
  950 vermaden      6  20    0  2134M    39M select   0:00   0.00% gjs-console
  931 vermaden      6  20    0  2134M    39M select   0:00   0.00% gjs-console
  935 vermaden      5  20    0   119M    32M select   0:00   0.00% gsd-media-keys
  939 vermaden      5  20    0    51M    30M select   0:00   0.00% gsd-xsettings
  937 vermaden      5  20    0    49M    30M select   0:00   0.00% gsd-power
  957 vermaden      3  40   19   256G    28M select   0:00   0.00% baloo_file
  907 vermaden      7  20    0    83M    28M select   0:00   0.00% gnome-shell-calenda
  947 vermaden      5  20    0    46M    28M select   0:00   0.00% gsd-keyboard
  994 vermaden      4  20    0    46M    28M select   0:00   0.00% ibus-extension-gtk3
  993 vermaden      4  20    0    46M    27M select   0:00   0.00% ibus-ui-gtk3
  893 polkitd       7  20    0  2125M    27M select   0:00   0.00% polkitd
  965 vermaden      5  20    0    48M    27M select   0:00   0.00% zeitgeist-datahub
  952 vermaden      4  24    0    49M    26M select   0:00   0.00% gsd-printer
  859 vermaden      5  20    0    49M    20M select   0:00   0.00% gnome-session-binar
  874 root          7  20    0    67M    16M select   0:00   0.00% bsdisks
  956 vermaden      4  20    0    27M    14M select   0:00   0.00% ibus-daemon
  942 vermaden      5  20    0    27M    13M select   0:00   0.00% gsd-datetime
  945 vermaden      5  20    0    26M    13M select   0:00   0.00% gsd-sound
  943 vermaden      6  20    0    25M    12M select   0:00   0.00% gsd-smartcard
  940 vermaden      4  20    0    27M    11M select   0:00   0.00% gsd-print-notificat
 1092 vermaden      4  20    0    24M    11M select   0:00   0.00% gvfsd-dnssd
 1082 vermaden      5  20    0    24M    11M select   0:00   0.00% gvfsd-network
  872 vermaden      5  20    0    27M    11M select   0:00   0.00% gvfs-udisks2-volume
 1041 vermaden      4  20    0    24M    11M select   0:00   0.00% gvfsd-trash
 1062 vermaden      4  20    0    24M    11M select   0:00   0.00% gvfsd-burn
  976 vermaden      4  20    0    25M    10M select   0:00   0.00% zeitgeist-daemon
  902 vermaden      5  20    0    23M    10M select   0:00   0.00% gnome-keyring-daemo
  894 vermaden      1  20    0    21M  9488K RUN      0:00   0.00% sshd
  944 vermaden      5  20    0    21M  9356K select   0:00   0.00% gsd-housekeeping
  887 root          1  24    0    21M  9332K select   0:00   0.00% sshd
  933 vermaden      4  20    0    21M  9252K select   0:00   0.00% at-spi2-registryd
  925 vermaden      2  21    0    86M  9216K select   0:00   0.00% pulseaudio
  870 vermaden      4  20    0    24M  8860K select   0:00   0.00% gvfsd
  934 vermaden      5  20    0    20M  8616K select   0:00   0.00% gsd-usb-protection
  891 root         16  20    0    24M  8488K select   0:00   0.00% console-kit-daemon
  811 root          1  20    0    21M  8208K select   0:00   0.00% sshd
  867 vermaden      5  20    0    21M  8128K select   0:00   0.00% at-spi-bus-launcher
  927 root          4  20    0    20M  8040K select   0:00   0.00% accounts-daemon
  941 vermaden      5  20    0    20M  7976K select   0:00   0.00% gsd-sharing
  886 vermaden      5  20    0    21M  7936K select   0:00   0.00% gvfs-gphoto2-volume
  936 vermaden      5  20    0    20M  7936K select   0:00   0.00% gsd-a11y-settings
  923 vermaden      4  20    0    19M  7716K select   0:00   0.00% gvfsd-metadata
  910 root          4  20    0    19M  7620K select   0:00   0.00% upowerd
  881 vermaden      5  20    0    19M  7220K select   0:00   0.00% gvfs-mtp-volume-mon
  938 vermaden      4  20    0    19M  7180K select   0:00   0.00% gsd-screensaver-pro
  825 root          1  20    0    18M  7140K select   0:00   0.00% sendmail
  914 vermaden      4  20    0    19M  7128K select   0:00   0.00% dconf-service
  828 smmsp         1  52    0    18M  6704K pause    0:00   0.00% sendmail
  864 vermaden      1  20    0    14M  5268K select   0:01   0.00% dbus-daemon
  753 messagebus    1  20    0    14M  4280K select   0:00   0.00% dbus-daemon
  863 vermaden      1  21    0    15M  3912K select   0:00   0.00% dbus-launch
  868 vermaden      1  20    0    14M  3812K select   0:00   0.00% dbus-daemon
 1067 vermaden      1  20    0    14M  3704K nanslp   0:00   0.00% gstat
 1114 vermaden      1  20    0    14M  3420K RUN      0:00   0.00% top
  895 vermaden      1  20    0    13M  3252K wait     0:00   0.00% sh
  851 vermaden      1  22    0    13M  3212K wait     0:00   0.00% sh
 1066 vermaden      1  26    0    13M  3208K wait     0:00   0.00% sh
  843 root          1  23    0    13M  3100K wait     0:00   0.00% login
  854 vermaden      1  20    0    14M  3096K wait     0:00   0.00% xinit
  858 vermaden      1  21    0    13M  3016K wait     0:00   0.00% sh
  467 _dhcp         1  52    0    13M  2828K select   0:00   0.00% dhclient
  672 root          1  20    0    13M  2748K select   0:00   0.00% syslogd
  406 root          1   4    0    13M  2708K select   0:00   0.00% dhclient
  403 root          1  44    0    13M  2632K select   0:00   0.00% dhclient
  814 root          1  26    0    13M  2516K nanslp   0:00   0.00% cron
  757 root          1  20    0    13M  2404K select   0:00   0.00% moused
  850 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  847 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  848 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  844 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  849 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  845 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  846 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  468 root          1  20    0    11M  1540K select   0:00   0.00% devd

Summary of the RAM usage results are below.

  MB  ENVIRONMENT
----  --------------------
  97  FreeBSD Text Console
 614  Openbox
1361  MATE
1548  XFCE
2622  GNOME
2843  KDE/Plasma

Seems that now MATE developers are doing better job then XFCE devs πŸ™‚

CPU Time Usage Results

As I already had the top(1) outputs I also compared the CPU time used for that limited test. I will not post the top(1) results again as they are posted above. The Seconds column below is the sum of the TIME field from the top(1) command output.
Here are the results of used CPU time.

SECONDS  ENVIRONMENT
-------  --------------------
      0  FreeBSD Text Console
      7  Openbox
     26  MATE
     42  XFCE
     72  GNOME
     92  KDE/Plasma

Seems that MATE is twice as light on resources then XFCE. World has changed a lot since GNOME 2 was considered heavy fully fledged desktop environment while XFCE was light and fast … but even that ‘hungry’ XFCE takes only half of the time that KDE/Plasma uses for the same tasks.

Subjective Experience

The Openbox ‘environment’ started fastest and was most responsive to operate.

Both MATE and XFCE started little slower but after they loaded the desktop and taskbars they were snappy and fast to use.

On the other hand the KDE/Plasma took longest to load and each application I started – I needed to wait ‘a little’ with ‘bouncing mouse cursor’ for them to load. Also scrolling the /etc/ssh/moduli file to its end in Kate took REALLY long … even with Logitech M720 mouse which scroll wheel was spinning freely (without clicks). I want to mention that I am not disappointed by KDE/Plasma. Its just slower when used in a limiter 1 CPU and 8 GB RAM environment. Probably the load times and usability is a lot better on a 4 CORE system with 16 GB of RAM on fast NVMe SSD disk while we used rather slow virtual machine.

After adding GNOME to comparison it felt even slower then KDE/Plasma. Probably because GNOME requires hardware 3D acceleration for smooth operation. With its software rendering it felt really sluggish … while consuming less RAM and CPU time then KDE/Plasma.

Summary

Not sure how useful that is but I just was curious and wanted to check it out – and as I did I share what I found.

UPDATE 1 – Added freecolor(1) and htop(1) RAM Measurements

After suggestions from other places I added freecolor(1) and htop(1) measurements when it comes to RAM usage. Here are the results.

  SYS/WM/DE | top(1)  | htop(1) | conky(1) | freecolor(1)
------------+---------+---------+----------+-------------
    FreeBSD |   97 MB |  112 MB |    - -   |  157 MB 
    Openbox |  614 MB |  237 MB |  460 MB  |  382 MB 
       MATE | 1361 MB |  508 MB |  778 MB  |  788 MB 
       XFCE | 1548 MB |  533 MB |  794 MB  |  829 MB 
helloSystem | 1613 MB |  585 MB |  804 MB  |  830 MB 
      GNOME | 2622 MB |  625 MB |  990 MB  | 1000 MB 
 KDE/Plasma | 2843 MB |  730 MB | 1659 MB  | 1167 MB

I also added helloSystem out of curiosity.

Hope that helps.

EOF

FreeBSD 13.1 on ThinkPad W520

I created whole FreeBSD Desktop series … but I never created an article describing how I run FreeBSD on my own daily driver – the Lenovo ThinkPad W520 from 2011 – the last one with the so much appreciated 7-row keyboard. In this article I will share how I configured FreeBSD to make the most of it. If you are curious why I use such old laptop then my older Epitaph to Laptops article explains that in detail.

This is the Table of Contents for this article.

  • FreeBSD 13.1 on ThinkPad W520
  • ThinkPad W520
  • Specifications
  • FreeBSD System Configuration
  • Desktop Environment
    • Openbox
    • XFCE
    • GNOME
  • Accessories
    • Smaller Power Supply
    • Mouse Companion
    • Two Additional USB 3.0 Ports
    • Larger Custom Battery
  • Experience
  • Summary

ThinkPad W520

This machine was out-fucking-standing when it was released in 2011 … and expensive as hell also πŸ™‚ With 4 physical cores and up to 32 GB RAM only a few laptops could compete with it – Dell Precision M4600 – also could do that back then … but not exactly the same. You see – the last Dell Precision to carry similar 7-row keyboard was Dell Precision M4500 – but that one was from 2010 and was able to pack only … 8 GB RAM (official) and 16 GB RAM (unofficial) – so its not a fair comparison. Today 11 years (!) later ThinkPad W520 is still very capable and powerful machine. The only thing that you may need to do is to replace the thermal paste. I also did that – Classic ThinkPad Thermal Paste Change – as described here.

0THIS-w520-freebsd

To make you imagine how big that 11 years time span in IT is I will try to show you example with a car. Its like driving 30 years old Mercedes-Benz W124 from 1992 today because IT world and hardware changes and improves a lot faster then automobile industry. The Mercedes-Benz W124 with its indestructible automatic transmission and engine along with comfortable suspension and automatic air conditioning – offers daily experience not that far away from today’s cars – the meritum is definitely fulfilled. I know that from first hand since I owned one not that long ago. Not to mention its legendary reliability. Its also a car that is very liked by mechanics as its very ‘serviceable’ and has lots of space for everything. You do not need to disassemble entire front bumper and the headlight just to replace a broken light beam.

w520.mercedes.w124

This is the same that I would say about ThinkPad W520 today. You can put three (!) storage devices at the same time. Two 2.5 SATA drives and one mSATA disk. Assuming you would use 8 TB 2.5 Samsung QVO drives and 2 TB mSATA drive you would have 18 TB of storage … in a 11 years old laptop. You can grow that to 19TB with 1TB SD card in the slot … and we even did not touched any USB ports yet. Today you are able to get ThinkPad W520 in nice condition for about $300 if you are not heisty and getting 32 GB of DDR3 RAM costs another $100 so its pretty affordable hardware.

Specifications

For the record below You will find specs of mine machine. I also added driver and/or package that is used to support these devices.

CPU: Intel Core i7-2820QM 2.30GHz (4C/8T) Sandy Bridge 32nm
RAM: 32 GB (4 * 8GB DDR3)
HDD0: 128GB mSATA Samsung PM830 (system)
HDD1: 4 TB 2.5 SATA Samsung 860 QVO (data)
GFX0: Intel HD Graphics 3000 (integrated) [graphics/drm-kmod]
GFX1: Nvidia Quadro 2000M (discrete) [x11/nvidia-driver-390] {nvidia}
SCR: 15.6 1920x1080
USB: 2 x USB 2.0 + 2 x USB 3.0 [ehci(4) + xhci(4)]
AUDIO: Conexant CX20590 [snd_hda(4)]
PORTS0: 1 x VGA
PORTS1: 1 x DisplayPort
PORTS2: 1 x eSata
SD: Card Reader 5in1 [sdhci(4)]
LAN: 10/100/1000 Intel 82579LM Gigabit [em(4)]
WIFI: Intel Centrino Ultimate-N 6300 AGN 802.11n [iwn(4)]
BT: Bluetooth 3.0 [ng_ubt(4)]
CAM: Webcam 720p [multimedia/webcamd]

Articles such as this one often focuses on what works and is supported by FreeBSD and what is problematic or does not work at all. The very nice thing about ThinkPad W520 under FreeBSD command is that EVERYTHING works. From Bluetooth through Card Reader and also multiple suspend/resume cycles. I am doing months of uptime on that laptop and I reboot only when I need to update the system or I want to test something … but that often also does not need reboot now as you can just reroot into other BE as described in my other ZFS Boot Environments Revolutions article.

I do not need the compute power of discrete Nvidia Quadro 2000M card so I disabled it in the BIOS – but when I tried it with drivers from the FreeBSD Ports – everything worked as desired. I use integrated Intel HD Graphics 3000 which is more then enough for my needs. To be honest I would get ThinkPad T520 which can be bought with integrated graphics only but it has two downsides. The T520 does not have any USB 3.0 ports – that one I could probably live with but … it comes only with Dual Core CPUs. You can of course place a Quad Core CPU in it by yourself – but as W520 exist I do not see a reason not to get one πŸ™‚

FreeBSD System Configuration

From many things that I really like about FreeBSD (more here – Quare FreeBSD? – in separate article) is that it can be mostly configured using just 3 files. This configuration already features all power management settings that I described in the The Power to Serve – FreeBSD Power Management article.

I installed FreeBSD in a pretty standard way with GELI full disk encryption enabled and with ZFS as the filesystem as I can not live without ZFS Boot Environments. The FreeBSD installer automatically detects and applies the so called ‘Lenovo Fix‘. When in doubt the installation procedure is described in the FreeBSD Desktop – Part 2.1 – Install FreeBSD 12 article.

Main FreeBSD configuration files.

  • /etc/rc.conf – system and services configuration
  • /etc/sysctl.conf – runtime parameters configuration
  • /boot/loader.conf – parameters configurable at boot

I will also include these below as they are also important:

  • /etc/devfs.rules – devices configuration
  • /etc/fstab – filesystems configuration
  • /etc/ttys – terminal initialization configuration
  • /etc/wpa_supplicant.conf – WiFi configuration
  • /usr/local/etc/automount.confautomount(8) configuration
  • /usr/local/etc/doas.confdoas(1) configuration
  • id(1) groups membership
  • /usr/local/etc/X11/xorg.conf.d/* – X11 configuration

First the main /etc/rc.conf configuration file.

% cat /etc/rc.conf
# SILENCE # ------------------------------------------------------------------
  rc_startmsgs=NO

# NETWORK # ------------------------------------------------------------------
  hostname=w520.local
  background_dhclient=YES
  extra_netfs_types=NFS
  defaultroute_delay=3
  defaultroute_carrier_delay=3
  gateway_enable=YES
  harvest_mask=351
  rtsol_flags="-i"
  rtsold_flags="-a -i"

# MODULES/COMMON/BASE # ------------------------------------------------------
  kld_list="${kld_list} /boot/modules/i915kms.ko"
  kld_list="${kld_list} fusefs coretemp sem cpuctl ichsmb cuse"
  kld_list="${kld_list} libiconv cd9660_iconv msdosfs_iconv udf_iconv"

# MODULES/VIRTUALBOX # -------------------------------------------------------
  vboxnet_enable=YES
  kld_list="${kld_list} vboxdrv vboxnetadp vboxnetflt"

# POWER
  performance_cx_lowest=C1
  economy_cx_lowest=Cmax
  powerd_enable=YES
  powerd_flags="-n adaptive -a hiadaptive -b adaptive -m 800 -M 2000"

# DAEMONS | yes # ------------------------------------------------------------
  zfs_enable=YES
  xdm_enable=YES
  xdm_tty=ttyv4
  nfs_client_enable=YES
  ubuntu_enable=YES
  moused_enable=YES
  syslogd_flags='-s -s'
  sshd_enable=YES
  local_unbound_enable=YES
  webcamd_enable=YES
  rctl_enable=YES

# DAEMONS | no # -------------------------------------------------------------
  linux_enable=NO
  sendmail_enable=NONE
  sendmail_submit_enable=NO
  sendmail_outbound_enable=NO
  sendmail_msp_queue_enable=NO

# FS # -----------------------------------------------------------------------
  fsck_y_enable=YES
  clear_tmp_enable=YES
  clear_tmp_X=YES
  growfs_enable=YES

# OTHER # --------------------------------------------------------------------
  keyrate=fast
  keymap=pl.kbd
  virecover_enable=NO
  update_motd=NO
  devfs_system_ruleset=desktop
  hostid_enable=NO
  savecore_enable=NO

Now the runtime parameters /etc/sysctl.conf file.

% cat /etc/sysctl.conf
# SECURITY
  security.bsd.see_jail_proc=0
  security.bsd.unprivileged_proc_debug=0

# SECURITY/RANDOM PID
  kern.randompid=1

# ANNOYING THINGS
  vfs.usermount=1
  kern.coredump=0
  hw.syscons.bell=0
  kern.vt.enable_bell=0

# ZFS DELETE FUCKUP TRIM (DEFAULT: 64)
  vfs.zfs.vdev.trim_max_active=1

# ZFS ARC TUNING
  vfs.zfs.arc.min=134217728
  vfs.zfs.arc.max=536870912

# ZFS ARC FREE ENFORCE @ 1024 \* 1024 \* 3
  vfs.zfs.arc_free_target=3145728

# JAILS/ALLOW UPGRADES IN JAILS
  security.jail.chflags_allowed=1

# JAILS/ALLOW RAW SOCKETS
  security.jail.allow_raw_sockets=1

# DESKTOP/INTERACTIVITY
  kern.sched.preempt_thresh=224

# DESKTOP QUANTUM FOR TIMESHARE THREADS IN stathz TICKS (12) NomadBSD
  kern.sched.slice=3

# DESKTOP/IRIDIUM/CHROMIUM
  kern.ipc.shm_allow_removed=1

# SAMPLE RATE CONVERTER QUALITY (0=low .. 4=high) (1) NomadBSD
  hw.snd.feeder_rate_quality=3

# PERFORMANCE/ALL SHARED MEMORY SEGMENTS WILL BE MAPPED TO UNPAGEABLE RAM
  kern.ipc.shm_use_phys=1

# VIRTUALBOX aio(4) SETTINGS
  vfs.aio.max_buf_aio=8192
  vfs.aio.max_aio_queue_per_proc=65536
  vfs.aio.max_aio_per_proc=8192
  vfs.aio.max_aio_queue=65536

# NETWORK/DO NOT SEND RST ON SEGMENTS TO CLOSED PORTS
  net.inet.tcp.blackhole=2

# NETWORK/DO NOT SEND PORT UNREACHABLES FOR REFUSED CONNECTS
  net.inet.udp.blackhole=1

# NETWORK/LIMIT ON SYN/ACK RETRANSMISSIONS (3)
  net.inet.tcp.syncache.rexmtlimit=0

# NETWORK/USE TCP SYN COOKIES IF THE SYNCACHE OVERFLOWS (1)
  net.inet.tcp.syncookies=0

# NETWORK/ASSIGN RANDOM ip_id VALUES (0)
  net.inet.ip.random_id=1

# NETWORK/ENABLE SENDING IP REDIRECTS (1)
  net.inet.ip.redirect=0

# NETWORK/IGNORE ICMP REDIRECTS (0)
  net.inet.icmp.drop_redirect=1

# NETWORK/DROP TCP PACKETS WITH SYN+FIN SET (0)
  net.inet.tcp.drop_synfin=1

# NETWORK/RECYCLE CLOSED FIN_WAIT_2 CONNECTIONS FASTER (0)
  net.inet.tcp.fast_finwait2_recycle=1

# NETWORK/CERTAIN ICMP UNREACHABLE MESSAGES MAY ABORT CONNECTIONS IN SYN_SENT (1)
  net.inet.tcp.icmp_may_rst=0

Now the boot parameters in /boot/loader.conf file.

% cat /boot/loader.conf
# CONSOLE COMMON
  autoboot_delay=1       # OPTION '-1' MEANS NO WAIT AND 'NO' MEANS INFINITE WAIT
  hw.usb.no_boot_wait=0  # DO NOT WAIT FOR USB DEVICES FOR ROOT (/) FILESYSTEM
  boot_mute=YES          # SAME AS '-m' IN LOADER - MUTE CONSOLE WITH FreeBSD LOGO
  loader_logo=none       # DESIRED LOGO: fbsdbw beastiebw beastie none
  loader_menu_frame="none"
  screen.font="6x12"

# CONSOLE RESOLUTION
  efi_max_resolution="1920x1080"

# WINE FIX
  machdep.max_ldt_segment=2048

# MODULES - BOOT
  geom_eli_load=YES
  zfs_load=YES

# drm-kmod PACKAGE - USE SEMAPHORES FOR INTER-RING SYNC
  compat.linuxkpi.semaphores=1

# drm-kmod PACKAGE - ENABLE POWER-SAVING RENDER C-STATE 6
  compat.linuxkpi.enable_rc6=7

# drm-kmod PACKAGE - ENABLE POWER-SAVING DISPLAY C-STATES
  compat.linuxkpi.enable_dc=2

# drm-kmod PACKAGE - ENABLE FRAME BUFFER COMPRESSION FOR POWER SAVINGS
  compat.linuxkpi.enable_fbc=1

# ENABLE SYNAPTICS
  hw.psm.synaptics_support=1

# DISABLE /dev/diskid/* ENTRIES FOR DISKS
  kern.geom.label.disk_ident.enable=0

# DISABLE /dev/gptid/* ENTRIES FOR DISKS
  kern.geom.label.gptid.enable=0

# TERMINAL vt(4) COLORS
  kern.vt.color.0.rgb="#000000"
  kern.vt.color.1.rgb="#dc322f"
  kern.vt.color.2.rgb="#859900"
  kern.vt.color.3.rgb="#b58900"
  kern.vt.color.4.rgb="#268bd2"
  kern.vt.color.5.rgb="#ec0048"
  kern.vt.color.6.rgb="#2aa198"
  kern.vt.color.7.rgb="#94a3a5"
  kern.vt.color.8.rgb="#586e75"
  kern.vt.color.9.rgb="#cb4b16"
  kern.vt.color.10.rgb="#859900"
  kern.vt.color.11.rgb="#b58900"
  kern.vt.color.12.rgb="#268bd2"
  kern.vt.color.13.rgb="#d33682"
  kern.vt.color.14.rgb="#2aa198"
  kern.vt.color.15.rgb="#6c71c4"

# RACCT/RCTL RESOURCE LIMITS
  kern.racct.enable=1

# DISABLE ZFS PREFETCH
  vfs.zfs.prefetch_disable=1

# POWER MGMT / POWER OFF DEVICES WITHOUT ATTACHED DRIVER
  hw.pci.do_power_nodriver=3

# POWER MANAGEMENT FOR EVERY USED AHCI CHANNEL (ahcich 0-7)
  hint.ahcich.0.pm_level=5
  hint.ahcich.1.pm_level=5
  hint.ahcich.2.pm_level=5
  hint.ahcich.3.pm_level=5
  hint.ahcich.4.pm_level=5
  hint.ahcich.5.pm_level=5
  hint.ahcich.6.pm_level=5
  hint.ahcich.7.pm_level=5

# GELI THREADS
  kern.geom.eli.threads=4

Now the mentioned /etc/devfs.rules file.

% cat /etc/devfs.rules
[desktop=10]
add path 'acd*'      mode 0660 group operator
add path 'cd*'       mode 0660 group operator
add path 'da*'       mode 0660 group operator
add path 'pass*'     mode 0660 group operator
add path 'xpt*'      mode 0660 group operator
add path 'fd*'       mode 0660 group operator
add path 'md*'       mode 0660 group operator
add path 'uscanner*' mode 0660 group operator
add path 'ugen*'     mode 0660 group operator
add path 'usb/*'     mode 0660 group operator
add path 'video*'    mode 0660 group operator
add path 'cuse*'     mode 0660 group operator
add path 'lpt*'      mode 0660 group cups
add path 'ulpt*'     mode 0660 group cups
add path 'unlpt*'    mode 0660 group cups

Filesystems and SWAP configuration.

% cat /etc/fstab
# SWAP
  /dev/gpt/swap0  none  swap  sw  0 0

# FreeBSD PSEUDO - NEEDED BY wine(1)
  procfs  /proc  procfs  rw  0 0

# Ubuntu Linux PSEUDO
  linprocfs  /compat/ubuntu/proc     linprocfs  rw,late                    0 0
  linsysfs   /compat/ubuntu/sys      linsysfs   rw,late                    0 0
  devfs      /compat/ubuntu/dev      devfs      rw,late                    0 0
  fdescfs    /compat/ubuntu/dev/fd   fdescfs    rw,late,linrdlnk           0 0
  tmpfs      /compat/ubuntu/dev/shm  tmpfs      rw,late,size=1g,mode=1777  0 0
  /home      /compat/ubuntu/home     nullfs     rw,late                    0 0
  /tmp       /compat/ubuntu/tmp      nullfs     rw,late                    0 0

Terminals configuration under /etc/ttys file. Important part is the ttyv4 entry to match the xdm_tty=ttyv4 value from /etc/rc.conf file.

% grep '^[^#]' /etc/ttys | cat
console none                            unknown off insecure
ttyv0   "/usr/libexec/getty Pc"         xterm   onifexists secure
ttyv1   "/usr/libexec/getty Pc"         xterm   onifexists secure
ttyv2   "/usr/libexec/getty Pc"         xterm   onifexists secure
ttyv3   "/usr/libexec/getty Pc"         xterm   onifexists secure
ttyv4   "/usr/libexec/getty Pc"         xterm   off secure
ttyv5   "/usr/libexec/getty Pc"         xterm   off secure
ttyv6   "/usr/libexec/getty Pc"         xterm   off secure
ttyv7   "/usr/libexec/getty Pc"         xterm   off secure
ttyv4   "/usr/local/bin/xdm -nodaemon"  xterm   off secure
ttyu0   "/usr/libexec/getty 3wire"      vt100   onifconsole secure
ttyu1   "/usr/libexec/getty 3wire"      vt100   onifconsole secure
ttyu2   "/usr/libexec/getty 3wire"      vt100   onifconsole secure
ttyu3   "/usr/libexec/getty 3wire"      vt100   onifconsole secure
dcons   "/usr/libexec/getty std.9600"   vt100   off secure
xc0     "/usr/libexec/getty Pc"         xterm   onifconsole secure
rcons   "/usr/libexec/getty std.9600"   vt100   onifconsole secure

Wireless config – as an example for different network types. As you have seen I did not included any network information in the /etc/rc.conf file – this is because I use my own network.sh solution to connect to various both wire and wireless networks – FreeBSD Network Management with network.sh Script – described in detail here.

# cat /etc/wpa_supplicant.conf
# GENERAL
eapol_version=2
ap_scan=1
fast_reauth=1

# OPEN NETWORKS
network={
  key_mgmt=NONE
  priority=0
}

# NETWORK WITH HIDDEN SSID
network={
  scan_ssid=1
  ssid="hidden-network"
  psk="12341234"
  priority=0
}

# NAMED OPEN NETWORK
network={
  ssid="Free_Internet"
  key_mgmt=NONE
  priority=0
}

# NORMAL WPA/WPA2 SECURED NETWORK
network={
  ssid="SECURED"
  psk="12345678"
}

The automount(8) config.

% cat /usr/local/etc/automount.conf
  USERUMOUNT=YES
  USER=vermaden
  FM='caja --no-desktop'
  NICENAMES=YES

The doas(1) configuration.

# cat /usr/local/etc/doas.conf
# CORE
  permit nopass keepenv root     as root
  permit nopass keepenv vermaden as root

# THE network.sh SCRIPT
  # pw groupmod network -m YOURUSERNAME
  # cat /usr/local/etc/doas.conf
  permit nopass :network as root cmd /etc/rc.d/netif args onerestart
  permit nopass :network as root cmd /usr/sbin/service args squid onerestart
  permit nopass :network as root cmd dhclient
  permit nopass :network as root cmd ifconfig
  permit nopass :network as root cmd killall args -9 dhclient
  permit nopass :network as root cmd killall args -9 ppp
  permit nopass :network as root cmd killall args -9 wpa_supplicant
  permit nopass :network as root cmd ppp
  permit nopass :network as root cmd route
  permit nopass :network as root cmd tee args -a /etc/resolv.conf
  permit nopass :network as root cmd tee args /etc/resolv.conf
  permit nopass :network as root cmd umount
  permit nopass :network as root cmd wpa_supplicant

Groups I am member of with id(1) output.

% id vermaden | tr ' ' '\n' | tr ',' '\n'
uid=1000(vermaden)
gid=1000(vermaden)
groups=1000(vermaden)
0(wheel)
5(operator)
44(video)
69(network)
145(webcamd)
920(vboxusers)

Current X11 configuration.

% cat /usr/local/etc/X11/xorg.conf.d/card.conf
Section "Device"
  Identifier "Card0"
  Option "DPMS"
  Driver "intel"
  Option "DRI" "3"
  Option "AccelMethod" "sna"
  Option "TearFree" "true"
EndSection

% cat /usr/local/etc/X11/xorg.conf.d/flags.conf
Section "ServerFlags"
  Option "DontZap" "off"
EndSection

% cat /usr/local/etc/X11/xorg.conf.d/keyboard.conf
Section "InputDevice"
  Identifier "Keyboard0"
  Driver "kbd"
  Option "XkbLayout" "pl"
  Option "XkbOptions" "terminate:ctrl_alt_bksp,ctrl:nocaps"
EndSection

% cat /usr/local/etc/X11/xorg.conf.d/touchpad.conf
Section "InputClass"
  Identifier "touchpad"
  MatchIsTouchpad "on"
  Driver "libinput"
  Option "Tapping" "on"
  Option "NaturalScrolling" "on"
EndSection

I also do not rely on ‘stock’ fan speeds and set my own speeds according to CPU temperature with acpi-thinkpad-fan.sh script.

Desktop Environment

Openbox

As for the ‘desktop environment’ that I use – its my custom setup with Openbox along with tools like Tint2 and Dzen2 – for the most basic setup. The screenshot is from FreeBSD 11.1 but it looks exactly the same today.

freebsd-desktop-2019-04

I described this setup in details in the entire FreeBSD Desktop series.

XFCE

I have also tried XFCE – I liked it especially with the Global Menu app-menu plugin. You go this way with this XFCE Cupertino Way handy guide.

xfce-ghostbsd

GNOME

I also tried GNOME for a test – it did not suit me well so I went back to my Openbox setup – but You may find it more comfortable to use. Here is the FreeBSD GNOME 3 Fast Track article that will help you with that.

gnome-4-apps

Accessories

There are some accessories that are very handy with the ThinkPad W520 laptop. I will describe them below.

Smaller Power Supply

The ThinkPad W520 comes with quite large brick of ThinkPad 170W Power Supply. It works. Its OK … but you can use smaller one and more universal at the same time. I use the ThinkPad 135W Power Supply that originally was sold with ThinkPad W510 – the earlier model. Besides being smaller in size it also has one additional advantage. Its plug is round and also fits into other ThinkPads from this line like ThinkPad X220 or ThinkPad T420s. The original ThinkPad 170W Power Supply unfortunately only fits into the ThinkPad W520 laptop. Below you can compare their sizes.

w520.ps

Mouse Companion

After checking many mouse models – as described in the UNIX Mouse Shootout article – I finally settled with Logitech Triathlon M720 mouse. I have plugged the Lenovo USB Receiver into the back ‘powered’ USB port. While I use that mouse over the USB receiver you can also connect it using Bluetooth – also to other computers. This mouse has a special dedicated button to switch between 3 different computers. Unfortunately the copy-paste between them does not work πŸ™‚

mouse-M720

If you would like to ‘save’ that port for something else then you may use special USB board adapter that you will place in the Bluetooth module under the palm rest. You would loose Bluetooth support then of course – but not everyone uses that. Its available for example on Aliexpress site and looks like that.

w520.usb-bluetooth-pink

I do not use it as I do not need the ‘back’ USB port so below you will find its mounted picture on the ThinkPad X220 laptop instead – along with the Lenovo USB Receiver attached.

w520.usb-bluetooth

Two Additional USB 3.0 Ports

The ThinkPad W520 comes with not well known today ExpressCard port. With this cheap adapter from Aliexpress you can add two additional USB 3.0 ports. You may of course do not need that many ports – but if you are left handed then you probably use mouse on the left of your laptop – then USB ports on the right will be handy.

w520.express

These USB 3.0 ports may be also useful with some bhyve(8) setups. Currently its not supported to pass-thru just a single USB port to a virtual machine. You need to pass thru entire controller. This way you can pass-thru that controller to bhyve(8) VM and have another USB 3.0 ports on the host.

Larger Custom Battery

The original largest extended battery for ThinkPad W520 had 9400mAh capacity. Its possible to get even larger custom extended battery but in the same physical size and shape – with 9600mAh capacity – and for only about $50. To remind you the original one costs closer to $200 unfortunately. I got mine from this Aliexpress page. With my power settings and with this battery along with enabled WiFi and screen brightness just one step less then maximum brightness it show more then 7 hours of time left in acpiconf(8) command.

% acpiconf -i 0
Design capacity:        10368 mAh
Last full capacity:     10368 mAh
Technology:             secondary (rechargeable)
Design voltage:         10800 mV
Capacity (warn):        518 mAh
Capacity (low):         18 mAh
Low/warn granularity:   1 mAh
Warn/full granularity:  1 mAh
Model number:           42T4763
Serial number:              1
Type:                   LION
OEM info:               SANYO
State:                  discharging
Remaining capacity:     97%
Remaining time:         7:17
Present rate:           1393 mA (17086 mW)
Present voltage:        12266 mV

As you can see from the command above this custom battery size is even reported as closer to 10400mAh instead of advertised 9600maH. I do not know how to check which one is closer to truth – but the fact is that it allows longer work then the official one – and for smaller price.

Experience

This laptop along with its smaller and lighter brothers such as ThinkPad X220 or ThinkPad T420s are the best machines I know to work on FreeBSD … but maybe its because I do not use newer laptops πŸ™‚ The general experience of FreeBSD on ThinkPad W520 is stable and uninterrupted work count in days and weeks of uptime. The suspend/resume works like a charm with many cycles possible – not just one. I one even recorded such suspend/resume cycle with many applications and games running on a busy FreeBSD system. Its available here FreeBSD 12.2 Suspend/Resume on a Vimeo page.

Here is now its being used daily.

w520.real

Summary

I have been using this laptop since many years and I even laugh that as its a decade old – I would use it for the next decade πŸ™‚ Most/all of this configuration applies to other ThinkPad models from this lineup like X220/T420s/T420/T520 … probably even L520 (but I did not tested that one).

EOF

XFCE Cupertino Way

I really like GhostBSD … and NomadBSD. They are really great graphical and easy to use FreeBSD variants for the lack of better word. While NomadBSD is more focused on portable USB pendrive edition the GhostBSD is more like a Ubuntu replacement. Install and use on your laptop or desktop computer. It comes in two flavors – the default MATE edition and an alternative XFCE edition.

One of the things I really like about Ubuntu MATE edition is that it comes with desktop layout helper tool that will allow you to select one of the available predefined MATE desktop layouts.

ubuntu-mate-desktop-layout

From all of the available ones I like the ‘Cupertino’ one the most – its tries to mimic the Apple Mac OS X operating system behavior with global menu on top and Plank dock at the bottom … and it does it really well.

ubuntu-mate-cupertino

I wanted to do something similar on GhostBSD but unfortunately the Vala Panel Application Menu for MATE desktop environment is not available for FreeBSD (and that means its also not available for GhostBSD). Fortunately the XFCE global menu is available on FreeBSD as x11/xfce4-appmenu-plugin package so I will try to make GhostBSD look more like Ubuntu Mate in its Cupertino layout with several easy steps.

By default GhostBSD XFCE edition comes with single XFCE panel at the bottom. I have done pretty straightforward installation with fish(1) shell chosen as default during installation.

ghostbsd-xfce-default

Fonts

By default GhostBSD comes with 96 DPI set by the installer. Lets change that to something smaller. Start the Appearance application.

xfce-appearance

Now set the desired settings for the fonts on the Fonts tab. After some checks the 80 DPI along with Hinting set to None looked best. I also switched to the Ubuntu font.

xfce-fonts

ZSH Shell and Terminal

While the fish(1) shell is quite decent interactive shell with sane defaults I really prefer the POSIX syntax compatible zsh(1) shell instead. I talked more about that in my Ghost in the Shell – Part 7 – ZSH Setup article.

I will not repeat everything I wrote there and I will just paste the instructions here to make that zsh(1) shell configured and nice looking.

root # pkg install -y \
         zsh \
         zsh-autosuggestions \
         zsh-syntax-highlighting \
         ubuntu-font

root # fetch -o /usr/local/etc/zshrc https://raw.githubusercontent.com/vermaden/scripts/master/zshrc

user % fetch -o ~/.zshrc             https://raw.githubusercontent.com/vermaden/scripts/master/DOT.zshrc

user % fetch -o ~/.zshrc.DOAS.SUDO   https://raw.githubusercontent.com/vermaden/scripts/master/DOT.zshrc.DOAS.SUDO

user % chsh -s /usr/local/bin/zsh

user % fc-cache -f

As we are at the terminal related things enable Solarized (Dark) theme in the XFCE Terminal options.

terminal-theme

… and change font to Ubuntu Mono with your preferred size.

teminal-font

Now you have the zsh(1) shell configured and set as your default shell. Also the XFCE Terminal looks better now. Some settings will require logout and login route but I recommend something different. Go through all these setting and then do just one single reboot or logout/login routing.

zsh-ready

XFCE Global Menu

I though that XFCE global menu is – same as MATE one – not available on FreeBSD. Fortunately Joel Carnat with its FreeBSD 13 on ThinkPad T460s article proved me wrong. He even added the instructions to his guide – for which I am very thankful to him.

To get XFCE global menu on FreeBSD (and GhostBSD) we need to do these steps.

root # pkg install -y xfce4-appmenu-plugin

user % xfconf-query -c xsettings -p /Gtk/ShellShowsMenubar -n -t bool -s true

user % xfconf-query -c xsettings -p /Gtk/ShellShowsAppmenu -n -t bool -s true

user % xfconf-query -c xsettings -p /Gtk/Modules -n -t string -s appmenu-gtk-module

Now we will be able to add the XFCE AppMenu Plugin to our top panel.

xfce-appmenu-plugin

We need to now move the XFCE panel from bottom to the top. Go into the Panel Preferences as shown below and move it.

xfce-panel-move-top

After moving it to the top and enabling the Lock Panel option add/remove the Items to match this list below. Feel free to also add other items that you need.

xfce-top-panel-items

To make the XFCE AppMenu Plugin look even better enable Bold Application Name in its Preferences dialog.

xfce-appmenu-bold

As for the Whisker Menu left only icon enabled to display to make it look better.

whisker-icon

The XFCE AppMenu Plugin should be now ready and the top panel should look somewhat like that.

xfce-global-menu-short

You can also customize the DateTime plugin to your needs.

xfce-datetime

Window Manager

The Window Manager settings are not controlled by the Appearance application. It has its own separate one. Lets start it.

xfce-window-manager

We will also set the Ubuntu font here.

Groups

Make sure your user (vuk in this guide) is in below groups.

root # pw groupmod wheel    -m vuk
root # pw groupmod operator -m vuk
root # pw groupmod video    -m vuk
root # pw groupmod network  -m vuk

You can omit the network group if you do not intend to use network.sh to manage your network connections.

Plank

As the last step we will add the Plank dock at the bottom.

root # pkg install -y plank

user % plank &

user % plank --preferences

You should see something like that on the bottom of your screen.

xfce-plank-bottom

The Plank preferences are shown below.

xfce-plank-preferences

Make sure to add Plank to Startup so it will start automatically at each login.

xfce-plank-startup

Result

After all these steps our GhostBSD looks more or less like that now.

xfce-ghostbsd

Plain FreeBSD Way

Some people will prefer to stick to the ‘original’ FreeBSD instead of using preconfigured GhostBSD. This last section is for them. First install FreeBSD like described HERE. Then install these packages shown below.

root # pkg install -y exa ubuntu-font xfce xfce4-appmenu-plugin xorg-minimal

user % echo '. /usr/local/etc/xdg/xfce4/xinitrc' > ~/.xinitrc

user % xintrc

Now having done the above do all the steps from that article.

The end result seems quite similar.

xfce-freebsd

You may even want to replace Plank with another bottom XFCE Panel if you want.

xfce-freebsd-pkg-prime

Viola! You have XFCE configured on plain FreeBSD. One thing to keep in mind is that besides XFCE you have nothing more πŸ™‚ Using GhostBSD method all other things are configured. With plain FreeBSD way you have no device automounting. No network plugin in the taskbar. No power management tuning. No other applications. Nothing. But you can all do it yourself using the needed articles from the FreeBSD Desktop series or other sources.

One last thing. I really appreciate that GhostBSD exists and is actively maintained and expanded – this guide is not here to make it look bad. Its here to make it better.

Regards.