3
android@android:~$ gufw
No protocol specified
Unable to init server: Could not connect: Connection refused
No protocol specified
Unable to init server: Could not connect: Connection refused

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed

(gufw.py:21126): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(gufw.py:21126): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
/usr/bin/gufw-pkexec: line 13: 21126 Segmentation fault      (core dumped) python3 ${LOCATIONS[${i}]} $1
8

I'm a Gufw developer.

You can not run any root UI (Gparted, Synaptic, Gufw...) because of Wayland.

Related bug: https://bugs.launchpad.net/ubuntu/+source/gui-ufw/+bug/1713238

All info here: https://bugs.launchpad.net/ubuntu/+source/backintime/+bug/1713313/comments/44

As you can read in that link, I'm afraid that it will be not fixed, because it was closed as won't fix :/

https://bugzilla.redhat.com/show_bug.cgi?id=1274451

A hug and I'm so sorry.

  • Well, the Ubuntu bug is not closed, is it? – Gunnar Hjalmarsson Oct 24 '17 at 18:41
  • @GunnarHjalmarsson is not related to Ubuntu, it's related to Wayland. Any root UI in a distro with Wayland will not work :( – Costales Oct 24 '17 at 21:47
  • 1
    Right, but I have the impression that they plan to implement some kind of fix/workaround. Maybe I'm wrong. Also, please see the answer I just posted. – Gunnar Hjalmarsson Oct 24 '17 at 22:31
  • 1
    why doesn't wayland allow those apps to work? seems like a serious downside to using wayland – Eman Jan 13 '18 at 2:26
  • @GunnarHjalmarsson I think what needs to happen is that apps like Gufw need to use PolicyKit? – Ads20000 May 4 '18 at 11:17
5

A dirty workaround, but this is one way to make gufw work on Ubuntu 17.10 with Wayland:

  • Create the file ~/bin/gufw and give it this contents:

    #!/bin/sh
    xhost SI:localuser:root
    /usr/bin/gufw
    xhost -SI:localuser:root
    
  • Make the file executable:

    chmod +x ~/bin/gufw
    

Edit:

A more step by step explanation would be:

  • Press Ctrl+Alt+T to open a terminal window.
  • Run the command:

    mkdir -p bin
    

    (i.e. type it and press Enter)

  • Open the gedit text editor with this command:

    gedit bin/gufw
    
  • Copy the contents as above and paste it into the gedit window.

  • Save and quit gedit.

  • Run the command:

    chmod +x bin/gufw
    
  • Quit the terminal window by running the command:

    exit
    
  • Thanks! Entering xhost +SI:localuser:root in the command line was enough to run it, but I'm not sure it's gonna survive restarting my computer. – Joe Eifert Mar 1 '18 at 7:29
  • @Johannes: It won't, but the above suggested solution survives a reboot. – Gunnar Hjalmarsson Mar 1 '18 at 16:24
2

Re-installation not really required;

After a quick search, I found that Gufw is missing a python dependency. It appears that the python-gi package needs to be added as a dependency.

Steps to fix:

  1. sudo apt install python-gi
  2. gufw
  3. Type in password
  • i have problem for ubuntu 17.10 now – nazar2sfive Oct 20 '17 at 15:13
  • Does not fix it for me (running Mint 18.2 Sonya based on 16.04.1-Ubuntu) – DBX12 Apr 15 '18 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.