costales / gufw

Linux Firewall
GNU General Public License v3.0
129 stars 33 forks source link

Fix gdk crash #75

Open Nista11 opened 2 days ago

Nista11 commented 2 days ago

Fixes #73.

The problem and solution are also explained here: https://bbs.archlinux.org/viewtopic.php?id=267747, and something very similar happened in #57 as well.

To summarise, there is a polkit rule in com.ubuntu.pkexec.gufw.policy which points to /usr/bin/gufw-pkexec. The gufw script called gufw-pkexec without specifying its full path, which caused issues.

57 fixed it by replacing the call with $(which gufw-pkexec).

However, this can resolve to other paths, like /sbin/gufw-pkexec, which is a link to /usr/bin/gufw-pkexec, so it crashes.

This is why readlink -f has to be used to always point to the original, /usr/bin/gufw-pkexec path. As an alternative you could just add /usr/bin/gufw-pkexec to avoid these commands, as it is already expected that they will resolve to that.

costales commented 2 days ago

I put in the past those "tricks" to get the path of Gufw and it was a mess. Where are you testing (OS, version)? I think this is working in Ubuntu. Best regards.

Nista11 commented 2 days ago

I am running Arch Linux with Gnome on Wayland. I've tried testing it on Ubuntu, and with apt it works because the files are put to /usr/bin, but the manual setup puts them at /usr/local/bin as it is in front of it in the PATH variable, so the same error happens eventually.

costales commented 2 days ago

Then I suppose someone should fix the release in Arch Linux (?)