Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launch games that come from Steam's "Add a Non-Steam Game" feature #51

Open
Guttles opened this issue Apr 1, 2023 · 9 comments
Open
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Guttles
Copy link

Guttles commented Apr 1, 2023

I have Overwatch 2 in Steam as a non steam game, but it runs with proton and all. I would like to be able to launch it from cartridges as well, but I can't seem to do it.

@Guttles Guttles added the enhancement New feature or request label Apr 1, 2023
@Arcitec
Copy link
Contributor

Arcitec commented Apr 2, 2023

We import Steam's own games, not external things added as "non-steam game" inside Steam.

How would this feature work? Does Steam run an external EXE file anywhere on disk using its own Proton as a wrapper?

Does it run native Linux games and apps too?

Is there any MIME protocol in Steam for running externally imported Steam games/apps?

What is the database that contains the list of external Steam games?

All of these issues will have to be researched. Help wanted with the research, since it's an unusual request and we're very busy with high priority features.

@Arcitec Arcitec added help wanted Extra attention is needed good first issue Good for newcomers and removed enhancement New feature or request labels Apr 2, 2023
@Arcitec Arcitec changed the title Launch non steam games Launch games that come from Steam's "Add a Non-Steam Game" feature Apr 2, 2023
@Guttles
Copy link
Author

Guttles commented Apr 2, 2023

Steam can run an .exe with proton, and it is given its own prefix in the compatdata folder. Steam can also run native Linux games, as long as they have an executable or .desktop file to run.

@Arcitec
Copy link
Contributor

Arcitec commented Apr 2, 2023

Keep these things in mind too:

Windows games and apps can be installed via Bottles instead, and then imported via our Bottles support. It is definitely a better way to manage Non-Steam Windows software in general since Bottles makes it trivial to install and tweak Windows software.

Heroic Games Launcher also lets you sideload non-GOG/Epic games, and we already import those sideloaded games. This was possible because Heroic has full MIME launching support for sideloaded games, and a clean JSON library file that we could analyze.

For native Linux games, we will be supporting those via the future .desktop file importing, which means they won't have to be added in Steam.

@Arcitec
Copy link
Contributor

Arcitec commented Apr 2, 2023

Steam can run an .exe with proton, and it is given its own prefix in the compatdata folder. Steam can also run native Linux games, as long as they have an executable or .desktop file to run.

Thanks for that information. If you can dig up which file Steam stores the non-steam library in, and also checking if there is any app identifier that makes those external games launchable OUTSIDE Steam (a way to tell Steam "run that external game"), we might be able to get somewhere with this. There is a risk that Steam lacks any way to launch those games from outside Steam.

You can try right clicking the Non-Steam Game in Steam's library, looking for a "create desktop shortcut/file" option (I think Steam has that option, at least for its own games, but I'm not at the computer), and then looking inside that desktop file to see how Steam launches the external app.

@Guttles
Copy link
Author

Guttles commented Apr 2, 2023

Okay, I will install Overwatch 2 with Bottles then, thanks! Sorry if I didn't do things right, I'm very new to using GitHub.

@Arcitec
Copy link
Contributor

Arcitec commented Apr 2, 2023

@Guttles No worries, you did nothing wrong. :)

And to summarize, you can install those sideloaded games in either Heroic Games Launcher or in Bottles (be sure to add them to Bottles "Library" tab to be able to import them to Cartridges).

The questions about supporting Steam's "non-steam games" remain: Can those games be launched outside Steam (try creating a desktop shortcut to them from inside Steam), and where is the data stored. If it turns out to be simple, we could add the feature.

@v3ceban
Copy link

v3ceban commented Apr 3, 2023

If you open the .desktop file that Steam creates for the game in a text editor, you should find the command that launches the game. You can then add this command to the "Executable" field in Cartridges to launch it from there. It should look something like this steam steam://rungameid/728880

@kra-mo kra-mo added the enhancement New feature or request label Apr 5, 2023
@kra-mo
Copy link
Owner

kra-mo commented Jan 28, 2024

@Klubas
Copy link

Klubas commented Sep 20, 2024

Hey, I've almost got this working. I'm using steam flatpak in ublue's Bluefin to run some heroic games because of steam input and I wanted to launch it through cartridges.

If you're not using flatpaks none of this is needed, of course, so skip for the problems :)

Here is what I did:

  1. In $HOME/bin (or any dir in your $PATH) create a file called steam
#!/bin/bash
flatpak run com.valvesoftware.Steam "$@"
  1. In Flatseal, give steam access to xdg-desktop:rw under "Filesystem" > "Other files"

  2. Also en Flatseal, give steam acces to Desktop under "Persistent" > "Files"

  3. Open steam and choose a game to create a desktop shortcut, it should now create a shortcut under the host Desktop folder, and it will launch because of the steamshortcut created in step 1.

And the problems:

  1. Cartridges can't read .desktop files from the $HOME/Desktop dir so I've moved them to $HOME/.local/share/applications
  2. Cartridges ignore .desktop files with the command steam://rungameid/ so it'll never import it

For this to work we should have a way to differentiate between steam and non-steam desktop entries (the gameid pattern maybe), or Cartridges could check if the steam gameid is already imported, to not import it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants