You are not logged in.
Hello,
I recently installed Arch using the wiki install guide and for the most part I've been able to troubleshoot everything. My one issue has been file choosers in applications not launching. I'm using i3 as my window manager, and Dolphin as my file manager. I also have KDE Plasma installed as another desktop environment, but I don't use them in conjunction.
I checked the status of the xdg-desktop-portal-gtk service using systemctl, confirming that the applications are attempting to run XDG.
$ systemctl --user status xdg-desktop-portal-gtk.service
× xdg-desktop-portal-gtk.service - Portal service (GTK/GNOME implementation)
Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal-gtk.service; static)
Active: failed (Result: exit-code) since Wed 2026-05-13 11:01:43 EDT; 16s ago
Invocation: 97f8f5153ee048b9a7e7e7631d521293
Process: 2592 ExecStart=/usr/lib/xdg-desktop-portal-gtk (code=exited, status=1/FAILURE)
Main PID: 2592 (code=exited, status=1/FAILURE)
Mem peak: 2.7M
CPU: 54msMay 13 11:01:43 archjuno systemd[1647]: Starting Portal service (GTK/GNOME implementation)...
May 13 11:01:43 archjuno xdg-desktop-portal-gtk[2592]: cannot open display:
May 13 11:01:43 archjuno systemd[1647]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
May 13 11:01:43 archjuno systemd[1647]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.
May 13 11:01:43 archjuno systemd[1647]: Failed to start Portal service (GTK/GNOME implementation).
I've attempted to reinstall i3 and xdg, to no avail. I've also tried some suggestions to people experiencing similar issues, but those fixes haven't worked. Any suggestions would be greatly appreciated.
Thanks,
Mango
Last edited by mango56 (2026-05-14 20:43:52)
Offline
I use niri and the config file can have an effect also
~> cat .config/xdg-desktop-portal/portals.conf
[preferred]
default=gtk
org.freedesktop.portal.ScreenCast=wlr
org.freedesktop.portal.Screenshot=wlrYou will need to adapt to your wm and installed portals.
pacman -Ss xdg-desktop-portal | grep installed
extra/xdg-desktop-portal 1.20.4-1 [installed]
extra/xdg-desktop-portal-gtk 1.15.3-1 [installed]
extra/xdg-desktop-portal-wlr 0.8.2-1 [installed]I don't know if this is your problem but I have had real issues getting it all to work, and this is the settings that do.
Rlu: 222126
Offline
How are you starting i3? If via .xinitrc you need to make sure you've seen and applied the second note in https://wiki.archlinux.org/title/Xinit#xinitrc so a script gets sourced that sets up the DISPLAY environment variable within your user session context.
Offline
In response to SimonJ:
Apparently I never made a config file for my desktop portal, thank you for pointing that out. Should I create one, or is a default already referenced?
In response to V1del:
I am starting i3 via .xinitrc, and there is indeed a start file that references the 50-system-user.sh file that sets the DISPLAY env var.
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.systemctl --user import-environment DISPLAY ${XAUTHORITY+XAUTHORITY}
if command -v dbus-update-activation-environment >/dev/null 2>&1; then
dbus-update-activation-environment DISPLAY XAUTHORITY
fi
Also I just realized that I'm not experiencing this issue when using Konsole to save files. For reference I was trying to open the file picker in vscodium and librewolf. Could my issue be related to my KDM environment?
Offline
Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855 - in doubt post the xinitrc
May 13 11:01:43 archjuno xdg-desktop-portal-gtk[2592]: cannot open display:means the process cannot see the $DISPLAY environment what should™ not be the case if the environment is properly imported into the session.
Offline
Sorry for the paraphrasing, here's the full xinitrc script.
#!/bin/sh
prefix="/usr"
exec_prefix="${prefix}"
xrdb="xrdb"
xinitdir="/etc/X11/xinit"
xclock="xclock"
xterm="xterm"
twm="twm"
xmodmap="xmodmap"
userresources="$HOME/.Xresources"
usermodmap="$HOME/.Xmodmap"
sysresources="$xinitdir/.Xresources"
sysmodmap="$xinitdir/.Xmodmap"
# merge in defaults and keymaps
if [ -f "$sysresources" ]; then
if [ -x /usr/bin/cpp ] ; then
"$xrdb" -merge "$sysresources"
else
"$xrdb" -nocpp -merge "$sysresources"
fi
fi
if [ -f "$sysmodmap" ]; then
"$xmodmap" "$sysmodmap"
fi
if [ -f "$userresources" ]; then
if [ -x /usr/bin/cpp ] ; then
"$xrdb" -merge "$userresources"
else
"$xrdb" -nocpp -merge "$userresources"
fi
fi
if [ -f "$usermodmap" ]; then
"$xmodmap" "$usermodmap"
fi
# start some nice programs
if [ -d "$xinitdir"/xinitrc.d ] ; then
for f in "$xinitdir/xinitrc.d"/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
"$twm" &
"$xclock" -geometry 50x50-1+1 &
"$xterm" -geometry 80x50+494+51 &
"$xterm" -geometry 80x20+494-0 &
exec "$xterm" -geometry 80x66+0+0 -name loginAs a side note, xdg-open works correctly. Right now I'm mostly confused as to how to set the $DESKTOP variable to be suitable for operation with i3.
Last edited by mango56 (2026-05-14 04:27:37)
Offline
That's the standard xinitrc and would start twm
suitable for operation with i3
loginctl session-statusIff you're using startx/xinit the relevant file would be ~/.xinitrc
Offline
Managed to fix it by adding,
exec systemctl --user import-environment DISPLAY XAUTHORITY
exec dbus-update-activation-environment --systemd DISPLAY XAUTHORITYto my i3 config file. Thanks for the help everyone.
Offline
Out of curiosity (and for the benefit of future readers), how do you actually start i3 w/o importing the environment into the session if it's not via xinit/startx?
Offline
To be honest, I'm as confused as you are. I use tuigreet/greetd to select my session if that's relevant information. I'm gonna do more research into the stack, and update the thread once I do. I have a feeling that it's an issue stemming from my messy install/configuration process.
Offline
loginctl session-statusIff you're using startx/xinit the relevant file would be ~/.xinitrc
Offline
Had exact same problem on xdm + i3, fixing xinitrc (xsession in my case) worked, thank you seth.
Had no idea what portals were before this (learned something new), all I had to go on was this cryptic error in Chrome and Slack logs:
Request ended (non-user cancelled).
Took some detours to pin-point the core issue. Leaving this message, hopefully can save the next person some time.
Last edited by neoire (2026-05-21 07:50:44)
Offline