Knowlish (Overflow)

Stuff that I barely understand that I came across that I want to keep around

By @MonoidMusician

Basically a record of information Iʼve come across. Provided without warranty or commentary. Just some pointers to things that worked on my systems. If you want to try these things out, youʼll have to follow the pointers to understand where they could apply and what they do and what are the risks, &c. (Tbh most of the risks are pretty low. But itʼs good to know how to roll it back in any case!)

SysAdmin

Wake on LAN

Enable in BIOS/UEFI.

Enable in Fedora(?):

sudo nmcli connection show

sudo nmcli connection show "Wired connection 1"

sudo nmcli connection modify "Wired connection 1" 802-3-ethernet.wake-on-lan magic

[source] [source] [docs]

sudo nmcli connection modify $YOURSSID 802-11-wireless.wake-on-wlan magic (did not work for me)

[docs]

ifconfig
wakeonlan (maybe brew install wakeonlan)
wakeonlan xx:xx:xx:xx:xx:xx
Dismiss (GNOME?) login screen
# Lock
dbus-send --session --dest=org.gnome.ScreenSaver --type=method_call --print-reply --reply-timeout=20000 /org/gnome/ScreenSaver org.gnome.ScreenSaver.SetActive boolean:true

# Unlock
dbus-send --session --dest=org.gnome.ScreenSaver --type=method_call --print-reply --reply-timeout=20000 /org/gnome/ScreenSaver org.gnome.ScreenSaver.SetActive boolean:false

[source] [source]

mDNS (.local addresses)

Add search company.local to /etc/resolv.conf to get subdomains app.company.local [source]

https://serverfault.com/questions/211982/adding-more-than-one-local-address-using-osx-bonjour
https://andrewdupont.net/2022/01/27/using-mdns-aliases-within-your-home-network/
bind mounts

/etc/fstab and sudo mount -a

https://apple.stackexchange.com/questions/197029/how-do-you-mount-bind-a-local-directory

Disadvantage of fuse is that it do not support inotify events

https://jcol.me/2019/12/20/bind-mounting-on-macos/
disk image mounts

sudo losetup --partscan --find --show YOURIMAGE.img /dev/loop0

https://superuser.com/questions/117136/how-can-i-mount-a-partition-from-dd-created-image-of-a-block-device-e-g-hdd-u#answer-684707

Samba

https://docs.fedoraproject.org/en-US/quick-docs/samba/

Note: [share] in /etc/samba/smb.conf is the name of the share, visible over the network.

SSH

Keepalive:

  • ssh -o "ServerAliveInterval 60" -o "ServerAliveCountMax 120" yourserver to override for a single session
  • Or add to ~/.ssh/config

Nice things

Why canʼt Firefox have nice codecs?