mirror of
https://github.com/linuxmint/timeshift.git
synced 2024-09-11 08:55:25 +03:00
Update launcher script
This commit is contained in:
parent
151a4d586e
commit
078c6af77d
@ -2,17 +2,17 @@
|
|||||||
|
|
||||||
app_command='timeshift-gtk'
|
app_command='timeshift-gtk'
|
||||||
|
|
||||||
if [ `id -u` -eq 0 ]; then
|
if [ "$(id -u)" -eq 0 ]; then
|
||||||
#user is admin
|
# user is admin
|
||||||
${app_command}
|
${app_command}
|
||||||
else
|
else
|
||||||
#user is not admin
|
# user is not admin
|
||||||
if `echo $- | grep "i" >/dev/null 2>&1`; then
|
if echo $- | grep "i" >/dev/null 2>&1; then
|
||||||
#script is running in interactive mode
|
# script is running in interactive mode
|
||||||
su - -c "${app_command}"
|
su - -c "${app_command}"
|
||||||
else
|
else
|
||||||
#script is running in non-interactive mode
|
# script is running in non-interactive mode
|
||||||
if [ $XDG_SESSION_TYPE = "wayland" ] ; then
|
if [ "$XDG_SESSION_TYPE" = "wayland" ] ; then
|
||||||
xhost +SI:localuser:root
|
xhost +SI:localuser:root
|
||||||
pkexec ${app_command}
|
pkexec ${app_command}
|
||||||
xhost -SI:localuser:root
|
xhost -SI:localuser:root
|
||||||
|
Loading…
Reference in New Issue
Block a user