Skip to content

Instantly share code, notes, and snippets.

@WebReflection
Last active January 10, 2024 12:47
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save WebReflection/7538865e739c0c2eeb542dfac235e84c to your computer and use it in GitHub Desktop.
Save WebReflection/7538865e739c0c2eeb542dfac235e84c to your computer and use it in GitHub Desktop.
Minimal GNOME Setup for ArchLinux

This is a personal reminder about few things I need to remember wheneve I install the most basic Gnome on ArchLinux.

Minimal Installation

bash <(curl -s https://archibold.io/install/gnome)

This will install automatically pamac-aur, Firefox, and many other common software so that the rest of this document could be ignore.

Pamac, Pakku, Yay, or Yaourt

# GUI only
bash <(curl -s https://archibold.io/install/pamac)
# or
bash <(curl -s https://archibold.io/install/pakku)
# or
bash <(curl -s https://archibold.io/install/yay)
# or
bash <(curl -s https://archibold.io/install/yaourt)

Firefox

Actually way better than chromium, specially when it comes to video playing.

Stil instal chrome-gnome-shell to have gnome shell integrated in Firefox.

If you struggle with sites having weird CSS that mess up forms, so that you cannot read input, you have two options:

Add an about:config string (recommended)

Go to about:config, and right click on the table to add new widget.content.gtk-theme-override string, with the value Adwaita:light, then restart the browser.

If you cannot find your Firefox shortcut anymore, simply re-install it and everything should be fine.

Edit the desktop file

sudo vi /usr/share/applications/firefox.desktop

Find all occurrences of Exec= and add Exec=env GTK_THEME=Adwaita to force bright theme instead.

This can be disturbing though, I wish people knew better how to style form tags.

Minimal Chromium

Install both chromium and chromium-widevine, but also chrome-gnome-shell.

The latter will allow you to control shell extensions right away via Chrome. It works, it's handy.

Restore Page Issue

If Chromium keeps telling you there were issues in restoring the previous session, go to settings, advanced, and disable the "Continue running background apps when Chromium is closed" option.

Extensions

If you like to write emoji here or there, install through Gnome Extensions the Emoji Selector or Emoji Copy which runs in GNOME 45+ too.

If you like to change background via unsplash or other sites check Random Wallpaper out.

My favorite collection so far, from unsplash, is 1065376, or 1339090 for 4K.

Transparent top bar is also pretty awesome!

Screencast

With gnome-shell-extension-easyscreencast (use the -git version if original one is version < 1.0.1) you will be able to screencast more than 30 seconds and configure various options, including downscaling your resolution from 4K to 1080p.

Basic settings

Settings, Devices, Mouse and Touchpad, set Tap to Click to ON if you don't want to go insane.

Settings, Privacy, Location Services ON if you'd like to use Maps (online or the actual Gnome Map) which won't be installed by default.

Settings, Details, Date & Time, set Automatic Date & Time ON if you'd like to have the right time on screen.

Basic Tweaks

Open Gnome Tweaks to setup few things.

  • in Appearance, set Themes to use Adwaita-dark, it's literally exremely good looking
  • go to Extensions and turn it on, if not already. Then enable User themes (or anything else you like)
  • switch ON Maximize and Minimize under Windows

Common Software

  • code (or visual-studio-code-bin if you want the non open source version)
  • telegram-desktop
  • spotify via bash <(curl -s https://archibold.io/install/spotify) if you have HiDPi device

Extras

  • ricoh-sp150-ppd (for the Ricoh SP 150 printer)
  • inkscape
  • gimp
  • vlc
  • transmission-gtk

Scanner

The simple-scan should just work. If it doesn't, reboot, attach your scanner back again and try again.

If it still doesn't work I'll publish an AUR package to force-boot these bloody lazy scanners that won't show up right away.

Printer

I've instlaled both cups and system-config-printer.

The printer didn't work until I've provided the previously mentioned ricoh-sp150-ppd ... with that, it goes up like a charm.

Once drivers, cups, and system-config-printer are up, even the Settings, Devices, Printer bit of Gnome works well.

Bash

echo '
# for a better bash experience
export HISTCONTROL=ignoredups:erasedups  # no duplicate entries
export HISTSIZE=100000                   # many commands in ongoing session memory
export HISTFILESIZE=100000               # many lines in .bash_history
shopt -s histappend                      # append to historyinstead of overwriting it
alias open=xdg-open                      # macOS open like function
. /etc/profile.d/vte.sh                  # new terminal tabs in the same folder
' >> ~/.bashrc

Gestures

On Wayland, try https://extensions.gnome.org/extension/1253/extended-gestures/ extension, and eventually disable the dynamic workspace, reducing the static to 1, if the four fingers get in your way.

To verify if your touchpad recognizes gestures, try sudo libinput debug-events.

Disable Page UP / Down Keys

Specially coming from an MBP, having PgUp and PgDn button beside arrows can be very annoying.

The way I've disabled/overwritten those buttons is via this /etc/systemd/system/no-pg-keys.service file:

[Unit]
Description=No PgUp / PgDn keys

[Service]
User=root
Type=simple
ExecStart=/home/$USER/.no-pg-keys

[Install]
WantedBy=multi-user.target

Replace $USER with your user name and save in /home/$USER/.no-pg-keys the following file:

#!/usr/bin/sh

setkeycodes 0xe049 105
setkeycodes 0xe051 106

Make it executable via chmod +X /home/$USER/.no-pg-keys and be sure those keys are correct.

In my case I've mapped these to arrows themselves, so I don't mistake my own intent.

You can systemctl enable no-pg-keys followed by systemctl start no-pg-keys now.

Some extra details about this on the internet.

Import previous SSH keys

#!/usr/bin/env bash

for pub in $(ls ~/.ssh/*.pub); do
    pvt="${pub:0:-4}"
    if [ -f "$pvt" ]; then
        sudo chmod 600 "$pvt"
        sudo chmod 600 "$pub"
        eval $(ssh-agent -s)
        ssh-add "$pvt"
    fi
done

Solve Failed to unmount /tmp folder

systemctl mask tmp.mount
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment