blob: b5eedf591bb2af7bd6d4582930b99e5cc693615f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/bash
# 20220315 bkw: replacement wrapper script for gui-ufw, part of the
# gui-ufw SlackBuilds.org build, by B. Watson. WTFPL licensed.
# find the path to the script, in a way that won't break if the
# python version gets upgraded, and works on either 32-bit or 64-bit
# Slackware.
PYVER="$( python3 --version | cut -d' ' -f2 | cut -d. -f1,2 )"
for i in lib64 lib; do
dir="/usr/$i/python$PYVER/site-packages/gufw"
[ -d "$dir" ] && break
done
# kdesu takes care of allowing access to the X server (no need for
# xhost commands) and works fine regardless of desktop environment or
# window manager. it doesn't rely on policykit, which is a nice bonus.
exec kdesu -c "python3 $dir/gufw.py"
|