summaryrefslogtreecommitdiff
path: root/guides/setups/operating-systems
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2020-01-19 20:07:32 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2020-01-22 22:15:38 +0100
commit662fdbfb5a2005756720d116140dfd4db892abaa (patch)
treebb5e9a63cd521f62074c68a54fa14702e6250de5 /guides/setups/operating-systems
parent58f987ab0e567cf8664ebfd70c59a5b65e2d779a (diff)
downloadmemory-leaks-662fdbfb5a2005756720d116140dfd4db892abaa.tar.xz
Shuffle laptop notes around
Try to split what's device-specific from what's OS-specific.
Diffstat (limited to 'guides/setups/operating-systems')
-rw-r--r--guides/setups/operating-systems/bunsenlabs.org39
-rw-r--r--guides/setups/operating-systems/debian.org262
2 files changed, 301 insertions, 0 deletions
diff --git a/guides/setups/operating-systems/bunsenlabs.org b/guides/setups/operating-systems/bunsenlabs.org
new file mode 100644
index 0000000..578bcbe
--- /dev/null
+++ b/guides/setups/operating-systems/bunsenlabs.org
@@ -0,0 +1,39 @@
+* Keyboard
+Cf. keyboard(5):
+
+- add =ctrl:nocaps= in =/etc/default/keyboard=
+- run =udevadm trigger --subsystem-match=input --action=change=
+- run =setupcon= in a TTY
+
+* Desktop
+** Conky
+- see dotfiles
+
+** ClipIt
+- disable hotkeys
+
+** Openbox
+*** =rc.xml=
+- comment A-m and A-r out
+- undecorate all windows:
+
+#+begin_src xml
+<application class="*">
+ <decor>no</decor>
+</application>
+#+end_src
+
+*** WM preferences
+- appearance: uncheck "windows retain a border when undecorated"
+- desktops: 4
+
+** tint2
+- remove launcher and exit panel items
+- add date (time2)
+
+** Calendar
+Make weeks begin on Monday by using the British locale:
+
+- uncomment =en_GB.UTF-8 UTF-8= in /etc/locale.gen
+- =sudo locale-gen=
+- =force_lang = en_GB.utf8= in =~/.config/gsimplecal/config=
diff --git a/guides/setups/operating-systems/debian.org b/guides/setups/operating-systems/debian.org
new file mode 100644
index 0000000..a3142f0
--- /dev/null
+++ b/guides/setups/operating-systems/debian.org
@@ -0,0 +1,262 @@
+* Getting comfortable
+** Make CapsLock another Control
+Cf. keyboard(5):
+
+- add =ctrl:nocaps= in =/etc/default/keyboard=
+- run =udevadm trigger --subsystem-match=input --action=change=
+- run =setupcon= in a TTY
+
+** apt install (1/n)
+git greybird-gtk-theme elementary-xfce-icon-theme emacs
+
+git suggests git-doc: why of course, good idea!
+
+emacs suggests emacs-common-non-dfsg: right, what was that again?
+Documentation, IIRC? What does APT have to say?
+
+#+BEGIN_EXAMPLE
+$ apt show emacs-common-non-dfsg
+Package: emacs-common-non-dfsg
+State: not a real package (virtual)
+N: Can't select candidate version from package emacs-common-non-dfsg as it has no candidate
+N: Can't select versions from package 'emacs-common-non-dfsg' as it is purely virtual
+N: No packages found
+#+END_EXAMPLE
+
+… What does https://packages.debian.org/emacs-common-non-dfsg say?
+
+#+BEGIN_QUOTE
+*[non-free]*
+#+END_QUOTE
+
+[[https://www.debian.org/vote/2006/vote_001][Oh.]] Well then,
+
+#+BEGIN_SRC sh
+$ sudo sed -ri 's/^([^#].+ main)$/\1 contrib non-free/' /etc/apt/sources.list
+$ # While in there…
+$ sudo sed -ri 's/^(deb|deb-src) http:/\1 https:/' /etc/apt/sources.list
+#+END_SRC
+
+What now?
+
+#+BEGIN_EXAMPLE
+$ sudo apt update
+[…]
+Err:4 https://security.debian.org/debian-security buster/updates Release
+ Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. The name in the certificate does not match the expected. Could not handshake: Error in the certificate verification. [IP: 217.196.149.233 443]
+[…]
+E: The repository 'https://security.debian.org/debian-security buster/updates Release' no longer has a Release file.
+N: Updating from such a repository can't be done securely, and is therefore disabled by default.
+N: See apt-secure(8) manpage for repository creation and user configuration details.
+#+END_EXAMPLE
+
+🤨
+
+#+BEGIN_SRC sh
+$ sudo sed -ri 's/security\.debian\.org/deb.debian.org/' /etc/apt/sources.list
+#+END_SRC
+
+[[https://wiki.debian.org/SourcesList#Example_sources.list][🤷]]
+
+** Clone dotfiles
+Generate SSH keys and add them to GitLab through the web UI. "Clone"
+(init, add remote, fetch, reset) dotfiles.
+
+** Tweak dotfiles
+Set EMAIL in .profile; copy .profile to .xsessionrc (AFAICT XFCE does
+not read ~/.config/environment.d) to get PATHs.
+
+In .bashrc, enable globstar and autocd, uncomment grep and ls aliases,
+source personal .bash_prompt.
+
+Fun fact! git can guess user.email from $EMAIL and user.name from the
+[[https://en.wikipedia.org/wiki/Gecos_field][GECOS field]].
+
+** Install Emacs packages
+- Comment out .emacs below (load custom-file)
+- (package-refresh-contents)
+- (package-install-selected-packages)
+
+** Configure XFCE
+*** Thunar
+**** Enable GVFS
+- apt install gvfs-backends gvfs-fuse
+- thunar > Edit > Preferences > Advanced > Volume Management > Configure
+ - [X] Mount removable dries when hot-plugged
+ - [X] Mount removable media when inserted
+ - [ ] Browse removable media when inserted
+**** View
+- Side Pane: Tree
+- View as Detailed List
+*** Terminal
+**** General
+- Scrollbar is: Disabled
+- [X] Unlimited scrollback
+**** Appearance
+- [X] Use system font
+- [ ] Display menubar in new windows
+**** Advanced
+- [X] Disable all menu access keys (such as Alt-f) /for readline/
+- [X] Disable help window shortcut key (F10 by default) /for wavemon/
+- [X] Automatically copy selection to clipboard
+
+*** Mouse and Touchpad
+- Move sliders a bit to no avail, restore defaults.
+- Google around.
+- Why do my XFCE settings not have this "Touchpad" tab?
+- apt install xserver-xorg-input-synaptics
+- Log out and in again.
+- Woah the pointer is much faster now.
+- And the "Touchpad" tab is here now!
+ - [X] Tap touchpad to click
+ - Scrolling mode: Edge scrolling
+🎉
+
+*** Panels
+**** Top panel
+Row size: 24px
+Items:
+- Applications Menu
+ - [X] Show application description in tooltip
+ - [ ] Show button title
+- Window Buttons:
+ - [ ] Show button labels
+ - [ ] Show handle
+- Workspace switcher:
+ - [ ] Show miniature view
+- Clock: Custom format: =%d %b %R=
+- PulseAudio Plugin
+- Power Manager Plugin: add
+ - Show label: None
+- Action Buttons: remove
+**** Remove bottom panel
+I'd rather remember a few Super-… shortcuts to launch these
+applications rather than waste all this vertical space.
+
+*** Workspaces
+Set names to 🖵.
+
+*** Appearance
+**** Style
+Greybird
+
+Patch the xfwm-tabwin style to prevent the mouse from screwing with
+Alt-Tab:
+
+#+BEGIN_SRC diff
+diff -u /usr/share/themes/Greybird/gtk-2.0/gtkrc.bkp /usr/share/themes/Greybird/gtk-2.0/gtkrc
+--- /usr/share/themes/Greybird/gtk-2.0/gtkrc.bkp
++++ /usr/share/themes/Greybird/gtk-2.0/gtkrc
+@@ -897,8 +897,8 @@
+
+ bg[NORMAL] = shade (0.15, @text_color)
+ bg[ACTIVE] = shade (0.65, @selected_bg_color)
+- bg[PRELIGHT] = shade (0.75, @selected_bg_color)
+- bg[SELECTED] = shade (0.55, @bg_color)
++ bg[PRELIGHT] = shade (0.55, @bg_color)
++ bg[SELECTED] = shade (0.75, @selected_bg_color)
+
+ fg[NORMAL] = shade (0.8, @base_color)
+ fg[ACTIVE] = @base_color
+#+END_SRC
+**** Icons
+elementary Xfce darker
+**** Fonts
+- Default Font: Noto Sans 9
+- Default Monospace Font: Noto Mono 9
+- Hinting: Slight
+- Sub-pixel order: RGB (trusting the [[http://www.lagom.nl/lcd-test/subpixel.php][Lagom LCD test pages]] here,
+ changing the setting has no visible effect AFAICT…)
+
+*** Window manager
+**** Style
+- Theme: Greybird-compact
+**** Keyboard
+- Tile window to the left: Super+Left
+- Tile window to the right: Super+Right
+- Show desktop: Super+D
+*** Window manager tweaks
+**** Cycling
+- [X] Cycle through windows in a list
+**** Accessiblity
+- [X] Hide title of windows when maximized
+**** Compositor
+- [ ] Show shadows under dock windows
+
+*** Keyboard
+**** Application Shortcuts
+- emacs: Super+E
+- exo-open --launch FileManager: Super+F
+- exo-open --launch TerminalEmulator: Super+T
+- exo-open --launch WebBrowser: Super+W
+- xfce4-screenshooter: Print
+- xfce4-screenshooter --fullscreen: Shift+Print
+- xfce4-screenshooter --region: Control+Print
+- xfce4-screenshooter --window: Super+Print
+- xfce4-session-logout: Super+X
+- xflock4: Super+L
+
+** Install more stuff
+aspell-fr ffmpeg gimp vlc wordnet
+*** CLI tools
+mlocate ripgrep vim
+*** documentation
+info manpages-dev manpages-posix manpages-posix-dev gcc-doc make-doc python3-doc tar-doc
+
+#+BEGIN_QUOTE
+E: Package 'gcc-doc' has no installation candidate
+#+END_QUOTE
+
+gcc-doc is only available in the /backports/?
+*** Emacs 27 build dependencies
+- build-dep emacs
+- libjansson-dev libwebkit2gtk-4.0-dev
+*** system monitoring
+htop powertop wavemon
+** Configure more stuff
+*** lightdm
+Debian [[https://wiki.debian.org/LightDM#Enable_user_list][hides the list of users]] on the login screen; Bunsenlabs [[https://github.com/BunsenLabs/bunsen-configs/blob/9.6-1/lightdm.conf.d/50_bunsen.conf][enables
+it]] and I kind of like it (fewer keystrokes, and a cute avatar).
+
+#+BEGIN_SRC sh
+$ sudo tee /usr/share/lightdm/lightdm.conf.d/99_custom.conf <<EOF
+> [Seat:*]
+> greeter-hide-users=false
+> EOF
+#+END_SRC
+*** groups
+adduser ${USER} adm, so that I can read /var/log files.
+adduser ${USER} dialout, so I can sync my phone.
+** Setup Firefox
+- download most recent release from from <https://www.mozilla.org>
+- unpack it $SOMEWHERE
+- make sure everyone can find it:
+
+ #+BEGIN_SRC sh
+ $ sudo update-alternatives --install $(which x-www-browser) x-www-browser \
+ ${SOMEWHERE}/firefox/firefox 1
+ $ sudo update-alternatives --set x-www-browser ${SOMEWHERE}/firefox/firefox
+ $ ln -s ${SOMEWHERE}/firefox/firefox ~/.local/bin/
+ #+END_SRC
+
+- paste backuped configuration into ~/.mozilla/firefox/${profile}
+* Someday
+** fix xfce4-terminal opening links with firefox-esr
+** fix Thunar opening images with Firefox instead of Ristretto
+** fix Ristretto thumbnails
+** setup fonts
+#+BEGIN_SRC html
+<head>
+ <meta charset="utf-8"/>
+</head>
+<body>
+ 😀 😬 😁 😂 😃 😄 😅 😆 😇 😉 😊 🙂 🙃 ☺️ 😋 😌 😍 😘
+</body>
+#+END_SRC
+
+- apt install fonts-noto-color-emoji
+- mousepad and xfce4-terminal seem to pick the font up out of the box
+- Firefox 69 displays ☺ with DejaVu Sans Mono
+- Emacs 27 with =(set-fontset-font t nil "Noto Color Emoji")= and
+ use-default-font-for-symbols nil can display everything with Noto
+ Color Emoji