Linux Guides & Tips

This is a collection of guides and tips I've used/currently use.

Most of this was written with Manjaro Linux (KDE) in mind (Arch based distro) so keep that in mind when following the code (substitute pacman/yaourt for your package manager and change packages to the equivalent ones provided by your distro). Otherwise, this is pretty universal stuff.


Some useful tweaks I use or have used at some point

  • SSD Tweaks:
    # Add noatime flag to disable access time stamp
    sudo nano /etc/fstab
    # add 'noatime,' before other options (such as errors=remount-ro) for all partitions except swap)
    # Note: DO NOT LEAVE A SPACE BETWEEN noatime and other options
    # Move trim from a weekly task to a daily one
    sudo mv -v /etc/cron.weekly/fstrim /etc/cron.daily
    # Decrease swappiness (so system favors using ram over swap more (0=keep in ram as much as possilble, 100=use swap as much as possible)
    sudo nano /etc/sysctl.conf
    # Add: 'vm.swappniess=1' at end of file
  • Disable IPv6 (Useful for OpenVPN):
    sudo nano /etc/sysctl.d/99-sysctl.conf
    # Copy/paste these to bottom of file:
    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.default.disable_ipv6 = 1
    net.ipv6.conf.lo.disable_ipv6 = 1
    # Close file
    sudo sysctl -p
  • Sandbox Web Browser:
    # Install firejail package
    # Change web browser command so it has 'firejail ' in front of it
    # If having issues with sound:
    mkdir -p ~/.config/pulse
    cd ~/.config/pulse
    cp -v /etc/pulse/client.conf ~/.config/pulse
    echo "enable-shm = no" >> client.conf
    # Close any programs that have been firejailed
    # To confirm it's working, open firejailed program and type in terminal:
    firejail --tree
    # Note: Firejail blocks acccess to all folders/files in user directory except Downloads
    # This can be changed by modifiying corresponding file in /etc/firejail


These are applicable to all Arch based distros only (except the first one which is obviously for arch based distros using KDE desktop environment only)

  • If KDE System Monitor (KSysGuard) isn't working right (like graphs not showing up):
    # Replace 'username' with your username
    rm /home/username/.local/share/ksysguard/ProcessTable.sgrd
    rm /home/username/.local/share/ksysguard/SystemLoad2.sgrd
    rm /home/username/.config/ksysguardrc
  • If having issues with dolphin-root not installing due to packages being dependent on dolphin:
    sudo nano /var/lib/pacman/local/packagename/desc # Where packagename is the problem package
    # Change the 'DEPENDS' section from 'dolphin' to 'dolphin-root'
  • If having issues with updating due to dependencies (such as dolphin-plugins in this example), just ignore them:
    sudo pacman -Sdd dolphin-plugins

Microsoft Office 365 Wine Install Instructions

Wine version used for this was 3.7-1

This was pretty huge for me. WineHQ is the place to find this stuff by the way, I modified it slightly so it'd work for me (and added/changed regedits based on what Crossover did)

# Install needed components:
sudo pacman -Sy wine wine-mono wine_gecko winetricks samba smbclient libwbclient alsa-lib alsa-plugins gnutls libpng libpulse libglvnd libxcomposite libxinerama libxml2 lib32-alsa-lib lib32-alsa-plugins lib32-gnutls lib32-libpng lib32-libpulse lib32-libglvnd lib32-libxcomposite lib32-libxinerama lib32-libxml2 gconf gst-plugins-base gst-plugins-base-libs gst-plugins-good gstreamer lcms2 libcanberra libcanberra-pulse libva libva-intel-driver libva-vdpau-driver libvdpau libx11 libxmu libxrandr libxslt libxss libxt libxtst libxv mesa mesa-vdpau mpg123 p11-kit vulkan-intel lib32-gconf lib32-gst-plugins-base lib32-gst-plugins-base-libs lib32-gst-plugins-good lib32-gstreamer lib32-lcms2 lib32-libcanberra lib32-libcanberra-pulse lib32-libva lib32-libva-intel-driver lib32-libva-vdpau-driver lib32-libvdpau lib32-libx11 lib32-libxmu lib32-libxrandr lib32-libxslt lib32-libxss lib32-libxt lib32-libxtst lib32-libxv lib32-mesa lib32-mesa-vdpau lib32-mpg123 lib32-p11-kit lib32-vulkan-intel
yaourt -S lib32-nss-mdns

# Get installer from office365 in school email or whatever (will need to spoof browser user agent as windows)
# Note that only 32bit office is working with wine at the moment. Don't even bother with 64bit.
export WINEARCH=win32
export WINEPREFIX=~/.msoffice
wineboot -i
winetricks winecfg
# Change to Windows
winetricks corefonts
winetricks winecfg # Check for windows 7 again
winetricks dotnet20 gdiplus msxml6 riched20
winetricks regedit
# In [HKEY_CURRENT_USER\Software\Wine]:
# Make a Direct2D, Direct3D, and X11 Driver keys
# Make a new DWORD in Direct2D: max_version_factory=0
# Make a new DWORD in Direct3D: MaxVersionGL=30002
# Make a new String value in X11 Driver: ScreenDepth=32
winetricks winecfg
# Make sure these overrides are present: gdiplus (native), msxml6 (native,builtin), riched20 (native,builtin)
# Make sure it's still Windows 7
wine ~/Desktop/SetupFile.exe # Replace this with the full path to your setup exe file
# Installer won't exit automatically, will need to close manually in system monitor or whatever
cp ~/.msoffice/drive_c/Program\ Files/Common\ Files/Microsoft\ Shared/ClickToRun/{AppvIsvSubsystems32.dll,C2R32.dll} ~/.msoffice/drive_c/Program\ Files/Microsoft\ Office/root/Office16/
# In KDE, go to System Settings -> Window Management -> Window Rules, then import this kwinrule file to fix windows resizing issues
# To fix powerpoint hanging on open: force quit it in whatever task manager you have, then reopen it. It'll prompt for safe mode, say "Yes". Then go to File -> Options -> Addins -> Manage (at bottom), delete the onenote addin

Misc Programs

These are install instructions and helpful tips for various programs

  • Thunderbird not showing all of your subfolders?
    Go to Preferences -> Account settings -> Server settings (for target email accounnt) -> Advanced - uncheck 'show only subscribed folders'
  • Wireguard: The future of VPNs:
    # Make an account with AzireVPN here
    # Install Wireguard - replace headers number with kernel number
    sudo pacman -S linux414-headers wireguard-dkms wireguard-tools # Replace the headers version with your kernel version
    curl -LO && chmod +x && ./
    # To start it:
    wq-quick up azirevpn-us1
    # To stop it:
    wq-quick down azirevpn-us1
  • KVM Virt Manager:
    sudo pacman -S virt-manager, ovmf, qemu, qemu-arch-extra, ebtables, dnsmasq, bridge-utils
    # Open /etc/libvirt/qemu.conf with a text editor and add this to it:
    nvram = [
    # Close file
    sudo systemctl enable libvirtd.service
    sudo systemctl start libvirtd.service