mirror of
https://github.com/linuxmint/timeshift.git
synced 2024-08-16 12:00:25 +03:00
Update launcher script
This commit is contained in:
parent
151a4d586e
commit
078c6af77d
@ -2,17 +2,17 @@
|
||||
|
||||
app_command='timeshift-gtk'
|
||||
|
||||
if [ `id -u` -eq 0 ]; then
|
||||
#user is admin
|
||||
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
|
||||
# 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
|
||||
if [ $XDG_SESSION_TYPE = "wayland" ] ; then
|
||||
# script is running in non-interactive mode
|
||||
if [ "$XDG_SESSION_TYPE" = "wayland" ] ; then
|
||||
xhost +SI:localuser:root
|
||||
pkexec ${app_command}
|
||||
xhost -SI:localuser:root
|
||||
|
Loading…
Reference in New Issue
Block a user