Lutris and Flatpak-ed Steam? [SOLVED]

I’ve had some issues with Steam package provided by my distro of choice and thus I’ve decided to use Flatpak (package provided by Flathub). And so far it seems that it was a great choice - all my issues with incorrectly linked libraries are gone, super stable and smooth experience.
The only issue I have is that Lutris does not support such setup. While it shows the games from my Steam folder it displays “steam not installed” type of error when I try to start them via Lutris menu.
Is there a way to set Lutris up so it will launch games via Flatpak Steam?

2 Likes

As you already said Lutris doesn’t support Steam over flatpak. But you can try synchronizing your desktop games with Lutris (Lutris->Import Games->Click the Sync button at “Desktop Games”). After a restart it should show your flatpak Steam in your library and enable you to launch it.

that does nothing sadly :frowning: . I’m getting " required runner not installed" message and that’s it.
And the problem is not that the games are not showing up in the library - they do. But I can’t start them via Lutris.

Maybe there’s a way to copy and modify runner existing runner / crate new one that would start the games with
“flatpak run com.valvesoftware.Steam %appid%”
rather than:
“steam %appid%”

Just a thought. I love Lutris and would love to have my whole games library handled by Lutris.

edit: or maybe some sort of symlink would solve the issue?

Does it show these games as installed (If they are not installed the banners will be greyed out). If not, and I think that’s the case for you, it is easier to launch the Steam app itself and then launch the games via Steam and not directly in Lutris.

If Lutris does actually show the games as installed for you, and just launching them does not work, you can try creating a file called steam with the following content:

#!/bin/bash
flatpak run com.valvesoftware.Steam “$@”

then do chmod +x steam and then sudo mv steam /usr/bin/steam. With this method you may be able to launch Steam and steam games, but it still is unsupported. You may run into a lot of issues and unexpected behaviour, which is why I’d still recommend you to just launch Steam and launch your steam games from there.

3 Likes

thx, works like a charm - the missing ingredient for me was passing the variable using “$@” . Didn’t know it is doable this way. THANK YOU!

edit: and as you might have already guessed the games do show up even though I’m using Steam through Flatpak :slight_smile: (which is quite interesting).

edit2: ok, after further investigation it’s a bit weirder than I thought. I’ve noticed not all Steam games I have installed are discovered. It seems only those that I’ve added before switching to Flatpak are being shown (even though I’ve moved all the game data files to the folder Flatpak version uses).
So the question now changed to - is there a way to make Lutris discover the newly added titles as well?
Is Lutris simply reading reigstry.vdf? If so I could just symlink the file from flatpaked version.

edit3: figured it out. I’ve just had to create symlink pointing to directory Flatpak uses in ~/.local/share and now all works as expected. Awesome :slight_smile: !

1 Like

Thank you too! When I looked for a solution to this I couldn’t figure out how to sync flatpak steam games with Lutris (Which is why I warned about unexpected behaviour). Symlinking .local/share/Steam in the flatpak directory to ~/.local/share/Steam actually worked great!

3 Likes

I must report one problem. When launching game with flatpaked Steam and flatpaked Steam are running, only message about importing data is displayed and that’s all. Game not ran!

Am I doing something wrong, there’s flatpak bug or com.valvesoftware.Steam (from flathub) problem? Or maybe lutris problem (I think there’s no lutris problem, but better ask)?

ok, so I’m trying it out on a fresh system with Lutris 0.5.5 and I’m a bit stuck. Creating steam executable file in /usr/bin/steam allow to open steam from Lutris.
But I can’t get Lutris to discover games installed through flatpaked Steam. I made the symlinks and unless I’ve screwed something up it is not working this time. Has anything changed?
Where does Lutris look for those games? Which file/folder is used to discover installed Steam games and where Lutris is looking for it?

Ok run lutris with steam flatpak here is how it goes:
ln -s ~/.var/app/com.valvesoftware.Steam/.local/share/Steam ~/.local/share/Steam
ln -s ~/.var/app/com.valvesoftware.Steam/.steam ~/.steam

nano ~/.local/bin/steam
add the following conntent:
#!/bin/bash
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/bin/steam-wrapper com.valvesoftware.Steam “$@”

chmod +x ~/.local/bin/steam

hope i could helped

1 Like

Was your symlink a “soft link” or a “hard link”?
I tried creating a soft symlink from my flatpack .local/share/Steam directory to my /home/user/.local/share directory and it still isn’t syncing.

Edit:
Never mind, irgenwas showed that he created a soft symlink from ~/.var/app/com.valvesoftware.Steam/.steam to ~/.steam in the “home” directory.

Lutris is syncing for me now. Thank you.

Updating for December 2023 - per How to import Flatpak Steam as an source - you don’t need to make the ~/.local/bin/steam part anymore.

As far as I can see, Lutris uses xdg-open to pass through the Steam url to a Steam .desktop file (it finds exactly the name Steam however so note if you’ve changed that or have multiple Steam installs).

ln -s ~/.var/app/com.valvesoftware.Steam/.steam .steam still needed to be done manually it seems but Lutris now comes with ~/.var/app/com.valvesoftware.Steam:ro by default, so that seems to be the only thing you need to manually do now.