diff options
Diffstat (limited to 'guides/sysadmin/machines/my-little-tumbleweed')
3 files changed, 207 insertions, 0 deletions
diff --git a/guides/sysadmin/machines/my-little-tumbleweed/README.org b/guides/sysadmin/machines/my-little-tumbleweed/README.org new file mode 100644 index 0000000..eaf440e --- /dev/null +++ b/guides/sysadmin/machines/my-little-tumbleweed/README.org @@ -0,0 +1,2 @@ +A hand-me-down desktop I used during the latter Tens, until 2021. My +first experience with Tumbleweed, Plasma, and {{{wow(Linux gaming)}}}. diff --git a/guides/sysadmin/machines/my-little-tumbleweed/maintenance.org b/guides/sysadmin/machines/my-little-tumbleweed/maintenance.org new file mode 100644 index 0000000..fb011d2 --- /dev/null +++ b/guides/sysadmin/machines/my-little-tumbleweed/maintenance.org @@ -0,0 +1,153 @@ +* Post-installation setup +** System settings +*** Workspace Behavior +- Virtual Desktops + - 1 row, 4 desktops +*** Window Management +- Task Switcher + - Visualization: Thumbnail Grid +*** Shortcuts +**** Applications +- Dolphin: disable =Meta+E=; add =Meta+F= +- Konsole: disable =Ctrl+Alt+T=; add =Meta+T= +- KRunner: disable =Alt+Space= +**** System Settings +- KWin + - Active Window Demanding Attention: disable =Ctrl+Alt+A= + - Maximize Window: =Meta+Up= + - Switch to Next Desktop: =Ctrl+Alt+Right= + - Switch to Previous Desktop: =Ctrl+Alt+Left= + - Walk Through Windows of Current Application: disable =Alt+`= + - Walk Through Windows of Current Application (Reverse): disable =Alt+~= + - Window to Desktop /n/: =Ctrl+Alt+n= +- Plasma + - Enable Clipboard Actions: disable =Ctrl+Alt+X= + - Manually Invoke Action on Current Clipboard: disable =Ctrl+Alt+R= +- Session Management + - Lock Session: disable =Ctrl+Alt+L=; add =Meta+X= +*** Input devices +- Keyboard + - Layouts + - Alternative shortcut: unset + - Variant: French (legacy, alt.) + - Advanced + - [X] Configure keyboard options + - [X] Caps Lock behavior: Make Caps Lock an additional Ctrl +** Bottom panel +- Configure Pager + - [X] Show application icons on window outlines +- Unpin all applications +- Replace "Icon-only Task Manager" with "Task Manager" +** Dotfiles +*** =.profile= +#+begin_src sh +if test -d ~/.local/bin +then + export PATH=~/.local/bin:${PATH} +fi + +unset PAGER # breaks Python REPL in Emacs. +#+end_src +** TODO Unset root password +Following instructions from [[https://en.opensuse.org/SDB:Administer_with_sudo][the support database]]: +- with ~visudo~, uncomment the ~%wheel ALL=(ALL) ALL~ line +- ~sudo usermod -aG wheel $USER~ +- with ~visudo~, comment out ~Defaults targetpw~ and ~ALL ALL=(ALL) + ALL~ +- YaST still insists on getting the root password… +*** Fix eager ~sudo passwd -d root~ +- boot on install media +- start rescue mode +- locate partition with ~lsblk~ +- ~mount $PARTITION /mnt/disk~ +- ~cp /mnt/disk/etc/shadow- /mnt/disk/etc/shadow~ +** Global keyboard settings +#+begin_src sh +$ sudo localectl set-x11-keymap fr pc105 latin9 ctrl:nocaps +#+end_src +To set this for TTYs: see [[./console.org]]. +** Applications +*** Firefox +- Clear =browser.newtabpage.pinned= +- Set =widget.use-xdg-desktop-portal.file-picker= to 1 to get Plasma's + file picker +*** VLC & codecs +#+begin_src sh +$ sudo zypper addrepo http://download.videolan.org/pub/vlc/SuSE/Tumbleweed VLC +$ sudo zypper modifyrepo --refresh VLC +$ sudo zypper install --from VLC ffmpeg vlc vlc-codecs +#+end_src +NB: there's a lot of prompting going on in that last command; maybe +=--allow-vendor-change= could help. +** Drivers +*** Load X-Box gamepad drivers automatically +- comment out any blacklisting of =xpad= in =/etc/modprobe.d= + (e.g. xboxdrv installs =/etc/modprobe.d/50-xpad.conf=) + - if installed, make sure the xboxdrv service is disabled +- ~sudo tee /etc/modules-load.d/xpad.conf <<< xpad~ +* Upgrades +** Fix broken Nvidia drivers +Reinstall Nvidia kernel module: +#+begin_src sh +$ sudo zypper in -f nvidia-gfxG05-kmp-default +#+end_src +** Make space for large upgrades +libc and compilers upgrades sometimes fail midway through because +there is no space left. An easy way to reclaim some space is to +delete some filesystem snapshots: +#+begin_src sh +$ sudo snapper list +$ sudo snapper delete $start-$end +#+end_src +** Fix conflicts with VLC repo +Sometimes this VLC repository will stop providing a package it used +to, e.g. because it now ships an upgraded version (and the version +number is somehow part of the package name). + +In that case, we need to help =zypper= figure out what to do: +#+begin_src sh +$ sudo zypper dist-upgrade --auto-agree-with-licenses +# … +Computing distribution upgrade... + +Problem: problem with the installed libliveMedia97-2021.08.23-58.7.x86_64 + Solution 1: install libliveMedia97-2021.08.23-1.2.x86_64 from vendor openSUSE + replacing libliveMedia97-2021.08.23-58.7.x86_64 from vendor VideoLAN Project (http://www.videolan.org) + Solution 2: keep obsolete libliveMedia97-2021.08.23-58.7.x86_64 + +Choose from above solutions by number or cancel [1/2/c/d/?] (c): d +Problem: problem with the installed libliveMedia97-2021.08.23-58.7.x86_64 +Detailed information: + the installed libliveMedia97-2021.08.23-58.7.x86_64 does not belong to a distupgrade repository and must be replaced + Solution 1: install libliveMedia97-2021.08.23-1.2.x86_64 from vendor openSUSE + replacing libliveMedia97-2021.08.23-58.7.x86_64 from vendor VideoLAN Project (http://www.videolan.org) + Solution 2: keep obsolete libliveMedia97-2021.08.23-58.7.x86_64 + +Choose from above solutions by number or cancel [1/2/c/d/?] (c): 1 +Resolving dependencies... +Computing distribution upgrade... +# … +The following package is going to be downgraded: + libliveMedia97 + +The following package is going to change vendor: + libliveMedia97 VideoLAN Project (http://www.videolan.org) -> openSUSE + +The following 6 NEW packages are going to be installed: + … libliveMedia102 … +# … +#+end_src + +In this instance, I went looking at the [[http://download.videolan.org/pub/vlc/SuSE/Tumbleweed/x86_64/][VLC repository]] to figure out +what was going on; searching for "libliveMedia" revealed that the +repository now shipped libliveMedia102 and no longer included +libliveMedia97. + +I went with solution 1 (switch to openSUSE's libliveMedia97), but +maybe solution 2 was the right one? E.g. maybe after "computing [the] +distribution upgrade", zypper would have realized that nobody needs +97 anymore, so it could be removed; could be I accidentally set 97 to +"manually installed" with solution 1? + +🤷 + diff --git a/guides/sysadmin/machines/my-little-tumbleweed/notifications.org b/guides/sysadmin/machines/my-little-tumbleweed/notifications.org new file mode 100644 index 0000000..5d8ee62 --- /dev/null +++ b/guides/sysadmin/machines/my-little-tumbleweed/notifications.org @@ -0,0 +1,52 @@ +* Fixing dual Plasma/Xfce installations +Plasma and Xfce both define the ~org.freedesktop.Notifications~ D-BUS +service. That leads to all kinds of fun ([[https://bugs.kde.org/show_bug.cgi?id=381693][KDE bug]]; [[https://bugzilla.redhat.com/show_bug.cgi?id=484945][Red Hat bug]]); on my +machine, it causes Plasma sessions to use xfce4-notifyd instead of +Plasma's own notification mechanism. + +[[https://kevinlocke.name/bits/2020/04/12/resolving-desktop-notifications-dbus-service-conflicts/][Kevin Locke]] explains how to solve the issue by defining a third +~org.freedesktop.Notifications~ service in a higher-priority user +directory, which runs a command that will determine the current +desktop environment and start the appropriate notification daemon. In +~~/.local/share/dbus-1/services/org.freedesktop.Notifications.service~: + +#+begin_src conf-desktop +[D-BUS Service] +Name=org.freedesktop.Notifications +Exec=/bin/sh -c "~/.local/lib/meta-notify" +#+end_src + +This gentleman suggests relying on the ~XDG_SESSION_DESKTOP~ variable +to find out which DE is running; unfortunately, for some reason if I +log into Plasma first, then into Xfce, this variable (as well as +~XDG_CURRENT_DESKTOP~ and ~DESKTOP_SESSION~) keeps saying "KDE" when +the script runs. + +(I think this might be caused by Xfce's [[https://gitlab.xfce.org/atomsymbol/xfce4-session/-/blob/xfce4-session-4.14.2/scripts/xinitrc.in.in#L19][xinitrc]] not setting these +variables if they are not empty, but they *are* set when I look at +them in a shell once logged in, so… 🤷) + +Thus my version of ~~/.local/lib/meta-notify~ falls back on the window +managers: + +#+begin_src sh +#!/bin/sh + +wm=$(wmctrl -m | grep '^Name:' | cut -f2- -d' ') + +case ${wm} in + KWin) + exec /usr/bin/plasma_waitforname org.freedesktop.Notifications + ;; + Xfwm4) + exec dbus-send --session \ + --dest=org.freedesktop.systemd1 \ + /org/freedesktop/DBus \ + org.freedesktop.systemd1.Activator.ActivationRequest \ + string:xfce4-notifyd.service + ;; + *) + /usr/bin/logger -t $(basename "$0") Unknown window manager \"${wm}\" + exit 1 +esac +#+end_src |
