Im trying to find a way to auto login past the CLI login so I can execute a script automatically when I plug in the Pi.
I have found a few ways to do this online but I think they are all based around upstart and the method has changed since systemd has been introduced.
Can anyone help me here?
Cheers,
James
-
- Posts: 3
- Joined: Fri Jul 20, 2012 9:07 pm
-
- Posts: 24
- Joined: Tue Jun 23, 2015 10:48 pm
Re: Auto Login On Ubuntu Mate
Haven't tried this on a PI but this is what I do on another ARM based SBC....
Only works if you are running lightdm...
Edit:
/usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf
Then add the following line at the end:
autologin-user=pi
Bruce
Only works if you are running lightdm...
Edit:
/usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf
Then add the following line at the end:
autologin-user=pi
Bruce
Re: Auto Login On Ubuntu Mate
Isn't share supposed to mean you can share that with other systems, which may or may not need the same user to automatically log in? Granted, of course, that most people don't do that, and under 16.04 of Ubuntu, I can't get it to automatically log in even though the following is set:brucetexpeditefile wrote:Haven't tried this on a PI but this is what I do on another ARM based SBC....
Only works if you are running lightdm...
Edit:
/usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf
Then add the following line at the end:
autologin-user=pi
/etc/lightdm/lightdm.conf
to:
[Seat:*]
autologin-user=whateverUser
-
- Posts: 24
- Joined: Tue Jun 23, 2015 10:48 pm
Re: Auto Login On Ubuntu Mate
Sorry, I missed the CLI entry. Here is how I do this on the PI as well as the other ARM computer running mate.
sudo vi /etc/systemd/system/getty.target.wants/getty@tty1.service
Find the line 'ExecStart=-/sbin/agetty %I $TERM
Change it to 'ExecStart=-/sbin/agetty --noclear -a pi %I $TERM
Change the pi entry to your login name.
Bruce
sudo vi /etc/systemd/system/getty.target.wants/getty@tty1.service
Find the line 'ExecStart=-/sbin/agetty %I $TERM
Change it to 'ExecStart=-/sbin/agetty --noclear -a pi %I $TERM
Change the pi entry to your login name.
Bruce
-
- Posts: 24
- Joined: Tue Jun 23, 2015 10:48 pm
Re: Auto Login On Ubuntu Mate
Converted the entry to a mailto link? Here is the file name.
Note: I'm running 15.10. Thanks for the heads up on 16.04
Bruce
Code: Select all
etc/systemd/system/getty.target.wants/getty@tty1.service
Bruce