Archlinux Post Install with minimal plasma
Introduction
This is the continuation of the Arch Linux installation’s part one. In the part one, we’ve installed Arch with as less afford as possible. In this part we’ll install from desktop environment to our GRUB setup with BTRFS snapshots integration and a lot of possibilities! In case you haven’t checked part one yet, it’s recommended if you want to install to Arch from scratch,
Prerequisite
If you’ve followed my part one, you are probably in a black background with white bash prompt. Feel free to login with your username, ‘root’ and your root account’s password. Now let’s check our system a bit,
Intenet
Check your internet connection with ping,
|
|
Tip: Ctrl + c to stop a process
And it should work out of the box for Ethernet. But you have to manually setup if you are using wireless connections. If you encounter any problem, check NetworkManager
’s status with,
|
|
If it’s disabled, you can enable and start with, systemctl enable
and systemctl start
command or just rebooting your system.
For Wi-Fi connection, you can use
nmcli
, a command line tool for network manager. For guidance, check,
Boot time
Try, systemd-analyze
to print your boot time. If your boot time is less than 15 seconds, you can check Arch wiki for performance guideline.
With an old HDD, my boot time was around 11 seconds.
User Management
To learn deeply about user management’s I would recommend you to read the arch wiki. For now, I’ll create a user with root privileges so that I don’t have to stay in root. Later after installing KDE plasma desktop, I can mange users in the system setting, so, for now let’s create a user.
|
|
Here,
-m
to create a home directory. And if it exists then it won’t be overwritten. And the-G
flag is to set a group. Herewheel
group users can actually runsudo
commands. And finallyarch
is my username.
Now, let’s set a password for our new user, arch
,
|
|
Now we’ve to give access to wheel group users to actually able to run sudo
commands, to do so, edit a file with the following command,
|
|
Here, nano is the text editors name. Feel free to use your favorite text editor.
Then, I’ll un-comment the line (removing #
from a line),
|
|
In
nano
text editor you can usectrl + w
to search. Then press,ctrl + o
to save, followed by anenter
and thenctrl + x
to exit.
Minimal Plasma
Now in this post, I’ll be installing minimal KDE plasma desktop environment without any bloat or any extra packages! So that if you need further packages or services like bluetooth or printer support, you can do it later. And of course, instead of plasma, you can try anything else like, gnome, xfce or maybe a window manager!
To install minimal plasma, try,
|
|
Now, it’ll give you several choices. You can go with the default values. For font you can choose, noto-sans
and as a back-end for media thumbnail in the file manager, you can try vlc
as it’s recommended by upstream developers.
Plasma Essential
Besides a browser, for convenience we’ll install our favorite file manager and terminal utilities. And if you’re going for plasma we’ll also try some plasma integrations like, network manager support and kde plasmoids.
Let’s let it install and let me describe what they are,
|
|
And here’s a short description,
Application name | Application’s description |
---|---|
firefox | A FOSS browser, which is favorite to a lot of linux users and you can also customize it with CSS. But of course you can also use anything else that you prefer. |
plasma-nm | Network manager integration with plasma. With this you can easily configure network with your plasma desktop. |
plasma-pa | Plasma applet for audio volume management using PulseAudio |
dolphin | A file manger for plasma. It’s really recommended because of it’s availability, user interface and a lot of features out of the box. |
konsole | A terminal app for plasma. It’s highly configurable through GUI and easy to integrate with plasma. |
kdeplasma-addons | [OPTIONAL] Extra addons like color picker and monitor. |
kde-gtk-config | It’ll allow you to customize gtk apps through kde’s setting and recommended to install. |
kscreen | It does the job behind desktop and monitor configuration setting. Without it, monitor setting can be missing from the system settings. |
More
plasma-essentials
are listed on, plasma extras section. Because plasma application needs to be installed with optional dependencies for extended features!
SDDM
For plasma’s login manager we’ll use SDDM, as you can integrate it with plasma’s setting. If you want you can also try lightdm or anything you like. To install SDDM, try,
|
|
sddm-kcm
is only recommended when you’re installing plasma. It’ll integrate your sddm with kde’s setting. So you can customize your sddm right from kde plasma’s setting.
And the enable it’s service with,
|
|
And finally, start it with,
|
|
Now you’ll be greeted with a default login window. Feel free to login with your created user.
Drivers
Firmware Security
For firmware security, try fwupd
to update your firmware. It’s a daemon to manage firmware updates. And it’s recommended to install it. To install it, try,
|
|
Package management
Pacman
Arch linux use pacman
to mange it’s packages. It’s really good and fast. You can learn about it with more details in the archwiki.
And for quick reference, you can check my handy reference,
And for configuration, you can set mirror just like you did in the arch installation process (part one),
Reflector
With reflector you can easily set a mirror. To do that, first let’s make sure our package list is with sync with server by,
|
|
then, let’s install reflector,
|
|
then, you can use reflector to generate a mirrolist. Here’s an example,
My country is Bangladesh so I can display my available local mirrors in this way,
1
reflector -c BD
and, I can save this list to my mirrorlist in this way,
1
reflector -c BD --save /etc/pacman.d/mirrorlist
And in case you want to get the latest 20 mirrors, sorted by speed, you can also do this,
1
reflector --latest 20 --sort rate --save /etc/pacman.d/mirrorlist
Manually mirror setup
We can use a text editor to edit the mirrorlist and set our desired mirrors also. To do that, you can use nano or vim text editor or install any CLI-based text editor if you need. And there’s an online arch mirror list generator,
Simply edit the mirrorlist
file, like,
|
|
Colored pacman
And another thing, you can actually make pacman’s output colored! To do so, just edit the /etc/pacman.conf
file and un-comment the line Color
(removing #
from a line),
|
|
Multilib
Multilib is a repository that contains 32-bit software for 64-bit systems. If you’re using a 64-bit system then you might want to enable it. To do so, just edit the /etc/pacman.conf
file and un-comment the lines,
|
|
Parralel download
You can also enable parallel download in pacman. To do so, just edit the /etc/pacman.conf
file and un-comment the line ParallelDownloads
(removing #
from a line),
|
|
Bit of ASCII art
And if you’re a fan of ASCII art then you can enable it in pacman. To do so, just edit the /etc/pacman.conf
file and add the line ILoveCandy
,
|
|
Where to put it? I just put it after
color
due to simillarity.
Yay
Yay is mainly an AUR helper, that can install AUR packages automatically. And you can install it from chaotic-aur
or aur
. If you’re downloading from aur
, then perhaps you can go with yay-bin
which is a binary of yay. So you don’t have to wait for it to finish installation.
If you’ve installed chaotic-aur
, then install yay with,
|
|
Or, if you wish to install from AUR, try in this way,
|
|
Pamac
Pamac is a graphical installer for pacman with AUR support. And it can help you to install dependency packages much more easily. With sorting you can also list you orphaned packages or other packages into different categories. So if you wish to use pamac, you can install it from chaotic AUR, or from AUR.
If you’ve yay installed, then you can use it now in this way,
|
|
Shell
Bash and zsh
By default your shell is bash
. And you can enhance your possibilities with an another shell like zsh
or fish
. You can also do a lot with your .bashrc
file. If you’re looking for a nice beautiful zsh
shell with useful plugins like, auto coloring, auto completion then I’ve a separate tutorial for you.
Autostart
To autostart something, for example fastfetch
(a neofetch
alternative), or something funny like cowsay
or fortune
or pokemon-colorscripts
, you can add it in your ~/.bashrc
or ~/.zshrc
file. Just open the file with a text editor and add the command at the end of the file. For example, for fastfetch
,
|
|
Or, pokemon-colorscripts? It’s pokemon-colorscripts -r
to get a random pokemon 🙃.
Libnotify
You can use libnotify
to get notifications from your terminal. It’s really useful when you’re running a long process and you want to get notified when it’s done. To install it, you can use pacman,
|
|
Timeshift
Now you may want to take snapshots, right? Let’s install timeshift
. If you’re installing from AUR then perhaps the binary version?
timeshift-autosnap
timeshift-autosnap
package will trigger timeshift to take a snap everytime when pacman upgrades your system. Just install it! Available in both chaotic AUR or AUR.
To configure it, use /etc/timeshift-autosnap.conf
. But default configuration should be enough! You can test it with,
|
|
GRUB
grub-btrfs
It’ll add btrfs snapshots in your GRUB boot options. To use, install grub-btrfs
. And regenerate the grub.cfg
with,
|
|
GRUB timeout
Every time you start your system GRUB shows up and waits 5 seconds for you, right? You can actually remove it. And grub will be shown if and only if you hold shift
key while starting. In order to achieve the fastest possible boot, instead of having GRUB wait for a timeout, it is possible for GRUB to hide the menu, unless the Shift
key is held down during GRUB’s start-up.
In order to achieve this, you should add the following line to /etc/default/grub
:
|
|
Then create the file /etc/grub.d/31_hold_shift
with,
|
|
Then, open the file with,
|
|
and paste following codes, source
|
|
then make it executable,
|
|
And finally regenerate the grub configuration with,
|
|
Note: This setup uses keystatus to detect keypress event so it may not work on some machines.
Info screen after grub
When you system starts first comes grub, and then? Something like, stating linux-zen-…., right? And do you remember when you were installing arch, while booting you say some green and white combination type progress like interface. You can actually toggle them. You have to remove a kernel parameter, called quiet
.
To edit kernel parameters, edit /etc/default/grub
.
And regenerate the grub.cfg
with,
|
|
Detecting other OS
Probing for other operating systems is disabled for security reasons. If still want to enable this functionality install os-prober
and uncomment to detect and include other operating systems.
Edit /etc/default/grub
(grub config file)
|
|
And finally regenerate the grub.cfg
with,
|
|
Extra partitions
Besides we’ll have to mount our extra disk partitions as well and for that purpose we’ll add NTFS support. So install ntfs-3g
. And now you can mount ntfs partitions with sudo mount
but it’s not an idea solution. To make changes permanently you’ve to edit fstab
.
swap partition
Our swap partition should work out of the box if you’ve followed my part one of this arch install post. To verify, run, swapon
or, free -h
.
If you need swap file or, maybe an another swap partition or you didn’t follow my guide, check this guide from manjaro. It’s good to follow,
Also check out the systemd-swap
, it’s even better choice, I think instead of tradition swap, if you want.
Other partitions
If you want you can easily set other partitions to mount by default with the help of partitionmanager
or gnome-disk-utility
and it’s recommend to avoid errors. You can also edit fstab
manually.
KDE partition manager
It’s recommended to use /mnt
directory. If you want you can create a sub directory inside first with,
|
|
Later launch kde partition manager, select your partition. From the right click menu, select Edit mount point
and select the path /mnt/data
. Finally click ok and you can reboot your session to check changes.
Gnome Disk Utility
The same as kde partition manager but you don’t have to create the directory manually.
Editing fstab
You can manually set by editing, /etc/fstab
and create an entry. To find the UUID try,
|
|
To learn more, try arch wiki,
Here’s a sample /etc/fstab
for ntfs
drive with path. Don’t forget to make the directly first (/mnt/DATA) first!
|
|
Performance
Swap
Swap refers to the space in SSD/ HDD, which will be be used as RAM (random access), to decrease the load of your RAM. In easier words, it’s necessary when you think your RAM may run out. A good gudie is available on the Arch wiki, as well as manjaro wiki.
zram and zwap
With zram generator you can easily generate zram and you can definitely try if you’ve a bigger ram. With zram your swap won’t be used and it’s definitely a bad idea to enable both zram and zswap. And zswap
is enabled by default for most cases so you don’t need to modify anything. To make sure zram is enabled, you can try,
|
|
You may see somehing like, [ 0.357361] zswap: loaded using pool lz4/z3fold
if your zwap is running.
nohang
A low ram handler. First install nohang
from AUR or chaotic AUR. It can prevent OOM(Out of Memory). Learn more here.
Start and enable nohang.service
or nohang-desktop.service
after installing,
|
|
nohang-desktop
provides notification when you’re almost out of memory.
TRIM for SSD
If you are using SSD, you might want to turn on TRIM for your SSD health. Read more here,
To verify TRIM support, run:
|
|
And check the values of DISC-GRAN (discard granularity) and DISC-MAX (discard max bytes) columns. Non-zero values indicate TRIM support.
For SATA SSDs only, the hdparm package can detect TRIM support via hdparm -I /dev/sda | grep TRIM
as the root user. hdparm
does however not support NVMe SSDs.
To enable periodic TRIM, you might like to try the following service,
|
|
It’s not applicable for every single SSD out there. Please execute with caution.
Configuration
Hosts
You can edit host files to do more than just redirecting your localhost
. Like, ad-blocking, adult sites blocking and even more! Here’s a good collection of hosts and it’s regularly updated,
In the repository you’ll find a file named, host
, or just follow this link, and edit your /etc/hosts
file and enter those texts. And then, just run,
|
|
For convenience you can use kate text editor as it can edit system text files.
Arch Mate
To make things more easy, I’ve a python script for you. With the support of that script, you can automate chaotic AUR installation, pacman packages inspection, installing essential packages etc. Here’s the repository,
If you know python and want to contribute, feel free to send merge request or, contact with me!
Essential packages
Plasma extras
-
As for your convenience you can try some powerful applications from KDE plasma! First of all, you can try
plasma-firewall
alongside a back-end (ufw
orfirewalld
). -
Then to manage archives, you can try
ark
. It’s pretty much strong. But you may also have to install some optional dependencies as well to make it more strong. For example, to know what to install, head over to arch packages website, ark (x86_64)
You can install it with,
|
|
Now on the same page, scroll down a bit, you’ll notice,
- arj (optional) - ARJ format support
- lrzip (optional) - LRZ format support
- lzop (optional) - LZO format support
- p7zip (optional) - 7Z format support
- unarchiver (optional) - RAR format support
- unrar (optional) - RAR decompression support
- extra-cmake-modules (make)
- kdoctools (make)
We can avoid, (make) cause we are not building this! We just want to enhance it with more formats support. We can install those normally with pacman -S
but later if you uninstall ark
, these optional dependencies will be little hard to find. So here’s what we will do, we can install those as dependencies, with the following command,
|
|
FLAGS
–asdeps = as dependency.
– needed = it won’t reinstall if already exists in system.
-
In the same way, let’s install
gwenview
with optional dependencies as our image viewer. And it can even supportPSD
with optional dependency! Here you can installqt5-imageformats
andkimageformats
as optional. -
For text editing you can
kate
. You can use it simply or can enhance it with plugins. To enable LSP-server and markdown support, install it with full optional dependency. -
Now if you’re thinking about power management, you can install
powerdevil
. With it you can mange your power settings right from your setting in plasma. -
plasma-systemmonitor
, a nice looking system monitor that you may want to try. You can also avoid it if you’re happy withhtop
or anything else -
And finally for taking screenshots, we’ve
spectacle
. It has annotation support, and also it can integrate with your system perfectly if you’re using KDE plasma! -
Use
kinfocenter
to get detailed information about your system. It’s a great tool to know about your system.
Upstream KDE has package and setup recommendations to get a fully-featured Plasma session. Check this out for optional features!
Recommendations
Now it’s time to install your favorite packages, I guess. For the list of essential and well-refined packages for your system I’ve a list for you. Check,
Plasma Specials
Spell check
Make sure sonnet
is installed with hunspell
or anything similar. And also don’t forget to install a language pack for hunspell
.
If you install LibreOffice it’ll be done automatically and I’ve a guide for you, check,
KDE Wallet Manager
You may find kde wallet whenever you connect your WiFi, or open your browser, asking for passwords. Instead of disabling it, you can actually use empty string as password. And then it won’t ask for password anymore. Use kwalletmanager
to set it up.
KDE Connect
You can install kdeconnect
to connect your phone with your system. It’s a great tool to manage your phone from your system. You can also use it to share files, notifications, and even to control your system with your phone!
Fonts
To enhance performance for terminal and other places you might want to Install noto-fonts
, especially for emoji-picker
, noto-fonts-emoji
.
There are some issues like, emojies doesn’t work in the notification. To fix, edit the /home/sharafat/.config/fontconfig/fonts.conf
and use the following lines,
|
|
If above file doesn’t exist, create one!
Microsoft fonts
You can install ttf-ms-fonts
to get Microsoft fonts. It’s a good choice if you’re working with Microsoft Office files. This package is available in AUR or chaotic AUR.
Laptop Battery Saving
Try power-profiles-daemon
for power profiles support for powerdevil
. It’s a great tool to manage your power settings.
Acknowledgements
For helping me to collect more information and revising, special thanks to,