You are not logged in.
Pages: 1
I'm a beginner in the Linux world. I'm learning slowly and I've encountered my first problem. I'm using ArchLinux with Hyprland. I've installed
ufw gufw
. When I try to run gufw, I get the following error. I've tried everything I've found and it's not worth it.
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gtk-CRITICAL **: 21:05:57.868: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gtk-CRITICAL **: 21:05:57.868: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gtk-CRITICAL **: 21:05:57.868: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gtk-CRITICAL **: 21:05:57.868: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gtk-CRITICAL **: 21:05:57.868: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gtk-CRITICAL **: 21:05:57.868: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gtk-CRITICAL **: 21:05:57.868: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gtk-CRITICAL **: 21:05:57.868: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.868: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gtk-CRITICAL **: 21:05:57.868: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.869: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.869: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gdk-CRITICAL **: 21:05:57.869: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:16855): Gtk-CRITICAL **: 21:05:57.869: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:16855): Gtk-CRITICAL **: 21:05:57.870: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
(gufw.py:16855): Gtk-CRITICAL **: 21:05:57.870: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
(gufw.py:16855): Gtk-CRITICAL **: 21:05:57.870: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
/usr/bin/gufw-pkexec: line 2: 16855 Segmentation fault (core dumped) python3 /usr/lib/python3.13/site-packages/gufw/gufw.py "$@"
Last edited by drneba (2025-02-05 10:31:23)
Offline
The package ships a polkit authorisation file so try
pkexec gufw
Jin, Jîyan, Azadî
Offline
I'm getting the same error
Offline
you need to launch a polkit agent: https://wiki.archlinux.org/title/Polkit … ion_agents -- doesn't really matter which one but pick one and start it as part of your startup programs
Offline
I think pkttyagent would have asked for a password if the OP ran my command from a terminal.
@OP: is the plain polkit package installed?
Jin, Jîyan, Azadî
Offline
I don't know if the same is true with Hyprland but with Labwc/Xfce4 the user could not get privileges to apps like gufw. Wayland doesn't allow it by default. For it to work I had to add a couple lines to the labwc autostart file. I assume hyprland has something similar. You will still have to call it from a terminal but it works.
#### allow root/graphical use ####
xhost +SI:localuser:$(id -un) &
xhost +SI:localuser:root &
I Am Canadian!
Offline
Wayland doesn't allow it by default
Good catch!
Probably best to use a wrapper with gufw though to reset the permissions after running it, something like this at /usr/local/bin/gufw should work:
#!/bin/sh
xhost +SI:localuser:root
pkexec /usr/bin/gufw "$@"
xhost -SI:localuser:root
Last edited by Head_on_a_Stick (2025-02-04 14:06:43)
Jin, Jîyan, Azadî
Offline
Yes that would/should work just fine except that it's specific to gufw. You would need to do the same if there is any other graphical application requiring elevated privileges.
I Am Canadian!
Offline
I suppose you could use pkexec itself and drop /usr/bin/gufw to make it universal.
Jin, Jîyan, Azadî
Offline
Applications that want to do this should properly implement polkit auth so they can run their GUI code separate from the actual auth needing operation, which is adjusting ip/nftables...
Offline
I don't know if the same is true with Hyprland but with Labwc/Xfce4 the user could not get privileges to apps like gufw. Wayland doesn't allow it by default. For it to work I had to add a couple lines to the labwc autostart file. I assume hyprland has something similar. You will still have to call it from a terminal but it works.
#### allow root/graphical use #### xhost +SI:localuser:$(id -un) & xhost +SI:localuser:root &
It works for me with this.
Applications that want to do this should properly implement polkit auth so they can run their GUI code separate from the actual auth needing operation, which is adjusting ip/nftables...
If you can give me a simpler explanation.
Offline
There's nothing you can do about it as a user, so use the xhost method. The developers of gufw should implement proper privilege separation so that the GUI code doesn't need to be ran as root, but just the parts that require actual adjustment.
Offline
Pages: 1