You are not logged in.
recently i moved over to niri and i can't get polkit working. i've tried various polkit agents but they all give the same error message
$ pkexec gparted
Authorization required, but no authorization protocol specified
(gpartedbin:8878): Gtk-WARNING **: 23:47:30.995: cannot open display: :0Last edited by randomiranda (2025-07-19 01:21:59)
Offline
Poikit is not a (direct) dependency of niri and is also not mentioned on https://wiki.archlinux.org/title/Niri .
It does depend on xdg-desktop-portal though which usually needs a graphical polkit agent .
The cannot open display error is often related to xwayland issues .
Please post the outputs of
$ pacman -Qi xorg-xwayland
$ pacman -Qi niriDisliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
$ pacman -Qi xorg-xwayland
Name : xorg-xwayland
Version : 24.1.8-1
Description : run X clients under wayland
Architecture : x86_64
URL : https://xorg.freedesktop.org
Licenses : LicenseRef-Adobe-Display-PostScript BSD-3-Clause
LicenseRef-DEC-3-Clause HPND
LicenseRef-HPND-sell-MIT-disclaimer-xserver HPND-sell-variant ICU ISC
MIT MIT-open-group NTP SGI-B-2.0 SMLNJ X11
X11-distribute-modifications-variant
Groups : xorg
Provides : xorg-server-xwayland
Depends On : nettle libepoxy libxfont2 pixman xorg-server-common libxcvt mesa
libglvnd libxau wayland libdrm libtirpc libei libxshmfence
libdecor glibc
Optional Deps : None
Required By : plasma-workspace xwayland-satellite
Optional For : None
Conflicts With : xorg-server-xwayland
Replaces : xorg-server-xwayland
Installed Size : 2.24 MiB
Packager : Andreas Radke <andyrtr@archlinux.org>
Build Date : Thu 19 Jun 2025 12:07:45 AM +07
Install Date : Fri 20 Jun 2025 11:43:37 AM +07
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature$ pacman -Qi niri
Name : niri
Version : 25.05.1-2
Description : A scrollable-tiling Wayland compositor
Architecture : x86_64
URL : https://github.com/YaLTeR/niri
Licenses : GPL-3.0-or-later
Groups : None
Provides : None
Depends On : cairo gcc-libs glib2 glibc libdisplay-info libinput libpipewire
libxkbcommon mesa pango pixman seatd systemd-libs
xdg-desktop-portal-impl
Optional Deps : alacritty: a suggested GPU-accelerated terminal emulator
bash: for niri-session script [installed]
fuzzel: a suggested Wayland application launcher [installed]
mako: a suggested Wayland notification daemon [installed]
org.freedesktop.secrets: for apps to rely on secrets portal [installed]
swaybg: a suggested Wayland wallpaper tool [installed]
swaylock: a suggested Wayland screen locker
waybar: a suggested Wayland customizable desktop bar [installed]
xwayland-satellite: for running X11 apps in XWayland [installed]
xdg-desktop-portal-gtk: a suggested XDG desktop portal [installed]
xdg-desktop-portal-gnome: a XDG desktop portal required for screencasting
[installed]
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 22.83 MiB
Packager : Caleb Maclennan <alerque@archlinux.org>
Build Date : Thu 29 May 2025 07:57:07 PM +07
Install Date : Fri 18 Jul 2025 07:46:34 PM +07
Install Reason : Explicitly installed
Install Script : No
Validated By : SignatureOffline
i've tried various polkit agents but they all give the same error message
Authorization required, but no authorization protocol specifiedmeans there *is* no polkit agent (running)
Also don't run "pkexec gparted", gparted is supposed to self-elevate.
Offline
$ pkexec gparted Authorization required, but no authorization protocol specified (gpartedbin:8878): Gtk-WARNING **: 23:47:30.995: cannot open display: :0
Fix your polkit and see:
Offline
the link above provided 2 workarounds
executing programs using
sudo -EHor
pkexec env WAYLAND_DISPLAY="$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" XDG_RUNTIME_DIR=/run/user/0 both work fine
Offline
sudo env WAYLAND_DISPLAY="$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" XDG_RUNTIME_DIR=/run/user/0 gparted doesn't work?
Does
pkexec gparted still get you "Authorization required, but no authorization protocol specified"?
gparted tries to open display :0 and xwayland is installed, so it's not pure wayland and the original issue was the inability to provide credentials to pkexec.
Last edited by seth (2025-07-19 07:13:40)
Offline