You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
857 B
Bash
30 lines
857 B
Bash
#!/bin/bash
|
|
# Generic wrapper for locating multibootusb file and execute pkexec accordingly
|
|
# Bin pat of this file and policy file have to match
|
|
|
|
# Ensure that root is added in to xhost list to access X-Server
|
|
# Otherwise script will fail to launch GUI
|
|
if type "xhost" > /dev/null; then
|
|
xhost local:root > /dev/null
|
|
fi
|
|
|
|
|
|
if [ $(which pkexec) ]; then
|
|
if [ -f /usr/bin/multibootusb ]; then # path to debian based distros
|
|
pkexec --disable-internal-agent "/usr/bin/multibootusb" "$@"
|
|
fi
|
|
|
|
if [ -f /usr/local/bin/multibootusb ]; then # path to fedora based distros
|
|
pkexec --disable-internal-agent "/usr/local/bin/multibootusb" "$@"
|
|
fi
|
|
else
|
|
if [ -f /usr/bin/multibootusb ]; then
|
|
/usr/bin/multibootusb "$@"
|
|
fi
|
|
|
|
if [ -f /usr/local/bin/multibootusb ]; then
|
|
/usr/local/bin/multibootusb "$@"
|
|
fi
|
|
|
|
fi
|