Add Xfce desktop guide
This commit is contained in:
parent
25dcf8339d
commit
67876197c9
3 changed files with 331 additions and 10 deletions
|
@ -167,8 +167,8 @@ you are running, for example. Read more background information on this topic in
|
|||
the [Privacy and security](https://wiki.archlinux.org/title/Domain_name_resolution#Privacy_and_security)
|
||||
section in the Arch Wiki article about Domain name resolution.
|
||||
|
||||
Create `/etc/systemd/resolved.conf.d/dnssec.conf` with the following content to
|
||||
enable [DNSSEC](https://wiki.archlinux.org/title/DNSSEC) for DNS query
|
||||
I create `/etc/systemd/resolved.conf.d/dnssec.conf` with the following content
|
||||
to enable [DNSSEC](https://wiki.archlinux.org/title/DNSSEC) for DNS query
|
||||
validation in Systemd-resolved:
|
||||
|
||||
```ini {filename="/etc/systemd/resolved.conf.d/dnssec.conf"}
|
||||
|
@ -176,8 +176,8 @@ validation in Systemd-resolved:
|
|||
DNSSEC=true
|
||||
```
|
||||
|
||||
Additionally, to use TLS[^4] for encrypting the traffic between your host and
|
||||
the DNS server create `/etc/systemd/resolved.conf.d/dns_over_tls.conf` to enable
|
||||
Additionally, to use TLS[^4] for encrypting the traffic between my host and the
|
||||
DNS server I create `/etc/systemd/resolved.conf.d/dns_over_tls.conf` to enable
|
||||
[DNS over TLS (DoT)](https://en.wikipedia.org/wiki/DNS_over_TLS) for
|
||||
Systemd-resolved by containing:
|
||||
|
||||
|
@ -193,13 +193,13 @@ DNSOverTLS=yes
|
|||
[DNS Checker](https://dnschecker.org/public-dns/de).
|
||||
{{< /callout >}}
|
||||
|
||||
Afterwards restart the `systemd-resolved.service` to activate the changes:
|
||||
Afterwards I restart the `systemd-resolved.service` to activate the changes:
|
||||
|
||||
```bash
|
||||
sudo systemctl restart systemd-resolved.service
|
||||
```
|
||||
|
||||
Check if the new DNS server is used and `+DNSoverTLS` is listed in *Protocols*
|
||||
I check if the new DNS server is used and `+DNSoverTLS` is listed in *Protocols*
|
||||
in the output of the following command:
|
||||
|
||||
```bash
|
||||
|
@ -222,21 +222,21 @@ Remember to change `arch-studio24` to your hostname!
|
|||
|
||||
The time synchronization can also be configured to require a TLS connections by
|
||||
[using NTS servers](https://wiki.archlinux.org/title/Chrony#Using_NTS_servers).
|
||||
Edit the `/etc/chrony.conf` file to use a NTS server and second one as fallback:
|
||||
I edit the `/etc/chrony.conf` file to use a local NTS server and fallback:
|
||||
|
||||
```
|
||||
server ptbtime1.ptb.de offline nts
|
||||
server nts1.time.nl offline nts
|
||||
```
|
||||
|
||||
After editing restart the following services:
|
||||
After editing I restart the following services:
|
||||
|
||||
```bash
|
||||
sudo systemctl restart chronyd.service
|
||||
sudo systemctl restart NetworkManager-dispatcher.service
|
||||
```
|
||||
|
||||
And check the configured NTP servers via:
|
||||
And I check the configured NTP servers via:
|
||||
|
||||
```bash
|
||||
chronyc -N 'sources -a -v'
|
||||
|
|
|
@ -426,7 +426,7 @@ reboot
|
|||
|
||||
{{< callout type="info" >}}
|
||||
You may have to remove the installation media or change the boot sequence to
|
||||
boot from the storage device chosen in [Partitioning](#partitioning) step.
|
||||
boot from the storage device chosen in the [Partitioning](#partitioning) step.
|
||||
{{< /callout >}}
|
||||
|
||||
After the reboot I can login into the new system as root user and proceed with
|
||||
|
|
321
content/docs/computer/xfce-desktop.md
Normal file
321
content/docs/computer/xfce-desktop.md
Normal file
|
@ -0,0 +1,321 @@
|
|||
---
|
||||
title: 'Xfce desktop'
|
||||
date: 2024-05-19T16:20:19+02:00
|
||||
weight: 4
|
||||
prev: /docs/computer/basic-configuration
|
||||
next: /docs/computer/advanced-networking
|
||||
---
|
||||
|
||||
[Xfce](https://wiki.archlinux.org/title/Xfce) is a lightweight but full-featured
|
||||
Desktop Environment[^1] (DE) embodying the traditional UNIX philosophy[^2] of
|
||||
modularity and re-usability. Every component is packaged separately. For this
|
||||
reason, it is a perfect starting point to create a streamlined system of my own.
|
||||
|
||||
This guide describes the following tasks to install and setup Xfce:
|
||||
|
||||
1. Installing a [#Display server](#display-server)
|
||||
2. [#Display manager](#display-manager) setup for autologin
|
||||
3. Customizing the [#Desktop environment](#desktop-environment)
|
||||
4. Setting up a [#Screen lock](#screen-lock)
|
||||
5. [#File manager extensions](#file-manager-extensions)
|
||||
|
||||
{{< callout type="info" >}}
|
||||
Some of my instructions are specific to the hardware found in the laptop model
|
||||
[Dell Latitude](https://wiki.archlinux.org/title/Laptop/Dell#Latitude). If you
|
||||
use different desktop or laptop hardware, you should refer to the brand in the
|
||||
[Category:Laptops](https://wiki.archlinux.org/title/Category:Laptops) and also
|
||||
read the [kernel module](https://wiki.archlinux.org/title/Kernel_module) page
|
||||
to check for hardware support.
|
||||
{{< /callout >}}
|
||||
|
||||
## Display server
|
||||
|
||||
Although Wayland[^3] aims to become the successor of the X Window System[^4] and
|
||||
many technical differences between Wayland and X may lead to choose Wayland over
|
||||
[Xorg](https://wiki.archlinux.org/title/Xorg), the Xfce DE is not yet compatible
|
||||
with it (see [Wayland roadmap](https://wiki.xfce.org/releng/wayland_roadmap)).
|
||||
|
||||
I install the Xorg server and [xinit](https://wiki.archlinux.org/title/xinit).
|
||||
Additionally, I like to use xkill for killing desktop applications graphically.
|
||||
|
||||
```bash
|
||||
sudo pacman -Sy xorg-server xorg-xinit xorg-xkill
|
||||
```
|
||||
|
||||
I set a [German](https://wiki.archlinux.de/title/Arch_Linux_auf_Deutsch_stellen#Tastaturlayout_einstellen)
|
||||
keymap using the following commands:
|
||||
|
||||
```bash
|
||||
sudo localectl --no-convert set-keymap de-latin1-nodeadkeys
|
||||
sudo localectl --no-convert set-x11-keymap de pc105 deadgraveacute
|
||||
```
|
||||
|
||||
This will create a `/etc/X11/xorg.conf.d/00-keyboard.conf` file containing:
|
||||
|
||||
```{filename="/etc/X11/xorg.conf.d/00-keyboard.conf"}
|
||||
Section "InputClass"
|
||||
Identifier "system-keyboard"
|
||||
MatchIsKeyboard "on"
|
||||
Option "XkbLayout" "de"
|
||||
Option "XkbModel" "pc105"
|
||||
Option "XkbVariant" "deadgraveacute"
|
||||
EndSection
|
||||
```
|
||||
|
||||
Additionally, I append the following to line to the `/etc/environment` file to
|
||||
[globally](https://wiki.archlinux.org/title/Environment_variables#Globally) set
|
||||
the *LANG* variable using [PAM](https://wiki.archlinux.org/title/PAM):
|
||||
|
||||
```bash{filename="/etc/environment"}
|
||||
echo "LANG=de_DE.utf8" | sudo tee -a /etc/environment
|
||||
```
|
||||
|
||||
## Display manager
|
||||
|
||||
A lightweight and independent display manager that provides automatic login or
|
||||
*autologin* is [LightDM](https://wiki.archlinux.org/title/LightDM). I install
|
||||
the package [lightdm](https://archlinux.org/packages/?name=lightdm):
|
||||
|
||||
|
||||
```bash
|
||||
sudo pacman -Sy lightdm
|
||||
```
|
||||
|
||||
{{< callout type="warning" >}}
|
||||
Enabling autologin removes session authentication of the DE for convenience in
|
||||
a single-user scenario. This doesn't work for multi-user setups. The access is
|
||||
still secured by [disk encryption](../system-preparation/#encryption-and-lvm)
|
||||
setup in the system preparation guide and a [#Screen lock](#screen-lock) that
|
||||
is described later.
|
||||
{{< /callout >}}
|
||||
|
||||
I enable the autologin feature by editing the `/etc/lightdm/lightdm.conf` file:
|
||||
In the `[Seat:*]` section, I uncomment the following lines while providing the
|
||||
values `xfce` (DE) and `thisven` (user):
|
||||
|
||||
```{filename="/etc/lightdm/lightdm.conf"}
|
||||
#pam-service=lightdm
|
||||
#pam-autologin-service=lightdm-autologin
|
||||
#autologin-user-timeout=0
|
||||
#autologin-user=patient0
|
||||
#autologin-session=xfce
|
||||
```
|
||||
|
||||
I need to create a `autologin` group and add my username to it:
|
||||
|
||||
```bash
|
||||
sudo groupadd -r autologin
|
||||
sudo gpasswd -a patient0 autologin
|
||||
```
|
||||
|
||||
I [enable LightDM](https://wiki.archlinux.org/title/LightDM#Enabling_LightDM)'s
|
||||
Systemd service to use the configured Xfce autologin at boot:
|
||||
|
||||
```bash
|
||||
sudo systemctl enable lightdm.service
|
||||
```
|
||||
|
||||
## Desktop environment
|
||||
|
||||
For the [Xfce installation](https://wiki.archlinux.org/title/Xfce#Installation)
|
||||
I use the package group [xfce4](https://archlinux.org/groups/x86_64/xfce4/) and
|
||||
the [xfce4-goodies](https://archlinux.org/groups/x86_64/xfce4-goodies/) tools:
|
||||
|
||||
```bash
|
||||
sudo pacman -Sy xfce4 xfce4-goodies
|
||||
```
|
||||
|
||||
{{< callout type="warning" >}}
|
||||
Keep attention at a dialog asking to opt for a sound server. Choose the
|
||||
[pipewire-jack](https://archlinux.org/packages/?name=pipewire-jack) package to
|
||||
install [PipeWire](https://wiki.archlinux.org/title/PipeWire) with support for
|
||||
the JACK Audio Connection Kit (JACK) described in [pro audio](../pro-audio.md).
|
||||
{{< /callout >}}
|
||||
|
||||
Now it's time to reboot and automatically login into a Xfce session as
|
||||
configured in the previous section.
|
||||
|
||||
```bash
|
||||
sudo reboot
|
||||
```
|
||||
|
||||
### Xfce Terminal
|
||||
|
||||
To use the advantages of the DE after rebooting and entering Xfce I like to use
|
||||
a terminal emulator[^5] provided for any further command-line interaction. The
|
||||
[Xfce Terminal](https://docs.xfce.org/apps/xfce4-terminal/start) can be found in
|
||||
the applications menu or is invoked through the application finder (shortcut:
|
||||
`<Ctrl>+<F2>`) by using the command:
|
||||
|
||||
```
|
||||
xfce4-terminal
|
||||
```
|
||||
|
||||
### Whisker menu
|
||||
|
||||
I prefer the [Whisker menu](https://wiki.archlinux.org/title/Xfce#Whisker_menu)
|
||||
over the Applications Menu, as it provides a search bar. To activate it I open
|
||||
the [panel preferences](https://docs.xfce.org/xfce/xfce4-panel/preferences) and
|
||||
add it to a panel of my choice (per default this is most probably *Panel 1*) in
|
||||
the *Items* tab.
|
||||
|
||||
### Theming
|
||||
|
||||
To apply a built-in dark theme I open the Xfce settings and set *Adwaita dark*
|
||||
in the [Style](http://docs.xfce.org/xfce/xfce4-settings/appearance#style) tab
|
||||
and to use a window manager theme that is simple and slim I prefer *Totem*. It
|
||||
is configured in the [Style](http://docs.xfce.org/xfce/xfwm4/preferences#style)
|
||||
tab of the window manager preferences.
|
||||
|
||||
#### Icons
|
||||
|
||||
The [Papirus](https://github.com/PapirusDevelopmentTeam/papirus-icon-theme) icon
|
||||
theme provides some icon sets for dark and light themes. I install the package
|
||||
[papirus-icon-theme](https://archlinux.org/packages/?name=papirus-icon-theme):
|
||||
|
||||
```bash
|
||||
sudo pacman -Sy papirus-icon-theme
|
||||
```
|
||||
|
||||
In the [Icons](https://docs.xfce.org/xfce/xfce4-settings/appearance#icons) tab
|
||||
of the appearance settings I set *Papirus-Dark* to change the icons theme.
|
||||
|
||||
{{< callout type="info" >}}
|
||||
Close and re-open the settings manager window after the installation of icon
|
||||
themes, fonts, etc. to refresh item lists.
|
||||
{{< /callout >}}
|
||||
|
||||
#### Fonts
|
||||
|
||||
The [ttf-liberation](https://archlinux.org/packages/?name=ttf-liberation) fonts
|
||||
aim at metric compatibility with de facto standard but non-libre fonts such as
|
||||
Arial, Courier New, and Times New Roman as known from other operating systems to
|
||||
provide some basic interoperability. For improved readibility in terminals I use
|
||||
[ttf-inconsolata](https://archlinux.org/packages/?name=ttf-inconsolata). These
|
||||
libre font families are provided in TrueType[^6] format and installed via:
|
||||
|
||||
```bash
|
||||
sudo pacman -Sy ttf-dejavu ttf-inconsolata ttf-liberation
|
||||
```
|
||||
|
||||
I change the [fonts](https://docs.xfce.org/xfce/xfce4-settings/appearance#fonts)
|
||||
settings to use the *Liberation Sans Regular* with a font size of *13* as the
|
||||
Default Font and *Inconsolata Regular* with the same font size as the Default
|
||||
Monospace Font. Anti-aliasing may improve the smoothness of character edges,
|
||||
especially on TFT LCD[^7] displays. I use the hinting setting *Strong* and set
|
||||
the subpixel order to *RGB*.
|
||||
|
||||
{{< callout type="info" >}}
|
||||
Optimal hinting and subpixel order settings may depend on the fonts you use.
|
||||
The [font configuration](https://wiki.archlinux.org/title/Font_configuration)
|
||||
article in the ArchWiki supports in the investigation.
|
||||
{{< /callout >}}
|
||||
|
||||
### Undesired default applications
|
||||
|
||||
Afterwards I remove undesired Xfce applications and their dependencies, as I
|
||||
will install more appealing substitutes in the later guides:
|
||||
|
||||
```bash
|
||||
sudo pacman -Rss parole ristretto xfburn
|
||||
```
|
||||
|
||||
## Screen lock
|
||||
|
||||
To [lock the screen](https://wiki.archlinux.org/title/Xfce#Lock_the_screen) the
|
||||
[xfce4-screensaver](https://archlinux.org/packages/?name=xfce4-screensaver) has
|
||||
been already been installed as a dependency of the xfce4-goodies package and it
|
||||
does a sufficient job. Additionally, I can manually lock the screen with the
|
||||
shortcut `<Ctrl>+<Alt>+<l>` at any time.
|
||||
|
||||
To [block TTY access](https://wiki.archlinux.org/title/Xorg#Block_TTY_access)
|
||||
and prevent a user from killing the Xorg server I append the following lines to
|
||||
the `/etc/X11/xorg.conf` file, which has been automatically created during the
|
||||
Xorg installation in the [#Display server](#display-server) section:
|
||||
|
||||
```{filename="/etc/X11/xorg.conf"}
|
||||
Section "ServerFlags"
|
||||
Option "DontVTSwitch" "True"
|
||||
Option "DontZap" "True"
|
||||
EndSection
|
||||
```
|
||||
|
||||
## File manager extensions
|
||||
|
||||
[Thunar](https://wiki.archlinux.org/title/Thunar) is a fast and easy-to-use file
|
||||
manager in Xfce. Its clean interface may appear to lack some funcionanlity, but
|
||||
this is an intended design decision as it allows to add more extensions through
|
||||
[plugins and addons](https://wiki.archlinux.org/title/Thunar#Plugins_and_addons).
|
||||
|
||||
### Volume management
|
||||
|
||||
The first plugin I want to add is the Thunar Volume Manager to mount and unmount
|
||||
[removeable media](https://en.wikipedia.org/wiki/Removable_media). I Install the
|
||||
[thunar-volman](https://archlinux.org/packages/?name=thunar-volman) package, the
|
||||
[gvfs](https://archlinux.org/packages/?name=gvfs) package for the Gnome Virtual
|
||||
File System (GVFS) and [udiskie](https://archlinux.org/packages/?name=udiskies)
|
||||
to manage disks greater than 1 TB:
|
||||
|
||||
```bash
|
||||
sudo pacman -Sy thunar-volman gvfs udiskie
|
||||
```
|
||||
|
||||
In the [Application autostart](https://docs.xfce.org/xfce/xfce4-session/preferences#application_autostart) tab of *Session and Startup* inside *Preferences* I add an entry for the command
|
||||
`thunar --daemon` to configure Thunar for starting in daemon mode. Another entry
|
||||
contains the command `udiskie -2 &` to allow the automounting of large external
|
||||
drives.
|
||||
|
||||
### Archives
|
||||
|
||||
I install the [xarchiver](https://archlinux.org/packages/?name=xarchiver) and
|
||||
[thunar-archive-plugin](https://archlinux.org/packages/?name=thunar-archive-plugin)
|
||||
packages to do [archive management](https://docs.xfce.org/xfce/thunar/archive)
|
||||
within Thunar:
|
||||
|
||||
```bash
|
||||
sudo pacman -Sy thunar-archive-plugin xarchiver
|
||||
```
|
||||
|
||||
The command line tools for the popular non-free archive formats *7zip*, *RAR*,
|
||||
and *ZIP* extent xarchiver's compatibility:
|
||||
|
||||
|
||||
```bash
|
||||
sudo pacman -S p7zip unzip unrar zip
|
||||
```
|
||||
|
||||
### Network shares
|
||||
|
||||
Thunar can browse remote locations out-of-the-box using GVFS by opening an URI
|
||||
scheme, such as `davs://` and `sftp://`, with `<Ctrl>+<l>`. However, I have to
|
||||
install the packages [gvfs-smb](https://archlinux.org/packages/?name=gvfs-smb)
|
||||
and [sshfs](https://archlinux.org/packages/?name=sshfs) to access `smb://` and
|
||||
`ssh://` locations. For [NFS](https://wiki.archlinux.org/title/NFS) there is no
|
||||
URI scheme, but mounting it using the `/etc/fstab` file is provided by Thunar.
|
||||
|
||||
## Known bugs
|
||||
|
||||
Sometimes the background image or color is missing and the right click menu
|
||||
doesn't appear. This is fixed by running `xfdesktop` in a terminal as described
|
||||
on [Fosslicious](https://www.fosslicious.com/2019/09/fix-xfce-desktop-error-cant-right-click.html):
|
||||
|
||||
```bash
|
||||
xfdesktop &
|
||||
```
|
||||
|
||||
In the next [advanced networking](../advanced-networking) guide, I show how to
|
||||
secure and tweak the default network configuration.
|
||||
|
||||
[^1]: [Desktop Environment](https://wiki.archlinux.org/title/Desktop_environment)
|
||||
in the ArchWiki
|
||||
[^2]: [UNIX philosophy](https://en.wikipedia.org/wiki/UNIX_philosophy) in the
|
||||
Wikipedia
|
||||
[^3]: [Wayland](https://wiki.archlinux.org/title/Wayland) in the ArchWiki
|
||||
[^4]: [X Window System](https://wiki.archlinux.org/title/X_Window_System) in the
|
||||
ArchWiki
|
||||
[^5]: [Terminal emulator](https://en.wikipedia.org/wiki/Terminal_emulator) in
|
||||
the Wikipedia
|
||||
[^6]: [TrueType](https://en.wikipedia.org/wiki/TrueType) in the Wikipedia
|
||||
[^7]: [TFT LCD](https://en.wikipedia.org/wiki/Thin-film-transistor_liquid-crystal_display)
|
||||
in the Wikipedia
|
||||
[^8]: [Ethernet](https://en.wikipedia.org/wiki/Ethernet) in the Wikipedia
|
Loading…
Reference in a new issue