Hello! I’m trying to run btrfs-assistant and running into the following error:
$ gtk-launch btrfs-assistant
==== AUTHENTICATING FOR org.btfrs-assistant.pkexec.policy.run ====
Authentication is required to run Btrfs Assistant
Authenticating as: laura
Password:
** (process:3293): WARNING **: 21:30:39.536: Got unexpected EOF while reading from controlling terminal.
==== AUTHENTICATION FAILED ====
Error executing command as another user: Not authorized
This incident has been reported.
$
It doesn’t give me the opportunity to enter my password. Seeing this was an authentication issue, I tried the following:
$ sudo gtk-launch btrfs-assistant
[sudo] password for laura:
(gtk-launch:3577): Gtk-WARNING **: 21:33:30.799: cannot open display:
$
Oh running btrfs-assistant-launcher does manage to authenticate, but then just outputs the following, with no gui appearing:
$ btrfs-assistant-launcher
==== AUTHENTICATING FOR org.btfrs-assistant.pkexec.policy.run ====
Authentication is required to run Btrfs Assistant
Authenticating as: laura
Password:
==== AUTHENTICATION COMPLETE ====
Usage: btrfs-assistant-bin [options]
An application for managing Btrfs and Snapper
Options:
-h, --help Displays help on commandline options.
--help-all Displays help, including generic Qt
options.
-v, --version Displays version information.
-l, --list List snapshots
-r, --restore <index of snapshot> Restore the given snapshot
$
Sorry I haven’t been descriptive enough. I’m trying to execute it from a terminal because launching it via fuzzel or via executing the .desktop file in a file explorer weren’t causing any effect, so I was hoping to diagnose it via terminal.
You are probably missing a graphical polkit agent(or it isn’t configured properly).
Normally, if you run btrfs-assistant-launcher from a terminal it would launch a graphical polkit agent asking for a password and then launch the terminal. You are getting the terminal-based polkit agent which is a fallback.
So I have polkit-gnome and I can see /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1, but I can’t find a systemctl entry in order to enable it. I’ve tried with --user too.
And now I get the graphical authentication when I try to launch btrfs assistant, but it still doesn’t cause any gui to appear.
What could still be going wrong?
Oh, now that the graphical polkit is here, the btrfs-assistant-launcher does throw an error:
$ btrfs-assistant-launcher
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
Authorization required, but no authorization protocol specified
qt.qpa.xcb: could not connect to display :0
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: eglfs, linuxfb, minimal, minimalegl, offscreen, vkkhrdisplay, vnc, xcb.
/usr/bin/btrfs-assistant: line 46: 14647 Aborted (core dumped) btrfs-assistant-bin ${params}
I ran into this same issue when setting up Hyprland yesterday. I had to add this to my config. exec-once = systemctl --user start hyprpolkitagent
And then also this which activates other stuff as well. exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP --all
So you will probably need to launch a polkit agent when you WM get’s launched.
● polkit-gnome.service
Loaded: loaded (/home/laura/.config/systemd/user/polkit-gnome.service; enabled; preset: enabled)
Active: active (running) since Fri 2025-05-02 13:16:40 BST; 30min ago
Invocation: 3573d39bbe1e4ebb8e63dc7982cae648
Main PID: 951 (polkit-gnome-au)
Tasks: 6 (limit: 18855)
Memory: 18.3M (peak: 38.5M)
CPU: 624ms
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/polkit-gnome.service
└─951 /lib/polkit-gnome/polkit-gnome-authentication-agent-1
May 02 13:16:40 pigeon systemd[808]: Started polkit-gnome.service.
May 02 13:23:08 pigeon polkit-gnome-au[951]: Unable to get a pixbuf for GTK_STOCK_DIALOG_AUTHENTICATION (gtk-dialog-authentication) at size 48
Running dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP --all in terminal before trying btrfs-assistant-launcher doesn’t fix the Qt platform plugin “xcb” thing. Could it matter when it’s run?
I am getting the polkit agent at least now.