I’m getting used to immutable distros, and having unique challenge with gamescope and flatpak - installing any version (there are few) with flatpak install gamescope doesn’t make them accessible in command line - which gamescope returns none. I can find the flatpak binaries but can’t seem to get it working that way.
On the other hand, layered gamescope works great!
In this case, should i stick to layered anyways because I’d assume that gamescope needs OS access than flatpak allows?
(funny, on other hand, flatpak steam works just fine!)
That depends. I use bazzite not aurora so it differs a little, but hear me out. I got both mangohud and gamescope layered, and it is used basically only by layered steam
I also have flatpaks of heroic and bottles. In these cases I needed to install the newest runtimes of flatpak gamescope (these programs couldn’t find the layered package)
I’ve done my fair amount of miss and matching. For what i understand you need to match runtimes. The best way to find out what you need is to use warehouse
So the way to run the gamescope flatpak is by flatpak run org.freedesktop.Platform.VulkanLayer.gamescope. If your program expects gamescope to exist as an executable, you can just write a script that wraps the flatpak run.
#!/bin/bash
flatpak run org.freedesktop.Platform.VulkanLayer.gamescope "$@"
It should be visible to other programs if you save it as ~/.local/bin/gamescope.
What I’ve been experimenting with is writing a generic wrapper that I make symlinks to for each flatpak I want to expose as an executable. It relies on being able to grep the output of flatpak list to deduce what flatpak should be run.
Saved as ~/.local/bin/flatwrapper;
#!/bin/bash
if [[ "$CONTAINER_ID" ]]; then
# In distrobox
distrobox-host-exec "$0" "$@"
exit $?
fi
app="$(flatpak list --columns=application,name | grep -i -- "${0##*/}" | head -n1 | awk '{ print $1 }')"
if [[ ! "$app" ]]; then
echo "no flatpak installed matching ${0##*/}"
exit 1
fi
exec flatpak run "$app" "$@"
Then just make symlinks of it, like ~/.local/bin/gwenview. The name of the symlink decides what flatpak will be run.
It does its best but is not 100% accurate. If the grep matches more than one flatpak, the topmost one will be used. When it doesn’t work as expected you can just use the other script.
Thank you, i’ve learned a lot! is runtime matching something specific to gamescope, or that works for everything? if so, this is a really big deal in getting flatpaks to see each other in some cases
ah i remember why i stopped this, i get this error
➜ flatpak run org.freedesktop.Platform.VulkanLayer.gamescope bwrap: execvp /bin/sh: No such file or directory
I found some stuff about this but didn’t fully understand what. I wonder if this is why steam, even if on same version as gamescope, fails. Going to poke around some more - thank you for confirming that it should work if platform versions match.
Sure, here’s some background info, i’ve been trying out few things to:
figure out how i feel about aurora (like most defaults, but do miss layered steam + gamescope) vs bazzite
flatpak vs distrobox vs layered installation
In my case, i have desktop PC for gaming and framework 13 laptop for productivity. For gamescope specifically, sticking points (both EgoSoft games lol)
X4 has wayland issues unless it’s running under gamescope with steam
X3FL only runs well under gamescope without steam (to scale game visually)
Currently it seems that bazzite is the way to go, as much as i’d like to use aurora. With bazzite remaining problems are much smaller (like getting steam overlay + gamescope). However i’ll keep trying few more things in next few days - this is mostly been a great learning curve by design!
And I use it from command line with “gamescope (parameters) (game executable)”, which I need for few old games that don’t scale well to “high resolution” (stretch 1280x800 to my screen size)