Posts Arch Linux GUI Setup
Post
Cancel

Arch Linux GUI Setup

The previous Arch Linux post looked at setting up a bare-bones headless system with BTRFS and an encrypted drive. This post will look at setting up the front-end and making your system more suitable as a daily driver. There are several desktop environments that can be chosen, but here I have focused on simplicity and minimalism so it should be suitable for older systems.

Setting up the GUI

Desktop Environment Installation and Customisation

  • For the desktop manager, I really like the simplicity behind Xfce4. It is customisable, easy to configure, lightweight and powerful (even though some of the folks at Late Night Linux make fun of it for being overly simplistic). I install it along with some goodies for a more full desktop experience.

    1
    
      sudo pacman -S xfce4 xfce4-goodies
    

Alt Text

  • The default view is not so attractive but this can be easily changed. You can download some cool themes from here. For instance you can download the Dracula tar file and extract it in the .themes folder of your home directory. You can then choose this theme in the Style tab of the Appearance settings manager.

  • You can do this also for icons and fonts from the same website. However, I am pretty happy with the defaults.

  • For the panel configuration, I like to remove the 2nd panel and adjust the 1st one to have the following:

    • Show only icons for the windows to save on space
    • Change the menu to only show the xfce4 icon
    • Configure the panel size to be larger.

I’ll share the config files for this here

  • And of course everyone’s favourite customisation, changing to a cool background. I like the minimalistic ones found here.

  • Keyboard shortcuts! The shortcuts that I like to use are:

    • Fill window to the left or right (Super + Right Arrow (or Left Arrow))
    • Maximise window (Super + Up Arrow)
    • Launch file manager (Super + e)
    • Launch terminal (Ctrl + Alt + t)
    • Move window to left/right workspace (Ctrl + Shift + Alt + Right Arrow (or Left Arrow))

