Arch Linux

Here is my recipe for installing Arch Linux.

Arch Linux Logo My favourite distribution of Linux is Arch Linux. The reason? It lets you choose exactly what components you'd like to install - nothing more. Unlike pre-packaged distros like Ubuntu, Arch doesn't come with an office suite, a graphics editor, various games, tons of GUI tools, etc. Oh, you can install all of these things. As a matter of fact, you can make Arch look and behave exactly like Ubuntu, or any other distro. But that's not what I'm into.

When I install Arch, I either run Tom's Window Manager (TWM) which was one of the original window managers for Unix, or I run XFCE4 which is a nice, lightweight but modern window manager. I tend to install Arch often - recently I re-did my laptop after buying a bigger hard drive, or into a virtual machine for testing purposes. Here is the guide I use to install Arch:

Installation Notes

# iwctl                                ;when using wifi instead of LAN
[iwd]# device list                     ;make note of your device ie: wlan0
[iwd]# station {device} connect {SSID}
# ping archlinux.org                   ;ensure you have Internet!
# lsblk                                ;list devices
# fdisk /dev/sdx                       ;partition drive
Command: g                             ;create GPT table - clears drive
Command: n, 1, enter, +512M            ;partition 1 for EFI
Command: t, 1, 1                       ;set partition 1 type = 1 (EFI Boot)
Command: n, 2, enter, +1024M           ;partition 2 for Swap
Command: t, 2, 19                      ;set partition 1 type = 19 (swap)
Command: n, 3, enter, enter            ;partition 3 for Linux System
                                       ;by default, partition type = system
Command: p                             ;display partition table - double check!
Command: w                             ;write changes and exit app
# mkfs.fat -F32 /dev/sdxX              ;format EFI boot partition
# mkfs.ext4 /dev/sdxY                  ;format primary partition
# mkswap /dev/sdxZ
# swapon /dev/sdxZ
# mount /dev/sdxY /mnt
# pacman -Syy
# reflector -c "Canada" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist
# pacstrap -K /mnt base base-devel bash-completion linux linux-firmware vim vi rfkill networkmanager
Other Packages To Consider:
intel-ucode         ;if running an Intel processor
amd-uccode          ;if running an AMD processor
os-prober ntfs-3g   ;if dual booting with Windows
# genfstab -U /mnt >> /mnt/etc/fstab
# arch-chroot /mnt
# vi /etc/locale.gen                   ;uncomment en_US.UTF-8 UTF-8
# locale-gen
# echo LANG=en_US.UTF-8 > /etc/locale.conf
# ln -sf /usr/share/zoneinfo/{Zone}/{SubZone} /etc/localtime
# hwclock --systohc --utc
# echo {hostname} > /etc/hostname   ;replace {hostname} with your preference
# vi /etc/hosts                        ;insert lines listed below:
127.0.0.1   localhost
::1         localhost
127.0.1.1   {hostname}
# systemctl enable NetworkManager.service    ; if required
# passwd
# pacman -S grub efibootmgr
# mkdir /boot/efi
# mount /dev/sdxX /boot/efi
# grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi
# grub-mkconfig -o /boot/grub/grub.cfg
# vi /etc/pacman.conf                  ;uncomment Color and multilib repository!
# useradd -m -G wheel -s /bin/bash rick
# passwd rick
# visudo                               ;uncomment 'wheel' group line!
# exit
# reboot

Once rebooted, install nice things. Run all these commands with:

sudo pacman -S {package}

first, update repositories:
sudo pacman -Sy

PACKAGES:
---------

For Tom's Window Manager (TWM) or other X11 desktop:

xorg
xorg-server
xorg-apps
xorg-xinit
xterm
xorg-fonts-100dpi
xorg-fonts-75dpi
xorg-twm

For modern desktops like GNOME and KDE using Wayland:

plasma-meta                            ;KDE desktop
kde-applications-meta                  ;KDE applications
                                       ;install xdg-desktop-portal-gtk to have 
                                       ;gnome apps look proper in KDE

gnome                                  ;GNOME desktop
gnome-extra                            ;GNOME applications
gnome-shell-extension-dash-to-dock     ;install via yay (AUR)
gnome-shell-extension-weather-oclock   ;puts weather in top bar beside clock
gnome-browser-connector                ;for installing extensions from https://extensions.gnome.org/
adw-gtk3                               ;for dark and light themes

LOGIN SERVICE:
---------------
sudo systemctl enable sddm             ;enables KDE login
sudo systemctl enable gdm              ;enables GNOME login

VIRTUALBOX GUEST:
-----------------
pacman -S virtualbox-guest-utils
vi ~/.xinitrc                          ;add /usr/bin/VBoxClient-all

