Run GUI application as a different user

Run kodi as test

xhost +SI:localuser:test
sudo su - test -c "DISPLAY=$DISPLAY kodi"

List OpenWRT/LEDE (OPKG) user-installed packages

Assumes there has been no package updates since system install time, only new packages added.

function opkg_list_user_installed() {
    TS=$(opkg status kernel | grep "Installed-Time:" | grep -oE '[0-9]+')
 
    for pkg in $(opkg list-installed | cut -d ' ' -f 1); do
        ST=$(opkg status $pkg)
        if [ ! $(echo "$ST" | grep 'Installed-Time:' | grep -oE '[0-9]+') -eq $TS ]; then
            if echo "$ST" | grep -q '[S]tatus:.*user'; then
                echo $pkg
            fi
        fi
    done
}

OpenWRT Update all packages

opkg update
opkg upgrade $(opkg list-upgradable | cut -d' ' -f0)

PVC

  $ pvc vm flush-locks Jellyfin
 
  $ sudo rbd list vms
 
  $ sudo rbd lock list vms/jellyfin_disk1
  There is 1 exclusive lock on this image.
  Locker          ID                   Address               
  client.80789691 auto 140104987332272 10.0.0.1:0/3183410785 
 
  $ sudo rbd lock remove vms/jellyfin_disk1 'auto 140104987332272' 'client.80789691'
Print/export