Display Manager Installation and Customisation

  • For the Display Manager, I use LightDM (https://wiki.archlinux.org/title/LightDM). You also need to install a greeter to enable user login. I also install the lightdm-gtk-greeter-settings to easily configure the greeter with a GUI.

    1
    
      sudo pacman -S lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings
    
  • Any customisation can be done with lightdm-gtk-greeter-settings.

App Launcher

  • For an efficient workflow, an app launcher that can be used to search and quick launchly a desired application is crucial. I wrote a previous post about using Rofi which is an absolutely excellent application. However, I am trying out a new app launcher called Ulauncher which looks very slick. To set it up:

    1
    2
    3
    
      git clone https://aur.archlinux.org/ulauncher.git
      cd ulauncher
      makepkg -is 
    
  • Any hot key can be configured to launch Ulauncher. I typically like using the Super key which is used as a modifier key for other shortcuts as well. In a similar manner to a Rofi setup, you can use xcape to set a single press use for the Super key using something like:

    1
    
      xcape -e 'Super_L=Shift_L|Control_L|Super_L'
    

    Then you can configure the hot key above to be used to launch Ulauncher. Just make sure to add the line above to ~/.xprofile so that xcape is configured everytime you log on.

YAY and other tools

  • Some other important tools that I find useful should be installed such as:

    1
    
      sudo pacman -S git openssh redshift code firefox xclip file-roller gedit base-devel
    
  • YAY (Yet Another Yaourt) is a package manager useful for install packages from the AUR. This can be configured with

    1
    2
    3
    
      git clone https://aur.archlinux.org/yay.git
      cd yay
      makepkg -si
    
  • Redshift to make the screen easier on the eyes. I don’t bother with the geolocation and just set it to have a permanent redshift by adding the following to .xprofile

    1
    
      redshift -P -O 3500
    

Sound and Bluetooth

  • Configure Audio. Using pulse-audio and pavu control as the front-end. Xfce4 also has a plugin for pulse audio that can be installed.

    1
    
      sudo pacman -S pulseaudio pavucontrol
    
  • Configure bluetooth with bluez and bluez-utils. You also need to install the pulseaudio-bluetooth package to enable audio to work over bluetooth. Bluetooth can then be configured with bluetoothctl.

    1
    2
    
      sudo pacman -S bluez bluez-utils pulseaudio-bluetooth
      sudo systemctl enable bluetooth
    
  • Pipewire is the latest and greatest multimedia framework in Linux. If you want to give it a try for audio, you can install pipewire-pulse which replaces the pulseaudio and pulseaudio-bluetooth packages.

    1
    2
    
      sudo pacman -S pipewire-pulse
      systemctl start --user pipewire-pulse.service
    

    You should be able to see what is being used with pactl info. The Server Name should specify that it is running on Pipewire.

Timeshift (or Snapper)

  • One of the good things about using BTRFS is that you can do automatic snapshots with Timeshift. You can install it from the AUR with

    1
    
      yay -S timeshift
    
  • Timeshfit comes with a nice GUI where you can configure the type and frequency of your snapshots. By default it will create snapshots under the timeshift-btrfs subvolumes. I believe that in order to set it up, your root and home subvolumes need to be named as @ and @home respectively.

  • If you want to delete any snapshots outside of the GUI, then its handy to have the following commands (list is first to see what subvolumes you have):

    1
    2
    3
    
      sudo btrfs subvol list /
      sudo mount /dev/mapper/cryptroot -o subvol=/
      sudo btrfs subvol delete [PATH_TO_SUBVOL]
    
  • It’s also possible to perform this functionality with snapper. I’m not such a big fan of it as I found it inflexible and difficult to use. However, if you want to give it a shot, feel free to try with the following commands:

    1
    
      sudo pacman -S snapper
    
  • To create a config for automatic snapshots of your root system, you can do
    1
    
       snapper -c root create-config /
    
  • To create a custom snapshot:
    1
    
      snapper -c root create --description test_snapshot
    
  • All configs are available in /etc/snapper/configs/. They can be modified to adjust the snapshot frequency.

  • If you don’t have a cron daemon running already, then you can use their own systemd units:

    1
    2
    
      systemctl enable snapper-timeline.timer
      systemctl enable snapper-cleanup.timer
    

Grub Configuration

  • In order to detect different operating systems you might have on your device, you will need os-prober. Then you need to mount these drives onto your system before reconfiguring grub.
    1
    2
    3
    
      sudo pacman -S os-prober
      sudo mount /dev/sdx /mnt
      grub-mkconfig -o /boot/grub/grub.cfg
    

    You may need to add the following entry to /etc/default/grub

    1
    
      GRUB_DISABLE_OS_PROBER=false
    
  • To make changes to grub, I like using the front-end grub-customizer
    1
    
      sudo pacman -S grub-customizer
    
  • Also I remove the quiet argument from the kernel parameters in GRUB so that I can see the messages during bootup.

  • Cool Grub themes can be used to make it nicer like here.

  • If you want to have the ability to load your previous BTRFS snapshots from the GRUB menu then grub-btrfs is a thing.

    1
    2
    
      sudo pacman -S grub-btrfs
      grub-mkconfig -o /boot/grub/grub.cfg
    

    To enable automatic updating of grub for latest snapshots, you then need to enable grub-btrfs.path as documented here.

    1
    
      systemctl enable grub-btrfs.path
    

Python Code Development

  • I use quite a lot of Python in my work and free time so I install pyenv to configure different python versions on my system and poetry for package management. Let’s start off by install pyenv and installing Python 3.8.0.

    1
    2
    
      sudo pacman -S pyenv
      pyenv install 3.8.0
    
  • You then need to configure ~/.bashrc to setup pyenv everytime you access the terminal. You add the following 3 lines to it:

    1
    2
    3
    
      export PYENV_ROOT="$HOME/.pyenv"
      export PATH="$PYENV_ROOT/bin:$PATH"
      eval "$(pyenv init --path)"
    
  • Normally, I don’t want to use my system’s Python version so I set it up to run 3.8.0 by default

    1
    
      pyenv global 3.8.0
    
  • Next up is poetry. There is an install script that is handy to use.

    1
    
      curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
    
  • Make sure that the path to the poetry binaries are specified in your ~/.bashrc file

    1
    
      export PATH="$HOME/.poetry/bin:$PATH"
    
  • To start up a fresh project you can do simply poetry new [TEST-PROJECT-NAME] or you can make use of an existing .toml file with poetry install.

Next Steps and Follow Up

  • It’s good to start using a Wayland compositor since that is very much the future of Linux computing (many desktop enviroments have a Wayland implementation like KDE and Gnome). I stuggle however to find something analgous to XFCE4 but I will be doing some more research on my end.
  • Other tools and configurations. This isn’t a complete set-up guide but it should be good enough as a functional bare-bones implementation of a daily-driver.