Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(3 edits) (+1)

Before I get to any point, I just want to let you know that I've fixed the problem on my end, so you don't have to worry anymore xd

First I will write what I did explaining the FileDialog thing, then under that will be the XDG related stuff. But as I said, no need to worry anymore

---

When I cloned the project from GitHub, running it would give me this error:

E 0:00:18:0957   Controller.gd:237 @ show_file_dialog(): Failed to send DBus message: Could not activate remote peer 'org.freedesktop.portal.Desktop': activation request failed: unit is masked
  <C++ Source>   platform/linuxbsd/freedesktop_portal_desktop.cpp:460 @ file_dialog_show()
  <Stack Trace>  Controller.gd:237 @ show_file_dialog()
                 IOManager.gd:122 @ load_ceol_song()
                 IOManager.gd:136 @ <anonymous lambda>()
                 WindowPopup.gd:161 @ <anonymous lambda>()

What I meant with "Godot's FileDialog" is to use the in-game node. So what I did first was make the node via code (`FileDialog.new()` and so on), and wrote some basic logic. At the moment the function only tries to use the native file picker and does nothing if popup_centered() errors out (now, I haven't read the rest of the code related to file dialog, there might be better place of coding the fallback thing xd)


XDG portals are just this "new" standard that helps applications access resources:
- https://wiki.archlinux.org/title/XDG_Desktop_Portal
- https://flatpak.github.io/xdg-desktop-portal/

"Masking out" is essentially stopping the systemd service from ever starting (either on boot or by an application)

I had problems with XDG portals for a while not on my system and never got around on fixing them — until now! You pretty much don't have to do anything really... but a fallback would still be nice tho

(1 edit) (+1)

I appreciate the details and you sorting it out on your end! I still logged in a report based on your comment to GitHub so it can be referenced and perhaps addressed at some point. I also noticed that some XDG backends don’t support file pickers, so perhaps there are affected users who’ve never even disabled the service explicitly.

As for your investigation in the codebase, yes, as I noted disabling the native flag on the FileDialog node is possible as a fallback, however this particular error is not reported by the engine to the script. popup_*() methods don’t return error codes or anything at all. So the only way to detect any problem would be to do it by some secondary tells.

So far I’m thinking about adding an app setting to disable native dialogs as a solution. But I won’t rush for it for now.

Thanks for your report and efforts, and hope you don’t have any more annoyances like that using Bosca :)

Oh the problem isn't if the backend supports the file picker or not, portals just weren't working for me properly. I had this problem when using Chromium for example, where the file dialog would never open. XDG portals should, if the backend doesn't have a file picker, fall back to the system's default one. 

In my case I have moved `.Xauthority` file to a different place (AGES ago), and the portals backend would just refuse to work because it couldn't find the file (and it woulnd't fall back to the default one). I just had to tell the portals where the file was and it started working XD

Also I didn't notice the edit you made, or the fact that `popup_` methods didn't return anything for an exception. My bad on that xd.

I would also probably close or rewrite the github issue you left to something simple like "backup file dialog if system's file dialog breaks". It's not the issue with Godot or the game, but the OS's.

Sorry for getting this lengthy yet again, just trying to explain what's going on so there's no confusion xd

Hey, just wanted to let you know that your report reached the engine team, and the case with disabled XDG portals should be properly handled by a future version of Godot:

https://github.com/godotengine/godot/pull/101812

For Bosca Ceoil I’d still need to do some work to properly support it, when it’s ready, but that shouldn’t be hard.

Thanks again!

Oh nice, thanks for letting me know!