Skip to content

Conversation

@Jujstme
Copy link

@Jujstme Jujstme commented Mar 19, 2025

This commit enables the use of the portal API for flatpak builds on linux: https://docs.flatpak.org/en/latest/portal-api-reference.html

Specifically for Unleashed Recompiled, this makes the installer use the native file dialog instead of the default gtk one.

As a collateral, this should fix #553, as the file dialog will avoid using the gtk library altogether, on Plasma. I need the affected people to try this fix, however, as I am not able to reproduce the original bug consistently.

@DarioSamo
Copy link
Contributor

I've tried this before and it didn't work on the Steam Deck in gaming mode. Have you tested it there?

@Jujstme
Copy link
Author

Jujstme commented Mar 19, 2025

Installation in gaming mode doesn't work neither before nor after this.

You still need to complete the installation in desktop mode, as per recommendations

However, instead of flatout crashing, the installer returns a message: No such interface ?org.freedesktop.portal.FileChooser?
I guess this could be managed by returning a message explaining the limitations of steamdeck in gaming mode and requesting the user to switch to desktop in order to complete the installation.

This is unrelated to the crash described by the people in the issue I previously linked, btw.

@DarioSamo
Copy link
Contributor

Installation in gaming mode doesn't work neither before nor after this.

You still need to complete the installation in desktop mode, as per recommendations

I'm aware, but I remember NFD portal not even working even when booting into Desktop mode first. We need to verify that.

@Jujstme
Copy link
Author

Jujstme commented Mar 19, 2025

It works on my steam deck, but people are welcome to test, obviously.

@DarioSamo
Copy link
Contributor

DarioSamo commented Mar 19, 2025

Alright, guess I'll have to re-check then.

Are there any possible downgrades concerning these?

  • The ability to access mounted drives (I have a vague recollection it didn't quite show me all the options I had available on GTK).
  • The ability to select multiple files.
  • The ability to select multiple folders.
  • Text size on the Deck.

@Jujstme
Copy link
Author

Jujstme commented Mar 19, 2025

* The ability to access mounted drives (I have a vague recollection it didn't quite show me all the options I had available on GTK).
* The ability to select multiple files.
* The ability to select multiple folders.

All of those seem to work fine on my end.

* Text size on the Deck.

I'll post a screenshot taken from my deck:
Screenshot_20250319_200042

@DarioSamo
Copy link
Contributor

DarioSamo commented Mar 19, 2025

Thanks, I guess we should get someone in a different DE (e.g. Gnome) to check if it's not too much trouble. I'm using KDE too so I probably won't see much of a difference.

I think as an addendum to this PR, we should probably take the chance to display a friendlier error message considering this won't crash unlike what GTK is currently doing if desktop mode isn't run first.

We could probably display a message like this instead:

Failed to open a file dialog. Make sure a desktop environment is available.\n\nError: %s

%s being the error message from NFD.

We'll need to localize this so we need to finalize this string first before calling the rest for localization, so feel free to suggest a variation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flatpak crash, file access

2 participants