Linux [Desktop] Tips
Table of Contents
Which Distro Should I Use?
The best distro is functionally the best, stable (for general and niches like gaming and content creation), and has better performance than the alternatives.
- For functionality, KDE is the best; fractional scaling.
- For stability, we choose anything but Arch. A perfect example is this comment explaining that when things break, he doesn’t consider it broken if he has to use the internet (arch wiki) to fix the problem. My definition of broken is that the issue cannot be fixed by restarting your computer.
- For performance, we want to avoid Ubuntu-based distros that use snaps
- We are left with distros that support KDE out of the box: Namely, Debian based (excluding Ubuntu) and Fedora based.
So why Fedora instead of Debian? Well because it’s more up to date and it’s also not confusing to download unlike Debian.
Webcam Application
KDE
Install kamoso (with Add/Remove Software).
Gnome
Cheese
How to Install yay
Yet Another Yogurt (yay) helps you install packages from AUR using the command yay -S
instead of entering in commands to clone and build the package.
pacman -S --needed --noconfirm git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd ..
rm yay -rf
How to Install Packages from AUR
You can either do pamac build $PKGNAME
or use yay -s $PACKAGENAME
which requires installing yay as shown above.
In the next section is an example on how to install visual studio code.
The following is a one-liner way to install packages in yay to skip the prompts.
echo y | LANG=C yay --provides=false --answerdiff=None --answerclean=None --mflags "--noconfirm" -S $list_of_packages
gpg: keyserver recevie failed: No route to host
gpg --server hkp://keys.gnupg.net --recv-key KEY_GOES_HERE
If the above fails with “gpg: keyserver receive failed: Server indicated a failure”,
Use sudo nano /etc/resolv.conf
and add Cloudflare’s DNS
nameserver 1.1.1.1 # Cloudflare
How to install Visual Studio Code in Manjaro
To install vscode, yay -S visual-studio-code-bin
VSCode Fix ZSH Font
sudo pacman -Su ttf-meslo-nerd-font-powerlevel10k ttf-firacode-nerd --noconfirm
Set Terminal › Integrated: Font Family to firaCode Nerd Font, monospace
or MesloLGS NF, monospace
How to Install Fira Code Nerd Font on Arch
Suppose you want to install a package on Arch. The first step would be to search for what you want using pacman -Ss a query
> pacman -Ss fira code
extra/texlive-fontsextra 2023.66594-15 (texlive)
TeX Live - Additional fonts
extra/texlive-latexextra 2023.66594-15 (texlive)
TeX Live - LaTeX additional packages
extra/ttf-fira-code 6.2-2
Monospaced font with programming ligatures
extra/ttf-firacode-nerd 3.0.2-1 (nerd-fonts)
Patched font Fira (Fura) Code from nerd fonts library
extra/woff-fira-code 6.2-2
Monospaced font with programming ligatures
extra/woff2-fira-code 6.2-2
Monospaced font with programming ligatures
Next install the Fira Code Nerd Font.
sudo pacman -S ttf-firacode-nerd --noconfirm
To use this font in Visual Studio Code, set the editor font family to firaCode Nerd Font, 'Cascadia Code', Consolas, 'Courier New', monospace
.
Set the terminal font-family to firaCode Nerd Font, monospace
Setting Default Browser for Electron Apps
xdg-mime default firefox.desktop x-scheme-handler/http
xdg-mime default firefox.desktop x-scheme-handler/https
How to fix Sudo Password Not Accepted
systemctl start systemd-homed
pacman -S pambase --noconfirm # optional
Virtual Terminal
- Ctrl + Alt + F4 to go to virtual terminal
- Ctrl + Alt + F1 to go back to desktop
X-Server Restart
Ctrl + Alt + Backspace (unconfirmed)
How to setup OneDrive on Linux
- jstaf/onedriver
- For Arch, use
sudo pamac build onedriver
yay onedrive-abraunegg
Note: If asked regarding a provider for ’d-runtime’ and ’d-compiler’, select ’liblphobos’ and ’ldc'
Run onedrive
to setup account.
Increase number of inotify watchers (number of files that can be monitored)
echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system
Enable the system service
sudo systemctl enable onedrive@$USER.service
sudo systemctl start onedrive@$USER.service
journalctl -u onedrive@$USER # scroll to bottom to check if syncing works
Linux How to Read a File in the Terminal
- Use
less
to read line by line (arrow up and down keys) - Use
more
to read page by page (arrow up and down keys) - Use
cat
to output entire file (useful for piping|
commands)
How to Install an AppImage on Manjaro
First install appimagelauncher
sudo pacman -S appimagelauncher
Next double click on the downloaded AppImage
Linux Append Line to System File
To append a line to a system file, do not use >>
. Instead use commandForOutputGoesHere | sudo tee -a /path/to/file
Steam Scale UI on Linux or Manjaro
Before we get started, reminder to prefer using Steam (Runtime)
instead of Steam (Native)
If you have root access, run the following command so that steam will be properly scaled no matter how it is launched (steam desktop shortcut, terminal, game desktop shortcut).
echo "STEAM_FORCE_DESKTOPUI_SCALING='1.5'" | sudo tee -a /etc/environment
If you do not have root access, edit your login shell (~/.profile
) instead.
echo "STEAM_FORCE_DESKTOPUI_SCALING='1.5'" | sudo tee -a ~/.profile
Test 1.5 out by using source /path/to/file && steam
. If 1.5 isn’t right for you, use nano to edit your file:
sudo nano /etc/environment
or nano ~/.profile
Now log out and log back in so that your system will source from either of the files that you edited.
Alternatively, you could edit every single one of your game desktop entries in addition to your steam shortcuts,
To fix scaling, simply run
sudo nano /usr/share/applications/steam.desktop
If you have gedit
, you can use that instead.
Next scroll to the first Exec for the desktop entry, and add -forcedesktopscaling=1.5
like below
Exec=/usr/bin/steam-runtime -forcedesktopscaling=1.5 %U
Save the file and restart steam (the next section has a command for shutting down apps by program name).
You will also have to add this argument to all game shortcuts.
How to Pin or Favourite Games on Steam Linux
Copy the desktop file to your local applications directory. This will let you pin / favourite the game to your start menu. You can choose to delete the original shortcut afterwards.
mkdir ~/.local/share/applications
sudo cp ~/Desktop/Game.desktop ~/.local/share/applications
How to Force Close Apps on Linux
killall steam
version GLIBC_2.38 Not Found
Man I tried to show my friend today how my Manjaro system was running and of course it breaks.
Manjaro fucking sucks. Let’s get that straight. I tried running a pacman command and it doesn’t upgrade my system. I did something and everything broke.
pacman
pacman: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by pacman)
pacman: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /usr/lib/libalpm.so.13)
To fix this issue,
- Download pacman-static
- `cd ~/Downloads && chmod +x ./pacman-static``
sudo pacman -Syu glibc-locales --overwrite /usr/lib/locale/\*/\* --noconfirm
referencesudo ./pacman-static -Syu --noconfirm
sudo pacman-mirrors -f5
Hey hey hey, we fixed it.
My laptop’s battery drained so when I started it up again I got the error in the following section.
Failed to Start Light Display Manager Error
In the lightdm logs, you’ll see the following.
failed to start seat: seat0
First step is to get terminal access
- Ctrl + Alt + F2
- Enter your username and then your password
sudo pacman -Syu --noconfirm
nmtui # connect to a wifi network if you are using wifi
sudo pacman -S lightdm-gtk-greeter --noconfirm
sudo pacman -Syu
sudo systemctl start lightdm
How to Enable Wi-Fi in TTY/TTL
- Ctrl + Alt + F2
nmtui
How to Install Python 3.10 on Manjaro (or Arch)
Try this first.
yay -S python310
It didn’t work for me, so this is how I did it.
cd ~/Downloads
git clone https://aur.archlinux.org/python310.git
cd python310
makepkg -si
# the directory is 360 MB, so only if that's a lot for your system, remove it
cd ..
rm -rf python310
This will take a LONG time…but it works.
Music Caster runs on Linux again!
How to Reduce Firefox Scroll Speed or Sensitivity
The scroll speed on Firefox is too sensitive. To reduce it,
- Go to about:config
- Search for
mousewheel.default.delta_multiplier_y
- Set to 75 or change until satisfactory
- You can test the scroll speed on this post itself