View Issue Details

IDProjectCategoryView StatusLast Update
0009497Kali LinuxKali Package Bugpublic2026-01-11 19:55
Reporteriojymbo Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Summary0009497: policykit-1 127-1+kali1: pkexec issues
Description

policykit-1 127-1+kali1: pkexec issues

Environment

Version: Kali 2024.4 after policykit-1 (127-1+kali1) update
Desktop: XFCE
Host OS: Windows 11
Hypervisor: VMware Workstation Pro 25H2

Summary

Due to the new Debian polkit mecanisms introduced in 127-1, the polkit authentication pop-up is broken and pkexec no longer work with some graphical applications that require root access upon launch, such as Qterminal, Sparrow-Wifi, Zenmap, etc.

Polkit authentication pop-up: Symptom

When you start one of these applications, you will see these error messages in the journalctl log:
polkitd[PID]: Operator of unix-session:2 FAILED to authenticate to gain authorization for action org.freedesktop.policykit.exec for unix-process:PID:PID [xfce4-panel] (owned by unix-user:USER)

Based on my observations of the Debian polkitd package update, the 'polkit-agent-helper.socket' service must now be enabled and started (https://salsa.debian.org/utopia-team/polkit/-/commit/07b46e3a27cb483e68a06292a0387d09d0060bea).

Polkit authentication pop-up: Workaround

To fix the Polkit authentication pop-up, add the following to the "Disable all sockets by default, except whitelisted ones" section of the "/usr/lib/systemd/system-preset/95-kali.preset" file:
enable polkit-agent-helper.socket

Next, enable and start it:
systemctl enable polkit-agent-helper.socket
systemctl start polkit-agent-helper.socket

The journalctl error log entry disappears:
kexec[PID]: USER: Executing command [USER=root] [TTY=unknown] [CWD=/home/USER] [COMMAND=/usr/bin/zenmap]

Pkexec/Qterminal: Symptom

This previous workaround fixs Sparrow-Wifi and Zenmap problems, but not the Qterminal command as 'root', probably due to the update from X11 to Wayland, DISPLAY and XAUTHORITY environment variables are no longer passed to the 'pkexec x-terminal-emulator' command.

Qterminal output error:
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: minimal, vnc, wayland-egl, vkkhrdisplay, eglfs, wayland, offscreen, minimalegl, xcb, linuxfb.
zsh: IOT instruction pkexec x-terminal-emulator

Pkexec/Qterminal: Workaround

Starting Pkexec with missing 'env' arguments: pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY x-terminal-emulator

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2026-01-11 15:09 iojymbo New Issue