Launch script to run kscreen-doctor command on game startup erroring out
I am attempting to use a startup script on game launch that scales my screen to 200% using kscreen-doctor. The script functions when executed outside of heroic games launcher, but when heroic games launcher tries to run it itself it produces the following error in the logs:
here is the full script:
I am running Heroic Games Launcher as a flatpak from the bazzite bazaar.
Running script before Avernum: Escape From the Pit (/home/hkr/Games/Heroic/Avernum - Escape From The Pit/scale200.bash)
/home/hkr/Games/Heroic/Avernum - Escape From The Pit/scale200.bash: line 2: kscreen-doctor: command not foundhere is the full script:
#!/bin/bash
kscreen-doctor output.DP-1.scale.2.00I am running Heroic Games Launcher as a flatpak from the bazzite bazaar.
Solution
For those searching for something similar in the future, the solution is to run the script with
In flatseal, you need to add
to the talks section under Session Bus.
flatpak-spawn --host kscreen-doctor [arguments]In flatseal, you need to add
org.freedesktop.Flatpakto the talks section under Session Bus.