gufw will not open in ubuntu wayland 17.10

Bug #1713238 reported by ventrical on 2017-08-26
176
This bug affects 34 people
Affects Status Importance Assigned to Milestone
Google + Launchpad
New
Undecided
Unassigned
Gufw
Critical
Unassigned
gui-ufw (Ubuntu)
High
Unassigned

Bug Description

when clicking on gufw icon it will not run the program in wayland.

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: gufw 17.10.0-0ubuntu1
ProcVersionSignature: Ubuntu 4.12.0-11.12-generic 4.12.5
Uname: Linux 4.12.0-11-generic x86_64
ApportVersion: 2.20.6-0ubuntu7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sat Aug 26 09:17:58 2017
InstallationDate: Installed on 2017-08-22 (3 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Alpha amd64 (20170820)
PackageArchitecture: all
SourcePackage: gui-ufw
UpgradeStatus: No upgrade log present (probably fresh install)

ventrical (dale-f-beaudoin) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gui-ufw (Ubuntu):
status: New → Confirmed
Jeremy Bicha (jbicha) wrote :

If I remember correctly, this app used to have proper PolicyKit implementation but it was replaced by pkexec. GNOME Shell does not currently support pkexec.

tags: added: wayland
Changed in gui-ufw (Ubuntu):
importance: Undecided → High
ventrical (dale-f-beaudoin) wrote :

It works just fine with GNOME SHELL.

Please see my message "it will not run the program in wayland"!

https://ubuntuforums.org/showthread.php?t=2369751

Thanks :)

ventrical (dale-f-beaudoin) wrote :

It works just fine with GNOME SHELL.

Please see my message "it will not run the program in wayland"!

https://ubuntuforums.org/showthread.php?t=2369751

synaptic also works just swell in gnome-shell as does pkexec.

testing unity7 and gnome-shell are a breeze. It's 'wayland' we want to get up to speed.

Thanks :)

ventrical (dale-f-beaudoin) wrote :

#append#

Will not run gufw in Ubuntu (17.10)amd64

Hi, is this a wayland issue then? Is it working gparted? Thanks in advance.
Best regards.

On Aug 26, 2017 17:25, "ventrical" <email address hidden> wrote:

> #append#
>
> Will not run gufw in Ubuntu (17.10)amd64
>
> --
> You received this bug notification because you are subscribed to gui-ufw
> in Ubuntu.
> https://bugs.launchpad.net/bugs/1713238
>
> Title:
> gufw will not open in ubuntu wayland 17.10
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/gui-ufw/+bug/
> 1713238/+subscriptions
>

ventrical (dale-f-beaudoin) wrote :

Yes. Wayland issue. gparted works fine in gnome-shell. Calls policykit for authentication .. etc..

Lets get this firewall fixed in wayland first as it is a potential security risk for those needing a firewall while testing gnome(wayland) on line.

costales (costales) wrote :

I didn't like politykit in the past, so so so complicate to debug. I
migrated Gufw looking into the Gparted code.

I don't understand the issue, gnome shell - wayland. Gnome shell is the UI
and Wayland is the graphic engine (?). Gnome shell is running over wayland,
then Gufw or GParted should not work (?).

Anyway it is a so big change in the code and I don't time for it now :(

costales (costales) on 2017-08-26
Changed in gui-ufw:
status: New → Confirmed
importance: Undecided → Critical
ventrical (dale-f-beaudoin) wrote :

It is important to have this working by release day for 17.10 We will be testing wayland hard during 18.04 cycle and we need a graphical firewall. It makes it hard to recruit new testers when synaptic,gufw and gparted are not working nativley in wayland when thy should be.

Thanks for your attention.

regards..

Jeremy Bicha (jbicha) wrote :

Yes, gparted does not work with the default Ubuntu 17.10 session since Ubuntu is now using GNOME on Wayland.

GNOME (or Ubuntu) on Wayland does not support pkexec the way gparted or synaptic use it.

costales (costales) wrote :

Thanks!

I tried Ubuntu current daily image.

The resume would be (IMO):

- Ubuntu with xorg: works everything.
- Ubuntu with wayland: doesn't work [sudo|pkexec]? apps (Synaptic, GParted,
Gufw...).

Best regards.

ventrical (dale-f-beaudoin) wrote :

@costales,

Yes, that is correct.
My apologies for belaboring the matter. It is just an issue that since wayland will eventually be default we should have these well used and well know apps working (on wayland) before the next toolchain if not from a developers point of view, at least from a beta testers perspective.

Thank you for your attention in this matter.

Regards..

Norbert (nrbrtx) wrote :

For you information - here is a list of all affected pkexec'ed applications - see bug 1713313 .

Norbert (nrbrtx) wrote :

And also we have a list of gksu/gksudo applications here - see bug 1713311 .

AsciiWolf (asciiwolf) wrote :

Still not fixed.

ventrical (dale-f-beaudoin) wrote :

I am glad they marked it up critical, especially in light of Specter/Meltdown exloitables. Not sure if gufw would do any good anyways , but at least it is one layer of security.

Matej Kovacic (matej-kovacic) wrote :

The same problem here.

Anyway, I can understand Gufw cannot be run in current state from Wayland. But is there any GUI for firewall in Ubuntu?

I mean, it is 2018, GUI is a must have and firewall is a standard security package not intended for advanced users only!

ventrical (dale-f-beaudoin) wrote :

Since xorg is now the new default the wayland/gnome devs can take a breather. So can the rest of us.

AsciiWolf (asciiwolf) wrote :

Yep, but it still should be fixed so users could switch to Wayland without having any issues in the future.

