Flameshot fails to run on Ubuntu Wayland
Needed to create a wrapper for Flameshot on Ubuntu Wayland in order to work.
I use the folder ~/bin for general scripts, which is on the path. Created file called flameshot-wrapper.sh.
File content:
#!/bin/bash
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
export QT_QPA_PLATFORM=wayland
export WAYLAND_DISPLAY=wayland-0
export XDG_RUNTIME_DIR=/run/user/$(id -u)
else
export DISPLAY=:0
export XAUTHORITY=$HOME/.Xauthority
fi
/usr/bin/flameshot gui
Don’t forget….
chmod +x flameshot-wrapper.sh
Then create a system keyboard shortcut to flameshot-wrapper.sh. I used Ctrl + Shit + S.