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

Wrap with flatpak not working #358

Open
NL-TCH opened this issue Jun 18, 2024 · 14 comments
Open

Wrap with flatpak not working #358

NL-TCH opened this issue Jun 18, 2024 · 14 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@NL-TCH
Copy link

NL-TCH commented Jun 18, 2024

Ludusavi version

v0.24.1

Operating system

Linux

Installation method

Flatpak

Description

The launch command flatpak run com.github.mtkennerly.ludusavi wrap --infer steam --gui -- %command% is not working.
When games are launched with this flag the game will not launch

Logs

No response

@NL-TCH NL-TCH added the bug Something isn't working label Jun 18, 2024
@mtkennerly
Copy link
Owner

Hi! Could you share your Ludusavi log file? For Flatpak, it would be: ~/.var/app/com.github.mtkennerly.ludusavi/config/ludusavi/*.log

Also, could you try with a standalone copy of Ludusavi just to rule out any Flatpak-specific issues?

@NL-TCH
Copy link
Author

NL-TCH commented Jun 19, 2024

Hi,

the logs are empty (only old logs)

image

can i download ludusavi rpm from somewhere, or do i need to compile it myself?

@mtkennerly
Copy link
Owner

You can download a standalone executable from the releases page. Here's the latest Linux release:

https://github.com/mtkennerly/ludusavi/releases/download/v0.24.1/ludusavi-v0.24.1-linux.zip

To point it at your Flatpak Ludusavi config, you can add the --config argument:

/path/to/ludusavi --config ~/.var/app/com.github.mtkennerly.ludusavi/config/ludusavi wrap --infer steam --gui -- %command%

Just to confirm, is ludusavi_rCURRENT.log also an old one? If so, that implies Steam isn't even able to launch Ludusavi, which does probably sound like some Flatpak permissions thing (even more so if Steam itself is in a Flatpak as well).

@njdom24
Copy link

njdom24 commented Jul 23, 2024

Seeing the same behavior on NixOS. Running steam via terminal and running a game with ludusavi in the launch options also seemingly doesn't output anything.

@mtkennerly
Copy link
Owner

@njdom24 Could you try the test I mentioned in #358 (comment) ?

@njdom24
Copy link

njdom24 commented Aug 1, 2024

Still no good, I'm afraid. For what it's worth, both my system package, and the standalone binary you linked can run from Steam's launch options (e.g. ludusavi && %command%), but once wrap --gui is involved, it fails instantly without logging. Removing --gui does produce a log with the expected "not a terminal" error.

The nixpkg for Ludusavi does contain zenity and kdialog as dependencies, and I was able to confirm the dialog works outside of Steam.

@mtkennerly
Copy link
Owner

Thanks for checking. I'm not sure why it's not working, but I'll try to set up a system with Flatpak and see if I can figure something out.

@NL-TCH
Copy link
Author

NL-TCH commented Sep 27, 2024

Hey @mtkennerly,
Any update on this?

@mtkennerly
Copy link
Owner

mtkennerly commented Sep 30, 2024

@NL-TCH Hey, I finally set up a system to test this on. I did fix a couple of related issues (--infer steam using the wrong case to find the env var, and --force potentially hanging while waiting for input), but I haven't managed to figure out why --gui doesn't work yet. From the logs, Ludusavi tries to show the dialog, but it thinks that the user immediately selects no. It happens even with a standalone copy of Ludusavi, so it's not exclusively a Flatpak issue. I'll do some more testing and maybe explore alternative dialog options if needed.

If you're interested in the other fixes, you can try this build: ludusavi-v0.25.0-post.15+b2926a4-linux.zip

@NL-TCH
Copy link
Author

NL-TCH commented Nov 4, 2024

hi @mtkennerly thanks for updating the app, very much appreciated!

with last weeks update, the wrap for flatpak still does not work, but at least i have a log message when launching CompanyOfHeroes2:

[2024-11-04T20:07:59.354Z] WARN [ludusavi::prelude] failed to walk: Some("/home/tch/.local/share/feral-interactive/CompanyOfHeroes2/Application") | Error { depth: 1, inner: Io { path: Some("/home/tch/.local/share/feral-interactive/CompanyOfHeroes2/Application"), err: Os { code: 2, kind: NotFound, message: "No such file or directory" } } }

The non-flatpak version does seem to work but with some quirks:
/home/tch/Downloads/ludusavi wrap --infer steam --gui -- %command%
image

@mtkennerly
Copy link
Owner

Thanks for the extra info 👍 That seems promising.

That   formatting is related to native-dialog-rs/native-dialog-rs#41 . I thought we could avoid that issue by sticking to version 0.6.3 of native-dialog-rs, but apparently not. I think it may be best to switch to another dialog library. This is still on my list to continue testing :)

@mtkennerly
Copy link
Owner

I've switched the dialogs from native-dialog to rfd. That should fix the potential   display issues. However, the Flatpak version can't seem to find the game executable. For example, this is the full command for launching Celeste:

/home/ubuntu/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=504230 -- /home/ubuntu/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- /home/ubuntu/.local/share/Steam/steamapps/common/Celeste/./Celeste

...and here is a minimal example of failing to launch:

$ flatpak run com.github.mtkennerly.ludusavi wrap --force --name Celeste -- /home/ubuntu/.local/share/Steam/ubuntu12_32/reaper
Game failed to launch.
Error: No such file or directory (os error 2)

I've tried a few combinations of --filesystem=host and --user, but I haven't found a way to make it work 😞 For now, I think I'll just make a note in the documentation that wrap works best with a standalone copy of Ludusavi.

@NL-TCH If you'd like to test it before the next release, here's a build you can use:

  • Standalone: ludusavi-v0.26.0-post.11+c8f04ac-linux.tar.gz
  • Flatpak:
    flatpak remote-add --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo
    flatpak install flathub-beta com.github.mtkennerly.ludusavi
    flatpak run com.github.mtkennerly.ludusavi//beta
    

When I tested the Flatpak build, I ran into flatpak/flatpak#3521 , but it seems to just be a benign log message without any impact on the functionality. Not sure if there's a way to silence the log message. I tried setting --env=GTK_MODULES="" and --unset-env=GTK_MODULES, but that didn't affect it.

@mtkennerly mtkennerly added the help wanted Extra attention is needed label Nov 7, 2024
@NL-TCH
Copy link
Author

NL-TCH commented Nov 7, 2024

Thanks, the new library for the native BETA (non-flatpak) version seems to be working:
image

the flatpakversion however (beta) does not launch games without any log

image

@mtkennerly
Copy link
Owner

Thanks for testing!

I'll leave this open in case someone who's more knowledgeable about Flatpak can figure out why it doesn't work 😅 I'm not sure what else to try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants