Gufw doesn't start [Arch Linux]

Bug #1876973 reported by Domker_ on 2020-05-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gufw
Medium
costales

Bug Description

Operating System: Arch Linux
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.2
Kernel Version: 5.6.10-arch1-1
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-4790K CPU @ 4.00GHz
Memory: 15,6 GiB
----
Graphics: Device-1: NVIDIA GM204 [GeForce GTX 980] driver: nvidia v: 440.82
           Display: x11 server: X.Org 1.20.8 driver: nvidia resolution: 1920x1080~60Hz
----

pacman -Si gufw
Repository: community
Name: gufw
Version: 20.04.1-1
Description: Uncomplicated way to manage your Linux firewall
Architecture: any
Url: https://gufw.org/
Licenses: GPL3
Groups: None
Provides: None
Depends on: gtk3 polkit python python-gobject ufw webkit2gtk desktop-file-utils gtk-update-icon-cache
Optional dependencies: None
Conflicts with: None
Replaces: None
Download: 551.86 KiB
Size after installation: 1047.43 KiB
Package author: Levente Polyak <email address hidden>
Date of build: Wed, 29 Apr 2020, 10:12:19
Confirmed by: Sum MD5 Sum SHA256 Signature

All shortcuts to gufw disappeared (kde-menu, app search, krunner). As I call gufw directly, the policykit window appears and after entering the password nothing further happens.

When running gufw from the console it does not show any error, but the gufw window does not appear as before.
Reinstalling the gufw package does not fix the problem.
Gufw also does not start on a second computer with Arch Linux. (everything is up to date)

Domker_ (domker2) wrote :

I probably found the cause of the problem.

This is the PREVIOUS bash script to run Gufw v19.10.0-2 (/usr/bin/gufw-pkexec):

#!/bin/bash
LOCATIONS=(
"/usr/lib/python3.8/site-packages/gufw/gufw.py"
"/usr/lib/python3.8/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

This is the CURRENT Gufw v20.04.1-1 launch script:

#!/bin/bash
LOCATIONS=`ls -ld /usr/lib/python*/site-packages/gufw/gufw.py | awk '{print $9}'` # from source
LOCATIONS=( "${LOCATIONS[@]}" "/usr/share/gufw/gufw/gufw.py" ) # deb package

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

When I run manually:
ls -ld /usr/lib/python*/site-packages/gufw/gufw.py | awk '{print $9}'

Returns an EMPTY line!

If I modify {print $ 9} to {print $ 8} it returns:
/usr/lib/python3.8/site-packages/gufw/gufw.py

After modifying the script in this way, Gufw runs without problems.

Without "awk", it returns:
-rw-r--r-- 1 root root 1079 04-29 10:12 /usr/lib/python3.8/site-packages/gufw/gufw.py

Python3 doesn't get the correct path to the script, so there is no error information when trying to run Gufw.

Using "awk" like this is bad practice:
ls -ld /usr/lib/python*/site-packages/gufw/gufw.py | awk '{print $9}'

Output without "awk" if You have English system language:
-rw-r--r-- 1 root root 1079 April 29 10:12 /usr/lib/python3.8/site-packages/gufw/gufw.py

9nt argument is the path.

Output without "awk" if You have e.g. Polish system language:
-rw-r--r-- 1 root root 1079 04-29 10:12 /usr/lib/python3.8/site-packages/gufw/gufw.py

9nt argument - nothing, because the date is in a different format: "April 29" vs "04-29" (there are no spaces and "awk" counts incorrectly)

costales (costales) wrote :

Thanks a lot. I'll review it for Gufw 20.10 :) A hug!

Changed in gui-ufw:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → costales (costales)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers