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
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)
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 python3. 8/site- packages/ gufw/gufw. py" python3. 8/dist- packages/ gufw/gufw. py" gufw/gufw/ gufw.py"
LOCATIONS=(
"/usr/lib/
"/usr/lib/
"/usr/share/
)
for ((i = 0; i < ${#LOCATIONS[@]}; i++)) ${i}]}" ]]; then
do
if [[ -e "${LOCATIONS[
python3 ${LOCATIONS[${i}]} $1
fi
done
This is the CURRENT Gufw v20.04.1-1 launch script:
#!/bin/bash python* /site-packages/ gufw/gufw. py | awk '{print $9}'` # from source gufw/gufw/ gufw.py" ) # deb package
LOCATIONS=`ls -ld /usr/lib/
LOCATIONS=( "${LOCATIONS[@]}" "/usr/share/
for ((i = 0; i < ${#LOCATIONS[@]}; i++)) ${i}]}" ]]; then
do
if [[ -e "${LOCATIONS[
python3 ${LOCATIONS[${i}]} $1
fi
done
When I run manually: python* /site-packages/ gufw/gufw. py | awk '{print $9}'
ls -ld /usr/lib/
Returns an EMPTY line!
If I modify {print $ 9} to {print $ 8} it returns: python3. 8/site- packages/ gufw/gufw. py
/usr/lib/
After modifying the script in this way, Gufw runs without problems.
Without "awk", it returns: python3. 8/site- packages/ gufw/gufw. py
-rw-r--r-- 1 root root 1079 04-29 10:12 /usr/lib/
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: python* /site-packages/ gufw/gufw. py | awk '{print $9}'
ls -ld /usr/lib/
Output without "awk" if You have English system language: python3. 8/site- packages/ gufw/gufw. py
-rw-r--r-- 1 root root 1079 April 29 10:12 /usr/lib/
9nt argument is the path.
Output without "awk" if You have e.g. Polish system language: python3. 8/site- packages/ gufw/gufw. py
-rw-r--r-- 1 root root 1079 04-29 10:12 /usr/lib/
9nt argument - nothing, because the date is in a different format: "April 29" vs "04-29" (there are no spaces and "awk" counts incorrectly)