summaryrefslogtreecommitdiff
path: root/guides/setups/operating-systems/opensuse.org
blob: bddf66bd3062e6653e753ac730e20797b8d15e9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
* 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: cf. [[./console.org]].
** Applications
*** Firefox
- Clear =browser.newtabpage.pinned=
* Packages that took me more than one minute to find
** spell-checking
- hunspell
- myspell-fr_FR
* HOWTO
** Open ports
#+begin_src sh
$ firewall-cmd --add-port=8000/tcp
$ firewall-cmd --add-service=mdns
#+end_src
To make permanent, either:
- run the command with =--permanent=, and restart ~firewalld~ for
  immediate application,
- run the command /a second time/ with =--permanent=,
- run ~firewall-cmd --runtime-to-permanent~.
** Fix broken Nvidia drivers after upgrade
Reinstall Nvidia kernel module:
#+begin_src sh
$ sudo zypper in -f nvidia-gfxG05-kmp-default
#+end_src
** 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~
** Clear up some 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
** Add 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.
*** Upgrade woes
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?

🤷
** Auto-mount second disk under =$HOME/media=
#+begin_example
$ lsblk --fs
[…]
nvme0n1
└─nvme0n1p1 xfs                […UUID…]
$ sudo $edit /etc/fstab
[… add:
UUID=[…UUID…]   […$HOME…]/media         xfs     user,exec       0  0
…]
$ mkdir ~/media
$ mount ~/media
#+end_example