tkashkin / GameHub

All your games in one place
https://tkashkin.github.io/projects/gamehub
GNU General Public License v3.0
2.2k stars 131 forks source link

GameHub wont open nor install/unistall any steam game #642

Open Sylviarill opened 2 years ago

Sylviarill commented 2 years ago
Expected behavior

GameHub should send a command to the steam client in order to have it launch, install or uninstall games with any of the application options (being either Terminal command, double click on the game from GameHub's GUI or choosing the command from the context menu on the game's image (in the GUI as well)

Actual behavior

Steam does see a command being sent to it, but only opens the "Store" tab instead, resulting in no other command working (it being anything, from game launching to install or uninstall it).

Attempting to run the command through Terminal, this is what you get.

user@pop-os:~$ com.github.tkashkin.gamehub --run steam:431730
[FATAL]  uint64_parse: assertion 'str != NULL' failed
[FATAL]  game_hub_utils_fs_utils_find_case_insensitive: assertion 'root != NULL' failed
[INFO]   Starting `Aseprite`
[INFO]   `Aseprite` finished
user@pop-os:~$ steam.sh[23539]: Running Steam on pop 22.04 64-bit
steam.sh[23539]: STEAM_RUNTIME is enabled automatically
setup.sh[23682]: Steam runtime environment up-to-date!
steam.sh[23539]: Steam client's requirements are satisfied

No game launched at the end.

Steps to reproduce

There is no real step to reproduce, it just happens trying to interact with any steam game

Version and environment

It might be optional, but here's also the Kernel: 5.17.5.76051705-generic

I already saw other people issuing a similar behavior time ago, so I made sure to test GameHub using both Steam as flatpak and as a deb installation, there is no change in behavior. Gamehub is also installed as a deb package (both appimage and flatpak wouldn't install on the system). I also tested Steam using its own terminal commands, those work fine so I don't think it is a Steam issue.

ghost commented 2 years ago

Any luck?

Sylviarill commented 2 years ago

Any luck?

Absolutely not.. I have zero idea how to deal with this..

tkashkin commented 2 years ago

Probably something with Steam's .desktop file or mime caches, see #571, #338, #263, #226, #117.

ghost commented 2 years ago

Since this is such a common issue, may I suggest mentioning this somewhere within Gamehub, somehow?

Sylviarill commented 2 years ago

Probably something with Steam's .desktop file or mime caches, see #571, #338, #263, #226, #117.

I found this on my mimeinfo.cache file, same folder as my .desktop file for Steam

[MIME Cache] x-scheme-handler/steam=com.valvesoftware.Steam.desktop; x-scheme-handler/steamlink=com.valvesoftware.Steam.desktop;

Here's the MimeType within the .desktop file MimeType=x-scheme-handler/steam;x-scheme-handler/steamlink;

I guess everything is fine?.. I don't know what to do

tkashkin commented 2 years ago

Does xdg-open steam://rungameid/$id work?

Sylviarill commented 2 years ago

Does xdg-open steam://rungameid/$id work?

No, it opens the store's page.

user@pop-os:~$ xdg-open steam://rungameid/239820 user@pop-os:~$ steam.sh[58863]: Running Steam on pop 22.04 64-bit steam.sh[58863]: STEAM_RUNTIME is enabled automatically setup.sh[59000]: Steam runtime environment up-to-date! steam.sh[58863]: Steam client's requirements are satisfied

Checking my .desktop file, the EXEC does not have any %U so it might be the problem, but I don't know why nor what to do Exec=bash /home/user/.var/app/com.valvesoftware.Steam/.local/share/Steam/steam.sh -no-cef-sandbox

Sylviarill commented 2 years ago

Fixed by editing the .desktop file's EXEC parameter to be Exec=/usr/bin/steam %U like the other .desktop file positioned in the /usr/share/applications directory.

I guess Cinnamon is making the correct files in this other folder instead to use the usual one, that's might be the reason it is so common on mostly Linux Mint installation?

tkashkin commented 2 years ago

There's definitely something weird happening with your .desktop files.

Exec=bash /home/user/.var/app/com.valvesoftware.Steam/.local/share/Steam/steam.sh -no-cef-sandbox should try to run the flatpak Steam installation outside of the sandbox.

That's what I have for flatpak and regular Steam package on fedora:

$ cat /var/lib/flatpak/exports/share/applications/com.valvesoftware.Steam.desktop | grep Exec= | head -n 1
Exec=/usr/bin/flatpak run --branch=beta --arch=x86_64 --command=/app/bin/steam-wrapper --file-forwarding com.valvesoftware.Steam @@u %U @@
$ cat /usr/share/applications/steam.desktop | grep Exec= | head -n 1
Exec=/usr/bin/steam %U
Sylviarill commented 2 years ago

There's definitely something weird happening with your .desktop files.

Exec=bash /home/user/.var/app/com.valvesoftware.Steam/.local/share/Steam/steam.sh -no-cef-sandbox should try to run the flatpak Steam installation outside of the sandbox.

That's what I have for flatpak and regular Steam package on fedora:

$ cat /var/lib/flatpak/exports/share/applications/com.valvesoftware.Steam.desktop | grep Exec= | head -n 1
Exec=/usr/bin/flatpak run --branch=beta --arch=x86_64 --command=/app/bin/steam-wrapper --file-forwarding com.valvesoftware.Steam @@u %U @@
$ cat /usr/share/applications/steam.desktop | grep Exec= | head -n 1
Exec=/usr/bin/steam %U

That's my reaction as well to it. I did have the flatpak one before, but since I saw previous issues stating GameHub did have some issues with flatpak Steam when not installed as a flatpak as well I simply uninstalled it and got the regular deb one instead. My guess is its .desktop file didn't get removed and another one was made instead in the other directory.

The flatpak Steam one had the same issue with GameHub as well, I just assumed it might've been the reason