You are not logged in.

#1 2024-12-09 16:57:33

FrancisArcher_60
Member
Registered: 2024-09-05
Posts: 58

[SOLVED]xdg-desktop-portal-gnome services don't work

I'm using a X11 session with Qtile. I'm trying to setup the gnome and gtk backends, but the services don't work correctly.

systemctl --user enable xdg-desktop-portal 

The unit files have no installation config (WantedBy=, RequiredBy=, UpheldBy=,    
Also=, or Alias= settings in the [Install] section, and DefaultInstance= for      
template units). This means they are not meant to be enabled or disabled using systemctl.                                                                           
                                                                                  
Possible reasons for having these kinds of units are:                             
• A unit may be statically enabled by being symlinked from another unit's         
  .wants/, .requires/, or .upholds/ directory.                                    
• A unit's purpose may be to act as a helper for some other unit which has        
  a requirement dependency on it.                                                 
• A unit may be started when needed via activation (socket, path, timer,          
  D-Bus, udev, scripted systemctl call, ...).                                     
• In case of template units, the unit is meant to be enabled with some            
  instance name specified.
systemctl --user status xdg-desktop-portal

Dec 09 12:56:54 Archer xdg-desktop-por[754]: Backend call failed: Could not activate remote peer 'org.freedesktop.impl.portal.desktop.gnome': startup job failed
systemctl --user start xdg-desktop-portal-gnome

A dependency job for xdg-desktop-portal-gnome.service failed. See 'journalctl -xe' for details. 
journalctl -xe

Dec 09 13:44:32 Archer systemd[443]: xdg-desktop-portal-gnome.service: Job xdg-desktop-portal-gnome.service: Job xdg-desktop-portal-gnome.service/start failed with result 'dependency'.
 
systemctl --user start xdg-desktop-portal-gtk

Job for xdg-desktop-portal-gtk.service failed because the control process exited with error code.
systemctl --user status xdg-desktop-portal-gtk

Dec 09 13:52:56 Archer systemd[443]: Starting Portal service (GTK/GNOME implementation)...
Dec 09 13:52:56 Archer xdg-desktop-por[10083]: cannot open display: 
Dec 09 13:52:56 Archer systemd[443]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status1/FAILURE
Dec 09 13:52:56 Archer systemd[443]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'
Dec 09 13:52:56 Archer systemd[443]: Failed to start Portal service (GTK/GNOME implementation).

Last edited by FrancisArcher_60 (2024-12-09 19:52:48)

Offline

#2 2024-12-09 17:27:05

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED]xdg-desktop-portal-gnome services don't work

It's a dbus service so it's started on demand rather than enabled explicitly.

Add this command to an autostart hook for Qtile:

/usr/lib/xdg-desktop-portal-gnome &

^ That's what the Exec line in /usr/share/applications/xdg-desktop-portal-gnome.desktop uses.


Jin, Jîyan, Azadî

Offline

#3 2024-12-09 17:49:47

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,681

Re: [SOLVED]xdg-desktop-portal-gnome services don't work

nb. that xdg-desktop-portal-gnome doesn't properly (or at all) work outside gnome and is therefore filtered for that environment.
Why are you trying to use it?

Starting the gtk daemon is, as HoaS pointed out, not supposed to be your job and failed because

Dec 09 13:52:56 Archer xdg-desktop-por[10083]: cannot open display: 

it probably lacks the session environment this way what brings us to the bottom of this:

How do you start qtile and if it's startx/xinit, see the last link below.

Offline

#4 2024-12-09 17:59:51

FrancisArcher_60
Member
Registered: 2024-09-05
Posts: 58

Re: [SOLVED]xdg-desktop-portal-gnome services don't work

I need portals like the file chooser for some applications, I set XDG_CURRENT_DESKTOP=GNOME even though I don't have a DE installed

Offline

#5 2024-12-09 18:09:59

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,681

Re: [SOLVED]xdg-desktop-portal-gnome services don't work

The gnome portal implementation will still act up w/o mutter anf gnome-session.
What's wrong w/ the gtk one?

Again: you're not supposed to start any of this manually and please address the xinitrc situation.

Offline

#6 2024-12-09 18:17:36

FrancisArcher_60
Member
Registered: 2024-09-05
Posts: 58

Re: [SOLVED]xdg-desktop-portal-gnome services don't work

.xinitrc:

picom &
nitrogen --restore &
qtile start

Offline

#7 2024-12-09 18:19:48

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,681

Re: [SOLVED]xdg-desktop-portal-gnome services don't work

Yeah, last link below, 2nd blue note about what to include at least.
Don't try to manually start any portal services and rather remove the gnome implementation for the moment (if you desperately want to use that, that would probably be a different issue - and probably not functional, it makes hard assumptions about runnin on gnome)

Offline

#8 2024-12-09 18:21:16

FrancisArcher_60
Member
Registered: 2024-09-05
Posts: 58

Re: [SOLVED]xdg-desktop-portal-gnome services don't work

Previously I used KDE portal in the same way and work it, maybe should use KDE portal instead.

Offline

#9 2024-12-09 18:35:59

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,681

Re: [SOLVED]xdg-desktop-portal-gnome services don't work

Your session is broken and that especially concerns the session bus, which is why the portal service cannot be automatically invoked.
When you were previously using KDE, was that also using startx or maybe SDDM?

Fix your xinitrc, see where this gets you.

Offline

#10 2024-12-09 19:52:25

FrancisArcher_60
Member
Registered: 2024-09-05
Posts: 58

Re: [SOLVED]xdg-desktop-portal-gnome services don't work

Now I installed KDE portal and it works, thanks everyone.

Offline

#11 2024-12-09 20:06:37

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,681

Re: [SOLVED]xdg-desktop-portal-gnome services don't work

Is there a specific reason why you refuse to fix your xinitrc to establish proper logind integration and session bus access and would rather search for an implementation that you can start manually regardless (I guess the KDE one simply guesses the DISPLAY)?

Offline

Board footer

Powered by FluxBB