OTHER PACKAGES:
---------------
yay                                    ;aur + pacman wrapper
stellarium                             ;night sky simulator
stella                                 ;Atari 2600 emulator
gimp                                   ;image manipulation
firefox                                ;web browser
vlc                                    ;multimedia player
libreoffice                            ;office suite
clamav                                 ;antivirus
jre-openjdk                            ;java runtime
virtualbox                             ;virtualization
                                       ;gpasswd -a {user} vboxusers
                                        
FLATPAKS:
Firefox                                ;web browser 
Thunderbird                            ;email app [X5c$uTJHQeMt%Q!72TiN!] 
LibreOffice                            ;office suite 
GIMP                                   ;image manipulation 
Folio                                  ;similar to OneNote 
Spotify                                ;music streaming 
Signal                                 ;secure instant messaging 
Pinta                                  ;snagit style editor 
Warehouse                              ;examine Flatpak details

Entangle                               ;astrophotography 
Discord                                ;more instant messaging 
Stellarium                             ;planetarium software 
UltiMaker Cura                         ;3D slicer 
Qbittorrent                            ;torrent client 
FreeCAD                                ;CAD software 
Pika Backup                            ;backup utility

ProtonVPN                              ;VPN software 
Proton Mail Bridge                     ;email utility 
NoMachine                              ;use Enterprise Client

VS Code 
Microsoft Edge 
Microsoft Teams for Linux

FLATPAK COMMAND LINE USAGE: 
$ flatpak install {name of app} 
$ flatpak update {app} 
$ flatpak uninstall {app} 
$ flatpak list (list installed apps) 
$ flatpak info {app} 
$ flatpak search {app} 
$ flatpak run {app}

FLATPAK NOTE: flatpaks are installed into: ~/.var/app /var/lib/flatpak

HP printing
-----------
cups                                   ;systemctl enable cups
                                       ;systemctl start cups
brother-hl3180cdw                      ;AUR package for Brother HL-3180 CDW printer
                                       ;also ensure Avahi is set up properly (see below)

UPDATES:
--------
sudo pacman -Syu
or
yay

DELL LATITUDE 3540 AUDIO: 
sudo pacman -S sof-firmware sof-tools

LOCAL NETWORKING (.local DNS resolution): 
verify that avahi is installed (likely is - part of gnome install?) 
pacman -S nss-mdns 
systemctl enable avahi-daemon.service 
systemctl start avahi-daemon.service 
edit /etc/nsswitch.conf and change the line to be: 
hosts: mymachines mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns

DISABLE TOUCH SCREEN Using the ability to disable a single USB device, we need
just to create a UDEV rule. Create the file in

    /etc/udev/rules.d/80-touchscreen.rules

With following information: 

SUBSYSTEM=="usb", ATTRS{idVendor}=="2386", ATTRS{idProduct}=="310e", ATTR{authorized}="0" 

You can find idVendor and idProduct by running: 
cat /proc/bus/input/devices

You can reload the rules without restart: 
udevadm control --reload-rules && udevadm trigger

Alternatively: echo "0003:2386:310E.0001" >
/sys/bus/hid/drivers/hid-multitouch/unbind

GNOME
- dark mode (Settings: Appearance)
- auto date/time (Settings: Date & Time)
- time format: 12-hour (Settings: Date & Time)
- workspaces: 1 (Settings: Multitasking: Fixed number of workspaces: 1)
- Settings: Utils: Tweaks: Top Bar: Weekday: ON, Window Titlebars: Max, Min: ON
- Over-Amplification: ON
- wallpaper
- install dash to dock (turn off dodge windows, 50% opacity, remove trash)
- other extensions: weather, app indicator, no annoyance

FIX GDM SCREEN RESOLUTION
- set your screen resolution as desired (ie: 1366x768)
- this creates ~/.config/monitors.xml
- su to root, then copy that file to /var/lib/gdm3/.config/

DISABLE SLEEP
- sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target (use unmask to undo this)

GRUB
GRUB Edit: /etc/default/grub 
GRUB_DEFAULT=saved 
GRUB_SAVEDEFAULT=true
GRUB_GFXMODE=1024x768 
GRUBCMDLINELINUX_DEFAULT="quiet splash"
GRUBDISABLEOS_PROBER=false

SYNCTHING sudo apt install syncthing 
sudo systemctl enable [email protected] 
sudo systemctl start [email protected] 
http://localhost:8384

ANTIVIRUS 
sudo apt install clamav clamav-daemon 
reboot 
sudo freshclam 
curl https://secure.eicar.org/eicar.com.txt | clamscan - 
look for stdin: Win.Test.EICAR_HDB-1 FOUND in output 
sudo apt install clamtk

WEATHER: edit the file /usr/share/libgweather-4/Locations.xml and add:

        
          Barrie
          CYLS
          44.400110 -79.666340
        

near Borden in the Locations.xml file