Add game to steam (flatpak)
I’m trying to add my games to steam, both steam and heroic are installed with flapaks. When I click add to steam it doesn’t appear even after a refresh. I assume that’s because the two applications are sandboxed. I tried changing the default steam path but that didn’t work. Is there a way to get this functionality or is it impossible in flatpak?
28 Replies
flat-fuchsia•2y ago

flat-fuchsia•2y ago
you didn't state what you changed this to
fascinating-indigoOP•2y ago
Oh right on, I set that to
/var/home/user/.var/app/com.valvesoftware.Steam/.steam/steam
because that is (I think) the equivilent directory inside of the flatpak
I also just tried the heroicbashlauncher but it failed with FileNotFoundError: [Errno 2] No such file or directory: '/var/home/user/.steam/steam/userdata'
. My guess is thats where steam files go if steam is installed through a package manager and not flatpak. This leads me to believe that heroic is trying to add a game to steam while assuming that steam is in it's regular place.
Is there a way to change where heroic thinks steam is and give it permission to edit that?flat-fuchsia•2y ago
What I do is have
~/.steam
store symlinks despite using the flatpak.
Make ~/.steam
first, then copy the contents of the corresponding folder, which should be all symlinksfascinating-indigoOP•2y ago
I symlinked the two directories but the add to steam button still doesn't work, is the bash launcher required to add games between flatpaks?
flat-fuchsia•2y ago
is
~/.steam
a symlink or an actual folder?
you do not need bash launcherfascinating-indigoOP•2y ago
A symlink, I linked
/var/home/user/.var/app/com.valvesoftware.Steam/.steam
to /var/home/user/.steam
flat-fuchsia•2y ago
delete it,
mkdir ~/.steam
insteadfascinating-indigoOP•2y ago
Alright
flat-fuchsia•2y ago
then copy the contents of
~/.var/app/com.valvesoftware.Steam/.steam
into ~/.steam
fascinating-indigoOP•2y ago
Done
But that won't be updated with steam right?
flat-fuchsia•2y ago
what do you mean?
the contents of
.../.steam
are just symlinksfascinating-indigoOP•2y ago
Ah ok
Why couldn't I symlink
~/.var/app/com.valvesoftware.Steam/.steam
to ~/.steam
though?flat-fuchsia•2y ago
there's a bwrap error that hasn't been resolved yet when you do that
fascinating-indigoOP•2y ago
and now I can also change my default steam path in heroic to ~/.steam right?
flat-fuchsia•2y ago
yeah restore it to
/home/user/.steam/steam
fascinating-indigoOP•2y ago
I see that bwrap error, heroic won't launch anymore
bwrap: Can't bind mount /oldroot/var/home/user/.steam on /newroot/var/home/user/.steam: Unable to mount source on destination: No such file or directory
I assume I can just reinstall
I couldnt open heroic until I deleted the ~/.steam directory copying didn't help
Any time I create a ~/.steam directory heroic won't open, bwrap error
Ok even more weirdness, I set my steam path back to ~/.var/app/com.valvesoftware.Steam/.steam/steam
and then added the game to steam. After I rebooted my whole computer the game appears in steam but will not launch, it also can't be removed through heroics "remove from steam" button
@termdisc where does heroic create the shortcut, I want to see if it’s actually being made right?flat-fuchsia•2y ago
first issue will require some manual intervention
it's in the shortcuts.vdf file. I don't recall the exact path right now
so typically Heroic will add the shortcut to steam with
flatpak
being the target and launch arguments being run heroic://...
what you need to do is first run flatpak --user override --talk-name=org.freedesktop.Flatpak com.valvesoftware.Steam
in a terminal
then, change the target to be flatpak-spawn
and add --host flatpak
before run ...
fascinating-indigoOP•2y ago
My default launch arguments look like
run com.heroicgameslauncher.hgl --no-gui --no-sandbox "heroic://launch/legendary/Boga"
I changed the target and launch options but there was no change, it doesn't launch
I also checked that it could launch through heroic just to be safeflat-fuchsia•2y ago
after setting the flatpak override, did you restart Steam entirely?
fascinating-indigoOP•2y ago
No, I just did though, now it starts and says it's running but no window launches
I found an error
A uncaught exception occured: Error: write EPIPE
flat-fuchsia•2y ago
can you show your Steam properties window for the shortcut?
fascinating-indigoOP•2y ago

flat-fuchsia•2y ago
is Heroic already actively running when you try running that?
fascinating-indigoOP•2y ago
Yes
But it closes when I run the game on steam
flat-fuchsia•2y ago
you don't want it running when you call it from Steam
ambitious-aqua•2y ago
Actually we should detect steam flatpak path
The problem here is that steam flatpak needs to have permission to run heroic flatpak
Probably you can set that via flatseal
We cannot add this automatically because it is the steam permissions not heroic
fascinating-indigoOP•2y ago
I understand that, I'm pretty new to flatpaks, would giving steam permission to access
~/.var/com.heroicgameslauncher.hgl
be the permission I'm looking for
I don't see anywhere in flatseal I can give permission to the app itself
It is not that