bash/usr-local-bin: add vlc-snap as a proof of concept

This commit is contained in:
Aminda Suomalainen 2024-02-25 13:17:51 +02:00
parent 440c92fc57
commit 054f54a4c3
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
1 changed files with 10 additions and 0 deletions

10
bash/usr-local-bin/vlc-snap Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -x
if [ -f /snap/bin/vlc ]; then
# https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1951491/comments/105
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus
snap run vlc $@
else
/usr/bin/vlc
fi
set +x