Lossless screen recording with OBS

TLDR: Import profile (source)


I've always used ffmpeg CLI for screen recording, mostly with x11grab or kmsgrab. But after moving to Wayland and especially after compositors began using 10 bit color by default it became increasingly problematic. OBS turned out to be the only reliably working tool for screen recording …


Expose system policies to Chromium flatpak

(
  sys_policies="/etc/chromium-browser"
  ext_point_id="org.chromium.Chromium.Extension" # Chromium
  #ext_point_id="io.github.ungoogled_software.ungoogled_chromium.Policy" # Ungoogled Chromium
  ext_point="/var/lib/flatpak/extension/${ext_point_id}.system-policies/$(uname -i)/1"

  sudo mkdir -p "$sys_policies"/policies/{managed,recommended} "$(dirname "$ext_point")"
  sudo ln -s "$sys_policies" "$ext_point"
)

References



Secondary subtitles in mpv with a keyboard shortcut

Add this to your user input.conf (usually ~/.config/mpv/input.conf):

Alt+j cycle secondary-sid
Alt+J cycle secondary-sid down

Now Alt + j cycles through secondary subtitles, Alt + J does the same backwards.

Screenshot



virsh-snap.sh: create and revert external libvirt snapshots easily

There are two types of disk snapshots in libvirt: internal and external. Internal snapshots (virsh default) store all data in one file. With external snapshots, base data and snapshot data is stored separately: base disk file is left intact, and all changes are written into a separate snapshot overlay file …


Chromium web apps on KDE Plasma

Chromium has a nice feature letting you make any website behave and look similar to a regular app: have its own icon in app launcher and task bar, and open in a separate window without browser UI. The problem is, on Plasma these web apps still get grouped with each …



Install Shadowsocks proxy on Debian or Ubuntu

Server:

  • Install:
    sudo apt install shadowsocks-libev
  • Restore config from backup if you have one:
    sudo cp -a backup/etc/shadowsocks-libev /etc
    or just:
    sudo tee /etc/shadowsocks-libev/config.json << EOF
    {
        "server":"0.0.0.0",
        "server_port":8388,
        "local_port":1080,
        "password":"<password>",
        "timeout":60,
        "method":"chacha20-ietf-poly1305"
    }
    EOF
    
  • Disable server localhost access …

Connect VM to ZeroTier without ZeroTier client on it

This might be useful to connect e.g. Windows XP to ZeroTier network or other machines which you can't or don't want to install ZeroTier client to.

  1. Create ZeroTier network in control panel and join it on your host

  2. Allow Ethernet bridging for your host in control panel

    ZeroTier Control panel: Allow bridging

  3. In VM …