@asciiwolf: I wish this interface allowed me to upvote posts like yours.

PeterPall (peterpall) wrote :

The problem is that wayland as a security measure *either* gives you access to the display server *or* to root => the interactive part of gufw needs to be running with the user account and the small portions root privilleges are needed for need to be run by policykit. Which is a good idea - but which synaptic and gufw currently fail to do.

Wayland is planned to be default Ubuntu Desktop session from 20.04 LTS. This should be fixed quickly.

AsciiWolf (asciiwolf) wrote :

Is this still an issue on latest Ubuntu?

Diego Bandeira (rustnnes) wrote :

Running Ubuntu 19.04
After noticed GSConnect stopped working, I've tried launch GUFW to disable fw,
but even after request password, didn't show any screen for GUFW.
From terminal, it gives segmentation fault.
After trying this answer from AskUbuntu, it came back to work.

https://ubuntuforums.org/showthread.php?t=2381885&p=13727748#post13727748

AsciiWolf (asciiwolf) wrote :

Hmm, do you have the same issue on latest Ubuntu 19.10?

Franck (alci) wrote :

It seems to be working now on 19.10, indeed.

AsciiWolf (asciiwolf) wrote :

Great! Can someone else confirm this and close this ticket as "Fix Released"?

Although gufw works in Ubuntu 19.10 by default, I'm not sure that 19.10 uses wayland like (I've read) 20.04 will. Those who confirm this works, really need to make sure you're logged in using Wayland and not X.

Franck (alci) wrote :

Yes I'm positive: gufw works here on my Wayland session.

$ loginctl show-session $(awk '/tty/ {print $1}' <(loginctl)) -p Type | awk -F= '{print $2}'
wayland

Gufw asks nicely for my sudo password and UI starts as expected.

costales (costales) wrote :

Hi, Franck could you send me the content of this file? Thanks.

cat /bin/gufw-pkexec

Franck (alci) wrote :

Sure. Here it is (from /usr/bin although):

~$ cat /usr/bin/gufw-pkexec
#!/bin/bash
LOCATIONS=(
"/usr/lib/python3.5/site-packages/gufw/gufw.py"
"/usr/lib/python3.5/dist-packages/gufw/gufw.py"
"/usr/share/gufw/gufw/gufw.py"
)

for ((i = 0; i < ${#LOCATIONS[@]}; i++))
do
    if [[ -e "${LOCATIONS[${i}]}" ]]; then
        python3 ${LOCATIONS[${i}]} $1
    fi
done

costales (costales) wrote :

Hi,

And cat /bin/gufw?

I think you have an older version and it should not works with Wayland :O

A hug.

Franck (alci) wrote :

cat: /bin/gufw: No such file or directory

~$ apt info gufw
Package: gufw
Version: 19.04.0-0ubuntu1
Priority: optional
Section: universe/admin
Source: gui-ufw
Origin: Ubuntu
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: Python Applications Packaging Team <email address hidden>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 3 537 kB
Depends: gir1.2-gtk-3.0, gir1.2-webkit2-4.0, policykit-1, python3-gi, ufw (>= 0.34~rc), python3:any
Homepage: https://gufw.org/
Task: ubuntu-mate-desktop
Download-Size: 857 kB
APT-Manual-Installed: yes
APT-Sources: http://fr.archive.ubuntu.com/ubuntu eoan/universe amd64 Packages
Description: interface utilisateur graphique pour ufw
 Gufw est un moyen facile et intuitif pour gérer un pare-feu Linux. Il
 prend en charge, entre autres, les tâches courantes telles que
 l'autorisation ou le blocage de ports individuels ou pair à pair courants
 préconfigurés.

costales (costales) wrote :

Hi,
My fault, please, this path:
cat /usr/bin/gufw*
Thanks

Franck (alci) wrote :

Yes, that was my previous comment:

~$ cat /usr/bin/gufw*
#!/bin/sh
c_user=$(whoami)
pkexec gufw-pkexec $c_user

#!/bin/bash
LOCATIONS=(
"/usr/lib/python3.5/site-packages/gufw/gufw.py"
"/usr/lib/python3.5/dist-packages/gufw/gufw.py"
"/usr/share/gufw/gufw/gufw.py"
)

for ((i = 0; i < ${#LOCATIONS[@]}; i++))
do
    if [[ -e "${LOCATIONS[${i}]}" ]]; then
        python3 ${LOCATIONS[${i}]} $1
    fi
done

costales (costales) wrote :

Uhm, @Frank This should not work with Wayland :O
Are working other programs as gparted or synaptic?
Thanks in advance!
--
Costales.

Balint Pap (marlyna) wrote :

I'm having the same issue on Ubuntu 18.04.

python3 --version
Python 3.8.1

sudo apt-get install python3-gi
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-gi is already the newest version (3.26.1-2ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Traceback (most recent call last):
  File "/usr/share/gufw/gufw/gufw.py", line 22, in <module>
    from gufw.view.gufw import Gufw
  File "/usr/share/gufw/gufw/gufw/view/gufw.py", line 18, in <module>
    import gi
ModuleNotFoundError: No module named 'gi'

Dropbox had the same error message, but after changing the mentioned file (in the error message) first line, to "#!/usr/bin/python3" it started to work. But only dropbox does, gufw still doesn't open.

Changed in gui-ufw:
status: Confirmed → Fix Committed
Changed in gui-ufw (Ubuntu):
status: Confirmed → Invalid
Changed in gui-ufw:
status: Fix Committed → Confirmed
Changed in gui-ufw (Ubuntu):
status: Invalid → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers