Skip to content
Snippets Groups Projects
Commit 486db9b6 authored by Alberto LIVIO BECCARIA's avatar Alberto LIVIO BECCARIA
Browse files

Impostata sessione di default in autologin

parent 411d873a
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash
clear() { clear() {
# comment again the lines to disable autologin
sed -i '/autologin-user=/s/^#*/#/' /etc/lightdm/lightdm.conf sed -i '/autologin-user=/s/^#*/#/' /etc/lightdm/lightdm.conf
sed -i '/session-cleanup-script=/s/^#*/#/' /etc/lightdm/lightdm.conf sed -i '/session-cleanup-script=/s/^#*/#/' /etc/lightdm/lightdm.conf
sed -i '/autologin-session=/s/^#*/#/' /etc/lightdm/lightdm.conf
} }
dm_restart() { dm_restart() {
...@@ -23,8 +25,10 @@ start() { ...@@ -23,8 +25,10 @@ start() {
# So, one solution is the following: # So, one solution is the following:
SEDCMD="/#*autologin-user=.*/s/"'.*'"/autologin-user=$ESAME_USER/" SEDCMD="/#*autologin-user=.*/s/"'.*'"/autologin-user=$ESAME_USER/"
sed -i "$SEDCMD" /etc/lightdm/lightdm.conf sed -i "$SEDCMD" /etc/lightdm/lightdm.conf
# enable auto-relogin (remove the comment in the file) # enable auto-relogin (uncomment the line in the file)
sed -i '/session-cleanup-script=/s/^#*//' /etc/lightdm/lightdm.conf sed -i '/session-cleanup-script=/s/^#*//' /etc/lightdm/lightdm.conf
# enable autologin default session (uncomment the line in the file)
sed -i '/autologin-session=/s/^#*//' /etc/lightdm/lightdm.conf
#sleep 5 #sleep 5
dm_restart dm_restart
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment