blob: 37e8cb7ab4191208399e3a3c9b9f2c0bbd0e6df5 (
plain)
#!/bin/bash
app_command='timeshift-gtk'
if [ "$(id -u)" -eq 0 ]; then
# user is admin
${app_command}
else
# user is not admin
if echo $- | grep "i" >/dev/null 2>&1; then
# script is running in interactive mode
su - -c "${app_command}"
else
# script is running in non-interactive mode
gksu ${app_command}
fi
fi
|