A problem with gufw  [Solved]

Message
Author
User avatar
fehlix
Developer
Posts: 12626
Joined: Wed Apr 11, 2018 5:09 pm

Re: A problem with gufw  [Solved]

#11 Post by fehlix »

spc wrote: Mon Dec 05, 2022 4:06 am It doesn't run from menu at all. When running from command line (sudo gufw) there is such information in terminal:

"System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: The device is turned off
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: The device is turned off"

/usr/bin/gufw: line 2: [: =: unary operator expected
ls: cannot access '/usr/lib/python*/site-packages/gufw/gufw.py': No such file or directory

and then the gufw window appears

(MX 21 64 bit with all updates)
The patch mentioned above is fine, but it won't "fix" the issue shown.
To fix the systemd-warning and the site-packages warning do this:
fix gufw:

Code: Select all

sudo sed -i.orig -e '1!d;' -e 'apkexec gufw-pkexec $(whoami)' /usr/bin/gufw
and
fix gufw-pkexec

Code: Select all

sudo sed -i.orig -e '1!d;' -e 'a/usr/bin/python3 /usr/share/gufw/gufw/gufw.py $1' /usr/bin/gufw-pkexec
This two adjustment do go align with latest upstream version and also with debian's provided version in testing/bookworm and sid.

Huckleberry Finn

Re: A problem with gufw

#12 Post by Huckleberry Finn »

spc wrote: Mon Dec 05, 2022 6:45 amTry again. Probably it won't work the second time...
Normally it's already launched with just gufw .. (no sudo / pkexec / su-to-root etc. ) when you click the one from menu.

spc
Posts: 13
Joined: Sun Nov 13, 2022 3:11 am

Re: A problem with gufw

#13 Post by spc »

To fix the systemd-warning and the site-packages warning do this:
fix gufw:

Code: Select all

sudo sed -i.orig -e '1!d;' -e 'apkexec gufw-pkexec $(whoami)' /usr/bin/gufw
and
fix gufw-pkexec

Code: Select all

sudo sed -i.orig -e '1!d;' -e 'a/usr/bin/python3 /usr/share/gufw/gufw/gufw.py $1' /usr/bin/gufw-pkexec
This two adjustment do go align with latest upstream version and also with debian's provided version in testing/bookworm and sid.

Thanx a lot. You are GREAT!! fehlix :)

Post Reply

Return to “General”