This is a guide about installing LXQT with X11 on FreeBSD and turning it in to a fully featured desktop OS. The intended audience for this guide are people with little experience with FreeBSD and people with old hardware.
Assumptions:
1. FreeBSD is already installed on your system.
2. Your user is part of the following groups: wheel, operator and video. Refer to 3.3.3. Managing Groups.
2. You have Internet connection.
3. You are using the binary packages and pkg is already installed on your system. Refer to 4.4.1. Getting Started with pkg.
I. Installing packages
1. It's time to get the drivers because people like big resolutions nowadays. At the time of writing install drm-61-kmod which will not bring unneeded packages like the metapackage drm-kmod -
2. Let the OS worry about CPU microcode, we are going to install either cpu-microcode-intel or cpu-microcode-amd depending on our CPU model -
3. Now let's build the foundations for our desktop. Install either xorg or xorg-minimal package. In this guide we will install xorg-minimal, we don't need all the packages from Xorg. Manual configuration of Xorg is not needed -
4. The elephant in the room, it's time for the desktop! LXQT is in my opinion the best choice for old hardware or for anyone who values their system resources. There are other good options too but for the purpose of this guide we are going to stick with it -
5. A Graphical User Interface needs Graphical Login as well, so we will install SDDM and a FreeBSD theme for it which is the recommended Display Manager for LXQT -
6. By default LXQT does not have a lot of dependencies and we will need quite a few in order to make it a fully usable desktop:
6.1 We are going to need GVFS in order to properly use our File Manager (for example to open the "Computer" shortcut) -
6.2 If you like videos and you would like to see a picture of the video instead of an icon -
6.3 If you have a lot of USB drives it's likely that they will have different filesystems and we need some way to open them, this is the reason we are going to install support for at least NTFS and exFAT filesystems but it's up to you how many you wish to support on your system (you can always add more of course) -
6.4 You are a sound guy/girl? Then you would like to have a sound mixer and why not a sound theme as well? -
6.5 You are in to shiny stuff? We are going to install a compositor to have some fancy shadows which will be compatible for your old hardware as a bonus. We are also going to install a theme for Openbox (your Window Manager), a cursor theme and an icon theme -
6.6 And finally let's add "a few fonts" because you will need a proper font support (you can always add more of course) -
6.7 Now we are going to install 2 small packages: xsettingsd which is recommended by LXQT for applying GTK themes on the fly and setxkbmap which is critical if you have more than one keyboard layout (for example English and French keyboard). Those packages are optional and they depend on your use case -
7. You are going to need a few more packages of which some might be optional and they depend again on your use case -
II. Configuration Files
1. Add the following lines to your /etc/rc.conf file (Refer to 5.3. Graphic card drivers for the kld_list line):
dbus_enable="YES" # This should be enabled because some weird things will happen without it. I have tried it myself so you don't have to.
firewall_enable="YES" # This is the default FreeBSD firewall. If you want you don't have to enable it.
firewall_quiet="YES" # This line quiets some firewall messages from the console.
firewall_type="workstation" # This is the type of firewall.
kld_list="i915kms" # This line starts the GPU driver.
microcode_update_enable="YES" # This line enables the microcode updates.
rc_startmsgs="NO" # This line quiets some OS messages from the console.
sddm_enable="YES" # This line starts our Display Manager.
2. Add the following lines to your /boot/loader.conf file:
autoboot_delay=3 # We don't have to wait 10 seconds for FreeBSD to load anymore.
fusefs_load="YES" # This loads our NTFS and exFAT filesystem support.
loader_color="NO" # Who wants colors on a console?
loader_logo="none" # Beastie is no more.
3. Add this line to your /etc/fstab file:
proc /proc procfs rw 0 0
4. Your /usr/local/etc/sddm.conf file should look like this:
[General]
InputMethod=""
Numlock=on
[Theme]
Current=sddm-freebsd-black-theme
CursorTheme=Vanilla-DMZ
EnableAvatars=false
III. Reboot
IV. Configuration Through LXQT
1. Open your LXQT Configuration Center.
2. Open LXQT Session Settings.
3. In the Autostart tab click on the button Add to add a new entry in Global Autostart. Name it "X Compositing Manager", type "/usr/local/bin/xcompmgr -cC" in the Command filed and thick Wait for system tray and Start only in X11. This will enable your compositor with the fancy shadows on your next login.
4. In the Environment (Advanced) tab click on the button Add and on Variable name type "XCURSOR_PATH", on Value type "~/.icons:/usr/local/share/icons". This is a workaround for a known BUG at the time of writing. Without it your cursor will be black.
V. It's Your Turn To Tweak It.
I'm open to any suggestions for improvements to this guide, also sorry if I made any spelling mistakes, English is not my native language.
I hope that this guide was helpful for you. Thanks for reading!
Regards,
Georgi
Assumptions:
1. FreeBSD is already installed on your system.
2. Your user is part of the following groups: wheel, operator and video. Refer to 3.3.3. Managing Groups.
2. You have Internet connection.
3. You are using the binary packages and pkg is already installed on your system. Refer to 4.4.1. Getting Started with pkg.
I. Installing packages
1. It's time to get the drivers because people like big resolutions nowadays. At the time of writing install drm-61-kmod which will not bring unneeded packages like the metapackage drm-kmod -
# pkg install drm-61-kmod
2. Let the OS worry about CPU microcode, we are going to install either cpu-microcode-intel or cpu-microcode-amd depending on our CPU model -
# pkg install cpu-microcode-intel
3. Now let's build the foundations for our desktop. Install either xorg or xorg-minimal package. In this guide we will install xorg-minimal, we don't need all the packages from Xorg. Manual configuration of Xorg is not needed -
# pkg install xorg-minimal
4. The elephant in the room, it's time for the desktop! LXQT is in my opinion the best choice for old hardware or for anyone who values their system resources. There are other good options too but for the purpose of this guide we are going to stick with it -
# pkg install lxqt
5. A Graphical User Interface needs Graphical Login as well, so we will install SDDM and a FreeBSD theme for it which is the recommended Display Manager for LXQT -
# pkg install sddm sddm-freebsd-black-theme
6. By default LXQT does not have a lot of dependencies and we will need quite a few in order to make it a fully usable desktop:
6.1 We are going to need GVFS in order to properly use our File Manager (for example to open the "Computer" shortcut) -
# pkg install gvfs
6.2 If you like videos and you would like to see a picture of the video instead of an icon -
# pkg install ffmpegthumbnailer
6.3 If you have a lot of USB drives it's likely that they will have different filesystems and we need some way to open them, this is the reason we are going to install support for at least NTFS and exFAT filesystems but it's up to you how many you wish to support on your system (you can always add more of course) -
# pkg install fusefs-ntfs fusefs-exfat
6.4 You are a sound guy/girl? Then you would like to have a sound mixer and why not a sound theme as well? -
# pkg install pavucontrol-qt freedesktop-sound-theme
6.5 You are in to shiny stuff? We are going to install a compositor to have some fancy shadows which will be compatible for your old hardware as a bonus. We are also going to install a theme for Openbox (your Window Manager), a cursor theme and an icon theme -
# pkg install xcompmgr openbox-arc-theme cursor-dmz-theme papirus-icon-theme
6.6 And finally let's add "a few fonts" because you will need a proper font support (you can always add more of course) -
# pkg install noto gnu-unifont-otf hack-font roboto-fonts-ttf font-awesome
6.7 Now we are going to install 2 small packages: xsettingsd which is recommended by LXQT for applying GTK themes on the fly and setxkbmap which is critical if you have more than one keyboard layout (for example English and French keyboard). Those packages are optional and they depend on your use case -
# pkg install xsettingsd setxkbmap
7. You are going to need a few more packages of which some might be optional and they depend again on your use case -
# pkg install firefox libreoffice gimp vlc inkscape qpdfview qbittorrent
II. Configuration Files
1. Add the following lines to your /etc/rc.conf file (Refer to 5.3. Graphic card drivers for the kld_list line):
dbus_enable="YES" # This should be enabled because some weird things will happen without it. I have tried it myself so you don't have to.
firewall_enable="YES" # This is the default FreeBSD firewall. If you want you don't have to enable it.
firewall_quiet="YES" # This line quiets some firewall messages from the console.
firewall_type="workstation" # This is the type of firewall.
kld_list="i915kms" # This line starts the GPU driver.
microcode_update_enable="YES" # This line enables the microcode updates.
rc_startmsgs="NO" # This line quiets some OS messages from the console.
sddm_enable="YES" # This line starts our Display Manager.
2. Add the following lines to your /boot/loader.conf file:
autoboot_delay=3 # We don't have to wait 10 seconds for FreeBSD to load anymore.
fusefs_load="YES" # This loads our NTFS and exFAT filesystem support.
loader_color="NO" # Who wants colors on a console?
loader_logo="none" # Beastie is no more.
3. Add this line to your /etc/fstab file:
proc /proc procfs rw 0 0
4. Your /usr/local/etc/sddm.conf file should look like this:
[General]
InputMethod=""
Numlock=on
[Theme]
Current=sddm-freebsd-black-theme
CursorTheme=Vanilla-DMZ
EnableAvatars=false
III. Reboot
IV. Configuration Through LXQT
1. Open your LXQT Configuration Center.
2. Open LXQT Session Settings.
3. In the Autostart tab click on the button Add to add a new entry in Global Autostart. Name it "X Compositing Manager", type "/usr/local/bin/xcompmgr -cC" in the Command filed and thick Wait for system tray and Start only in X11. This will enable your compositor with the fancy shadows on your next login.
4. In the Environment (Advanced) tab click on the button Add and on Variable name type "XCURSOR_PATH", on Value type "~/.icons:/usr/local/share/icons". This is a workaround for a known BUG at the time of writing. Without it your cursor will be black.
V. It's Your Turn To Tweak It.
I'm open to any suggestions for improvements to this guide, also sorry if I made any spelling mistakes, English is not my native language.
I hope that this guide was helpful for you. Thanks for reading!
Regards,
Georgi