AMP AMP

How to install XFCE desktop in FreeBSD

To install XFCE desktop in FreeBSD

In this article we will learn how to install XFCE desktop in FreeBSD. FreeBSD is a UNIX-like operating system used by companies, computer professionals, Internet Service Providers, researchers, students and home users.

Installation of XFCE

First start installing “ xorg” to install XFCE.

root@linuxhelp:~ # pkg install xorg 
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01    
Fetching packagesite.txz: 100%    5 MiB 147.8kB/s    00:39    
Processing entries: 100%
FreeBSD repository update completed. 25371 packages processed.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    xorg: 7.7_2

Number of packages to be installed: 1

Proceed with this action? [y/N]: y
[1/1] Installing xorg-7.7_2...


Then run the following command to install desktop manager Slim.

root@linuxhelp:~ # pkg install slim 
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    slim: 1.3.6_12

Number of packages to be installed: 1

280 KiB to be downloaded.

Proceed with this action? [y/N]: y
Fetching slim-1.3.6_12.txz: 100%  280 KiB  95.7kB/s    00:03    
Checking integrity... done (0 conflicting)
[1/1] Installing slim-1.3.6_12...
[1/1] Extracting slim-1.3.6_12: 100%
Message from slim-1.3.6_12:
*************************************************************************

Thanks to Nikos Ntarmos, it is now possible to start slim from /etc/ttys.
Please see /usr/local/etc/rc.d/slim for instructions on how to do that.

Alternatively, just put

slim_enable=yes

into /etc/rc.conf

*** Option " sessions"  is no longer supported. ***

Now you need to put session files in the directory specified by option
" sessiondir" . They should be xdg-data-style .desktop files.
The " Name"  entry in the session file would be used as session name.
The " Exec"  entry would replace %session in login_cmd.
*************************************************************************


Run the following command to install “ xfce” using ” pkg install” command.

root@linuxhelp:~ # pkg install xfce 
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 22 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    xfce: 4.12_1
    gtk-xfce-engine: 3.2.0
    mousepad: 0.4.0_2
    xfce4-notifyd: 0.2.4_1
    libxfce4util: 4.12.1
.
.
.
[20/22] Installing xfce4-appfinder-4.12.0...
[20/22] Extracting xfce4-appfinder-4.12.0: 100%
[21/22] Installing xfce4-wm-4.12.3...
[21/22] Extracting xfce4-wm-4.12.3: 100%
[22/22] Installing xfce-4.12_1...
Message from xfce4-tumbler-0.1.31_2:
To override the default configuration, you must copy the rc-file:

    mkdir ~/.config/tumbler
    cp /usr/local/etc/xdg/tumbler/tumbler.rc ~/.config/tumbler

For more information see http://docs.xfce.org/xfce/thunar/tumbler
Message from xfce4-session-4.12.1_3:
To be able to shutdown or reboot your system, you' ll have to add .rules
files in /usr/local/etc/polkit-1/rules.d directory. Which looks
like this (replace PUTYOURGROUPHERE by your group):

polkit.addRule(function (action, subject) {
  if ((action.id == " org.freedesktop.consolekit.system.restart"  ||
      action.id == " org.freedesktop.consolekit.system.stop" )
      & &  subject.isInGroup(" PUTYOURGROUPHERE" )) {
    return polkit.Result.YES 
  }
}) 

For those who have working suspend/resume:

polkit.addRule(function (action, subject) {
  if (action.id == " org.freedesktop.consolekit.system.suspend" 
      & &  subject.isInGroup(" PUTYOURGROUPHERE" )) {
    return polkit.Result.YES 
  }
}) 

To configure XFCE Desktop

Once the installation is completed start configuring the “ rc.conf” file. Open the file and add the below lines to it.

root@linuxhelp:~ # nano /etc/rc.conf 
moused_enable=" YES" 
dbus_enable=" YES" 
hald_enable=" YES" 
slim_enable=" YES" 


Create .xitirc file auto start the session by running the following command. Create it on root directory or user directory.

root@linuxhelp:~ # nano .xinitrc 
exec xfce4-session


Run the following command to restart the system.

root@linuxhelp:~ # init 6


After rebooting, login using the credentials.

XFCE Desktop appears as follows.

Right click on the desktop for application launch.

Tag : XFCE
Comment
Wooty
Dec 30 2018
@guilhermemilhomem Update your laptops BIOS firmware to the latest version/revision. You may have to install Windows 10 (trial works) as Dell firmware is a windows executable (.exe).

Hope this helps others installing FreeBSD 11.2 or 12 on a modern laptop. This is for UEFI, MBR/BIOS install should work no problem on older BIOS.
guilhermemilhomem
Sep 22 2018
Xfce isn't loading on my laptop. I'm using a Dell Inspiron i15-5566 and tried versions 12 alpha 6 and 11.2 of freebsd. Thank you for attention.
rubenerd
Apr 24 2018
Great guide :). Only comment is moused_enable="YES" isn't necessary, this is the console mouse driver not the Xorg one. Cheers.
geminiman112
Nov 11 2017
Thank you so much! This was very helpful.
Add a comment
FAQ
Q
Does this affect CPU performance when using XFCE?
A
This is Lightweight Build so it doesn't affect System performance
Q
Is XFCE is a Theme?
A
Not Just a theme It’s a Desktop environment which changes every things in the aspact of Design
Q
Does it have an archive file extraction in XFCE?
A
Yes you can view and extract the archieve files
Q
Is there some way to call the menu with the keyboard in the Xfce?
A
Assign a key with the Keyboard Settings → Shortcuts to the command xfdesktop -menu. (This does not work reliably since Linux Kernel is tickless, so xfdesktop -menu needs a fix) The menu will popup where your mouse is located.
Q
How can I see a list of all the shortcut keys in XFCE?
A
Use the following command, which will produce a nicely formatted text list to standard output:

xfconf-query -c xfce4-keyboard-shortcuts -l -v | cut -d'/' -f4 | awk '{printf "%30s", $2; print "\t" $1}' | sort | uniq