Anyone know why my GUFW won't open?

Anyone know why my GUFW won’t open?

[dullrobot@dullrobot ~]$ sudo pamac install ufw
[sudo] password for dullrobot: 
Preparing...
Warning: ufw-0.36-5 is up to date -- skipping
Nothing to do.
Transaction successfully finished.
[dullrobot@dullrobot ~]$ sudo systemctl enable ufw.service
[dullrobot@dullrobot ~]$ sudo ufw enable
Firewall is active and enabled on system startup
[dullrobot@dullrobot ~]$ sudo gufw
[sudo] password for dullrobot: 

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.139: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.139: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.139: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gtk-CRITICAL **: 14:05:55.140: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.140: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.140: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.140: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gtk-CRITICAL **: 14:05:55.140: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.140: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.140: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.140: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gtk-CRITICAL **: 14:05:55.140: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.140: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.140: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.140: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gtk-CRITICAL **: 14:05:55.140: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.140: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.140: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.141: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gtk-CRITICAL **: 14:05:55.141: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.141: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.141: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.141: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gtk-CRITICAL **: 14:05:55.141: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.141: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.141: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.141: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gtk-CRITICAL **: 14:05:55.141: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.141: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.141: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.141: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gtk-CRITICAL **: 14:05:55.141: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.141: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.142: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.142: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gtk-CRITICAL **: 14:05:55.142: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.142: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.142: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gdk-CRITICAL **: 14:05:55.142: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:90836): Gtk-CRITICAL **: 14:05:55.142: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:90836): Gtk-CRITICAL **: 14:05:55.148: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed

(gufw.py:90836): Gtk-CRITICAL **: 14:05:55.148: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed

(gufw.py:90836): Gtk-CRITICAL **: 14:05:55.148: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
/bin/gufw-pkexec: line 2: 90836 Segmentation fault      (core dumped) python3 /usr/lib/python3.9/site-packages/gufw/gufw.py "$@"

I’m on KDE, Manjaro, Pinebook Pro.

Try:

pkexec gufw
1 Like

Or simply gufw. It will acquire root rights itself.

It should be in its own package: pamac install gufw (note, no sudo here).

2 Likes

Yup … we fixed (hacky-patched) the semi-broken gufw launcher, and it should use pkexec (polkit) now automatically, without failing instead… which is also why you should not use sudo.
(also geeze gufw fix yer stuff :laughing:)

And PS - using sudo with graphical applications is just about always a bad idea. If something requires it … that something is likely broken. In whatever case the process of elimination should work the other way around from this post - start regularly … attempt elevated privileges when necessary.

1 Like

As a note, that has not been fixed in ARM, so that fix is not available for this user. :frowning:

1 Like

oh … well … whats to be done ? show me the source, and I may do it again :woman_mage:
…oh wait … I cant test on the architecture to be sure. :crying_cat_face:

1 Like

I assume the PKGBUILD in our gitlab is the one used, so I’ll just use that.

1 Like

Ah yes … someone built the sed line into it.
(note - besides the display/pkexec issue, it was also to fix a localization problem so if you had other gufw errors relating to certain languages this would be the thing as well)

2 Likes

Tip: When pasting terminal output on Discourse forums, one can either…

  • Use the Preformatted text </> toolbar button–NOT the Quote " button.

  • Add three backticks ` above and below the text (Markdown):

    ```
    type or paste code here
    ```

  • Use HTML:

    <pre><code>
    type or paste code here
    </pre></code>

I’ve done it for you this time. :wink:

1 Like

You can start the Gufw firewall application with the following command. Please provide feedback if the problem is resolved or the problem persists. Thanks.

sudo gufw-pkexec

or

sudo python3 /usr/lib/python3.9/site-packages/gufw/gufw.py

1 Like

ew. no.
dont start graphical application with sudo.
And dont ‘sudo pkexec’ either … why sudo polkit gui ?