Soporte para iniciar como root en Ubuntu 18.04/Debian Testing
This commit is contained in:
parent
4c6b502b07
commit
ba28a21c66
22
src/easy-samba-gtk-admin
Executable file → Normal file
22
src/easy-samba-gtk-admin
Executable file → Normal file
|
@ -2,13 +2,13 @@
|
|||
|
||||
##############################################################
|
||||
# Crear carpetas compartidas en Linux (GTK) #
|
||||
# U. Modificacion: 07-06-2018 #
|
||||
# U. Modificacion: 08-06-2018 #
|
||||
# Autor: q3aql #
|
||||
# Contacto: q3aql@openmailbox.org #
|
||||
# Licencia: GPL v2.0 #
|
||||
##############################################################
|
||||
VERSION="1.5 (GTK)"
|
||||
M_DATE="070618"
|
||||
VERSION="1.5.1 (GTK)"
|
||||
M_DATE="080618"
|
||||
|
||||
# Enlace con gksudo,gksu o bessu a easy-samba-gtk
|
||||
function showRootMessage() {
|
||||
|
@ -30,14 +30,26 @@ function showRootMessage() {
|
|||
elif [ -f /bin/beesu ] ; then
|
||||
beesu /usr/bin/easy-samba-gtk
|
||||
exit
|
||||
elif [ -f /bin/sudo ] ; then
|
||||
xterm -T "easy-samba ${VERSION} (${M_DATE})" -fa Monospace -fs 10 -e "sudo easy-samba-gtk"
|
||||
exit
|
||||
elif [ -f /usr/bin/sudo ] ; then
|
||||
xterm -T "easy-samba ${VERSION} (${M_DATE})" -fa Monospace -fs 10 -e "sudo easy-samba-gtk"
|
||||
exit
|
||||
elif [ -f /usr/bin/su ] ; then
|
||||
xterm -T "easy-samba ${VERSION} (${M_DATE})" -fa Monospace -fs 10 -e "su -c 'easy-samba-gtk'"
|
||||
exit
|
||||
elif [ -f /bin/su ] ; then
|
||||
xterm -T "easy-samba ${VERSION} (${M_DATE})" -fa Monospace -fs 10 -e "su -c 'easy-samba-gtk'"
|
||||
exit
|
||||
else
|
||||
zenity2 -h &> /dev/null
|
||||
zenity -h &> /dev/null
|
||||
output=$?
|
||||
if [ ${output} -eq 0 ] ; then
|
||||
zenity --title "easy-samba ${VERSION} (${M_DATE})" --info \
|
||||
--text "El programa 'easy-samba-gtk' no ha podido ser ejecutado como administrador\n\nPorfavor, ejecuta el comando 'easy-samba-gtk' como usuario root en la terminal"
|
||||
else
|
||||
xterm -T "easy-samba ${VERSION} (${M_DATE})" -e "easy-samba-gtk-admin --error"
|
||||
xterm -T "easy-samba ${VERSION} (${M_DATE})" -fa Monospace -fs 10 -e "easy-samba-gtk-admin --error"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user