Closed pchmykh closed 5 months ago
Does xdg-open steam://rungameid/570
work when ran inside your terminal?
Behavior of the app now has been changed. I have no longer any errors, just "Dota 2 launched" notification, but nothing happens. xdg-open steam://rungameid/570
is working, Steam is starting and launching Dota 2 game.
Are you running GNOME Wayland?
I believe yes, ~$ echo $XDG_SESSION_TYPE
returns wayland
.
Debugging information now looking like this:
53:18 - DEBUG: Starting page.kramo.Cartridges v2.8.3 (release)
53:18 - DEBUG: Python version: 3.11.9 (main, Nov 10 2011, 15:00:00) [GCC 13.2.0]
53:18 - DEBUG: Flatpak version: Flatpak 1.15.8
53:18 - DEBUG: Platform: Linux-6.8.8-300.fc40.x86_64-x86_64-with-glibc2.38
53:18 - DEBUG: System: Linux
53:18 - DEBUG: Node: fedora
53:18 - DEBUG: Release: 6.8.8-300.fc40.x86_64
53:18 - DEBUG: Version: #1 SMP PREEMPT_DYNAMIC Sat Apr 27 17:53:31 UTC 2024
53:18 - DEBUG: Machine: x86_64
53:18 - DEBUG: Processor:
53:18 - DEBUG: ─────────────────────────────────────
53:18 - DEBUG: New store game Warsow (flatpak_net.warsow.Warsow)
53:18 - DEBUG: DisplayManager done for flatpak_net.warsow.Warsow
53:18 - DEBUG: New store game Proton 8.0 (steam_2348590)
53:18 - DEBUG: DisplayManager done for steam_2348590
53:18 - DEBUG: New store game Proton Experimental (steam_1493710)
53:18 - DEBUG: DisplayManager done for steam_1493710
53:18 - DEBUG: New store game Steam Linux Runtime 2.0 (soldier) (steam_1391110)
53:18 - DEBUG: DisplayManager done for steam_1391110
53:18 - DEBUG: New store game Proton EasyAntiCheat Runtime (steam_1826330)
53:18 - DEBUG: DisplayManager done for steam_1826330
53:18 - DEBUG: New store game Dota 2 (steam_570)
53:18 - DEBUG: DisplayManager done for steam_570
53:18 - DEBUG: New store game Steam Linux Runtime 3.0 (sniper) (steam_1628350)
53:18 - DEBUG: DisplayManager done for steam_1628350
53:18 - DEBUG: New store game Quake Live (steam_282440)
53:18 - DEBUG: DisplayManager done for steam_282440
53:18 - DEBUG: New store game Steamworks Common Redistributables (steam_228980)
53:18 - DEBUG: DisplayManager done for steam_228980
53:18 - DEBUG: New store game Steam Linux Runtime 1.0 (scout) (steam_1070560)
53:18 - DEBUG: DisplayManager done for steam_1070560
53:20 - INFO: Launching `flatpak-spawn --host /bin/sh -c 'xdg-open steam://rungameid/570'`
53:46 - INFO: Launching `flatpak-spawn --host /bin/sh -c 'xdg-open steam://rungameid/570'`
─────────────────────────────────────
57:14 - DEBUG: Starting page.kramo.Cartridges v2.8.3 (release)
57:14 - DEBUG: Python version: 3.11.9 (main, Nov 10 2011, 15:00:00) [GCC 13.2.0]
57:14 - DEBUG: Flatpak version: Flatpak 1.15.8
57:14 - DEBUG: Platform: Linux-6.8.8-300.fc40.x86_64-x86_64-with-glibc2.38
57:14 - DEBUG: System: Linux
57:14 - DEBUG: Node: fedora
57:14 - DEBUG: Release: 6.8.8-300.fc40.x86_64
57:14 - DEBUG: Version: #1 SMP PREEMPT_DYNAMIC Sat Apr 27 17:53:31 UTC 2024
57:14 - DEBUG: Machine: x86_64
57:14 - DEBUG: Processor:
57:14 - DEBUG: ─────────────────────────────────────
57:14 - DEBUG: New store game Warsow (flatpak_net.warsow.Warsow)
57:14 - DEBUG: DisplayManager done for flatpak_net.warsow.Warsow
57:14 - DEBUG: New store game Proton 8.0 (steam_2348590)
57:14 - DEBUG: DisplayManager done for steam_2348590
57:14 - DEBUG: New store game Proton Experimental (steam_1493710)
57:14 - DEBUG: DisplayManager done for steam_1493710
57:14 - DEBUG: New store game Steam Linux Runtime 2.0 (soldier) (steam_1391110)
57:14 - DEBUG: DisplayManager done for steam_1391110
57:14 - DEBUG: New store game Proton EasyAntiCheat Runtime (steam_1826330)
57:14 - DEBUG: DisplayManager done for steam_1826330
57:14 - DEBUG: New store game Dota 2 (steam_570)
57:14 - DEBUG: DisplayManager done for steam_570
57:14 - DEBUG: New store game Steam Linux Runtime 3.0 (sniper) (steam_1628350)
57:14 - DEBUG: DisplayManager done for steam_1628350
57:14 - DEBUG: New store game Quake Live (steam_282440)
57:14 - DEBUG: DisplayManager done for steam_282440
57:14 - DEBUG: New store game Steamworks Common Redistributables (steam_228980)
57:14 - DEBUG: DisplayManager done for steam_228980
57:14 - DEBUG: New store game Steam Linux Runtime 1.0 (scout) (steam_1070560)
57:14 - DEBUG: DisplayManager done for steam_1070560
57:16 - INFO: Launching `flatpak-spawn --host /bin/sh -c 'xdg-open steam://rungameid/282440'`
─────────────────────────────────────
59:06 - DEBUG: Starting page.kramo.Cartridges v2.8.3 (release)
59:06 - DEBUG: Python version: 3.11.9 (main, Nov 10 2011, 15:00:00) [GCC 13.2.0]
59:06 - DEBUG: Flatpak version: Flatpak 1.15.8
59:06 - DEBUG: Platform: Linux-6.8.8-300.fc40.x86_64-x86_64-with-glibc2.38
59:06 - DEBUG: System: Linux
59:06 - DEBUG: Node: fedora
59:06 - DEBUG: Release: 6.8.8-300.fc40.x86_64
59:06 - DEBUG: Version: #1 SMP PREEMPT_DYNAMIC Sat Apr 27 17:53:31 UTC 2024
59:06 - DEBUG: Machine: x86_64
59:06 - DEBUG: Processor:
59:06 - DEBUG: ─────────────────────────────────────
59:06 - DEBUG: New store game Warsow (flatpak_net.warsow.Warsow)
59:06 - DEBUG: DisplayManager done for flatpak_net.warsow.Warsow
59:06 - DEBUG: New store game Proton 8.0 (steam_2348590)
59:06 - DEBUG: DisplayManager done for steam_2348590
59:06 - DEBUG: New store game Proton Experimental (steam_1493710)
59:06 - DEBUG: DisplayManager done for steam_1493710
59:06 - DEBUG: New store game Steam Linux Runtime 2.0 (soldier) (steam_1391110)
59:06 - DEBUG: DisplayManager done for steam_1391110
59:06 - DEBUG: New store game Proton EasyAntiCheat Runtime (steam_1826330)
59:06 - DEBUG: DisplayManager done for steam_1826330
59:06 - DEBUG: New store game Dota 2 (steam_570)
59:06 - DEBUG: DisplayManager done for steam_570
59:06 - DEBUG: New store game Steam Linux Runtime 3.0 (sniper) (steam_1628350)
59:06 - DEBUG: DisplayManager done for steam_1628350
59:06 - DEBUG: New store game Quake Live (steam_282440)
59:06 - DEBUG: DisplayManager done for steam_282440
59:06 - DEBUG: New store game Steamworks Common Redistributables (steam_228980)
59:06 - DEBUG: DisplayManager done for steam_228980
59:06 - DEBUG: New store game Steam Linux Runtime 1.0 (scout) (steam_1070560)
59:06 - DEBUG: DisplayManager done for steam_1070560
59:08 - INFO: Launching `flatpak-spawn --host /bin/sh -c 'xdg-open steam://rungameid/570'`
01:01 - INFO: Launching `flatpak-spawn --host /bin/sh -c 'xdg-open steam://rungameid/570'`
I mean the game is running on the host so Cartridges really shouldn't have anything to do with this. It's an XWayland issue, but I'm not sure how it could be resolved. What output do you see in the terminal when you run Cartridges via flatpak run page.kramo.Cartridges
and then try to launch the game?
~$ flatpak run page.kramo.Cartridges
root INFO - Launching `flatpak-spawn --host /bin/sh -c 'xdg-open steam://rungameid/570'`
INFO:root:https://github.com/flathub/com.valvesoftware.Steam/wiki
INFO:root:Will set XDG dirs prefix to /home/pchmykh/.var/app/com.valvesoftware.Steam
DEBUG:root:Checking input devices permissions
WARNING:root:Missing permissions for input devices
INFO:root:Overriding TZ to Europe/Minsk
steam.sh[2]: Running Steam on org.freedesktop.platform 23.08 64-bit
steam.sh[2]: STEAM_RUNTIME is enabled automatically
setup.sh[75]: Steam runtime environment up-to-date!
steam.sh[2]: Error: The unofficial Steam Flatpak app requires a correctly-configured desktop
session, which must provide the DISPLAY environment variable to the
D-Bus session bus activation environment.
On systems that use systemd --user, the DISPLAY environment variable must
also be present in the systemd --user activation environment.
This is usually achieved by running:
dbus-update-activation-environment DISPLAY
during desktop environment startup.
For more details, please see:
https://github.com/ValveSoftware/steam-for-linux/issues/10554
/home/pchmykh/.var/app/com.valvesoftware.Steam/.local/share/Steam/steam.sh: line 85: XDG_CURRENT_DESKTOP: unbound variable
Yeah, I cannot reproduce the issue :/
It should inherit DISPLAY from your host, I'm not sure what the problem is here.
I mean I guess you could try running what it recommends, dbus-update-activation-environment DISPLAY
although I have no idea what that does :D
Executing ~$ dbus-update-activation-environment DISPLAY
with further relogin does the trick, but after reboot it comes back.
You should run it on desktop environment startup like it suggests.
I have created and enabled user unit
~$ cat ~/.config/systemd/user/exportingDisplay.service
[Unit]
Description=dbus-update-activation-environment DISPL
[Service]
ExecStart=dbus-update-activation-environment DISPLAY
[Install]
WantedBy=default.target
But it doesn't work for me. I can realize that it isn't Cartridges-related, so maybe you can advise me where I can fill issue? Is it about Steam or maybe Gnome-shell? Not very experienced user here.
If other apps work fine, probably Steam. You could file an issue on https://github.com/ValveSoftware/steam-for-linux/issues
Ah wait, you already did ^^
Not actually, but If you see related opened issue, please share. Thank you for your time!
I have tried to look into this from the Steam side, but from the information available so far, it looks like a problem with Cartridges' use of flatpak-spawn --host
and/or xdg-open
, or with system integration around the way that flatpak-session-helper
is started.
When you get the error message "... must provide the DISPLAY environment variable ...", what that means is that the steam-runtime-check-requirements
tool in the Steam Flatpak app tried to launch a new Flatpak "sub-sandbox" with the equivalent of flatpak-spawn
) (Steam needs to do this for its user interface, for internal technical reasons), and found that in the new sub-sandbox, the DISPLAY
environment variable is not set. This will break the Steam user interface completely, and will also break Proton and the Steam Linux Runtime container runtime framework, which is why steam-runtime-check-requirements
wants to diagnose it early.
If the Cartridges Flatpak app wants to open a steam:
URL on the host system, it would perhaps be more reliable if it used the xdg-desktop-portal interface for opening URLs. The easiest way to access that is to use gtk_show_uri_on_window()
or g_app_info_launch_default_for_uri()
, or their bindings in whatever language is used to implement this project (looks like Python if I'm skim-reading correctly). Those functions are designed to automatically "do the right thing": inside a Flatpak app, they call out to the portal, and in a non-sandboxed app, they run the URL handler directly (in this case that would mean Steam).
Flatpak has two background services that are relevant to these code paths. flatpak-session-helper
is used to implement flatpak-spawn --host
, and flatpak-portal
is used to implement plain flatpak-spawn
(without --host
). For the way that Cartridges launches Steam, both of them need to be working as intended. If you were using gtk_show_uri_on_window()
or g_app_info_launch_default_for_uri()
, then only flatpak-portal
would be in the critical path.
If the Cartridges Flatpak app wants to open a steam: URL on the host system, it would perhaps be more reliable if it used the xdg-desktop-portal interface for opening URLs
It's not doing that because it would create a dissonance between games opened via URI handlers and the rest. From a design POV, all games should launch the same way, eg. via a CLI. Because of that, even if this fixes the issue for Steam games, it won't if something like this ever comes up for other titles anyway.
Also, I have to add that this is not a widespread issue and probably only affects unconventional setups so I am not very concerned with it.
Describe the bug An error occurs when I'm trying to start Steam game: "Check your DISPLAY environment variable and make sure that you have enabled X. If you are running remotely, make sure that you have a remote connection which will allow an X connection. For more information visit https://support.steampowered.com/kb_article.php?ref=4050-WOJB-0608"
To Reproduce Steps to reproduce the behavior:
Expected behavior
Screenshots
Logs
System (please complete the following information):