TKD Guy
Posts: 4
Joined: Fri Dec 28, 2012 7:30 pm

Disable Auto-Login

Fri Dec 28, 2012 7:38 pm

Hi,

First post :-) And trust me, I Google'd all over the place trying to find this answer before I posted this.

Got the Pi up and running, got tightvnc working. Even configured/customized the boot time startup script so that it runs as pi and not as root when the system boots.

Here's my question: I can't get it to NOT auto login. I want to set up different users so that different family members can config their experience their own way. But with it always logging in as pi, we all see and get the same desktop...

Any/all help will be much appreciated....

TKD Guy

plugwash
Forum Moderator
Forum Moderator
Posts: 3524
Joined: Wed Dec 28, 2011 11:45 pm

Re: Disable Auto-Login

Fri Dec 28, 2012 8:57 pm

The settings are in /etc/lightdm/lightdm.conf

TKD Guy
Posts: 4
Joined: Fri Dec 28, 2012 7:30 pm

Re: Disable Auto-Login

Tue Jan 01, 2013 5:55 pm

Sorry so long to get back to this... Life and stuff.....

Anyway, in that conf file, the only option that makes sense is this one:

#autologin-user=pi

Which you can see that I commented out. I then rebooted, no joy.

Also if this helps, when I'm connected (via tightvnc-jviewer.jar) and then try to log out in (the Pi is running tightvncserver), I get the LXDE logout dialog, but it won't actually let me log out. Instead it takes me back to the desktop...

Any ideas?

User avatar
mad-hatter
Posts: 419
Joined: Sun Feb 26, 2012 2:58 pm
Location: By the UK seaside

Re: Disable Auto-Login

Tue Jan 01, 2013 6:53 pm

Hi,

To shut down the Pi from another machine.
In a root terminal:-

shutdown -h now
or
reboot

Regards

TKD Guy
Posts: 4
Joined: Fri Dec 28, 2012 7:30 pm

Re: Disable Auto-Login

Tue Jan 01, 2013 8:20 pm

mad-hatter-

thanks for the reply, but don't see the relevancy....

do you know how to prevent the Pi under Raspian "wheezy" from automatically logging in each time it boots, or do you know why when I try to log out of LXDE that it doesn't take you back to a log in screen but instead acts like it basically reloads the desktop? that's what I really need help with....

thanks

jdpond
Posts: 3
Joined: Sat Dec 01, 2012 2:28 pm

Re: Disable Auto-Login

Sat Feb 16, 2013 12:50 am

This is probably WAY overdue, but you can do this by editing the lightdm config file:

Code: Select all

sudo nano /etc/lightdm/lightdm.conf
 
If you want to use these values, this will do the editing for you.

Code: Select all

sudo sed -i 's/^greeter-hide-users=true/greeter-hide-users=false/g' /etc/lightdm/lightdm.conf
sudo sed -i 's/^\#greeter-allow-guest=true/greeter-allow-guest=false/g' /etc/lightdm/lightdm.conf
sudo sed -i 's/^\#greeter-show-manual-login=false/greeter-show-manual-login=true/g' /etc/lightdm/lightdm.conf
sudo sed -i 's/^\#allow-guest=true/allow-guest=false/g' /etc/lightdm/lightdm.conf
sudo sed -i 's/^\#allow-guest=true/allow-guest=false/g' /etc/lightdm/lightdm.conf
sudo sed -i 's/^\#autologin-user-timeout=0/autologin-user-timeout=10/g' /etc/lightdm/lightdm.conf
# also comment out default login from 'pi'
sudo sed -i 's/^autologin-user=pi/\#autologin-user=pi/g' /etc/lightdm/lightdm.conf

PiGuy19
Posts: 1
Joined: Sat Jun 14, 2014 2:12 pm

Re: Disable Auto-Login

Sat Jun 14, 2014 2:15 pm

open he lightdm.conf file, set auto login to false, save and exit.
Reboot and it's fixed!

treii28
Posts: 93
Joined: Fri May 10, 2013 4:52 pm

Re: Disable Auto-Login

Fri Jan 16, 2015 4:15 am

check to make sure you don't have another xwindow session manager installed/running. If you aren't running lightdm, modifying the conf file isn't going to do much of anything. (for example, if you installed gdm3, you would need to edit it's conf file)

it is also possible, depending on what dist you are using that it can go directly to a non-managed session without using a manager.

SW

sialee
Posts: 1
Joined: Sun Oct 04, 2015 7:16 am

Re: Disable Auto-Login

Sun Oct 04, 2015 7:19 am

#autologin-user=pi
don't work please help another way

htodd
Posts: 2
Joined: Tue Nov 17, 2015 4:33 pm

Re: Disable Auto-Login

Tue Nov 17, 2015 6:07 pm

I know this late to the party but here is easy mode from a command line......

sudo raspi-config

apollothethird
Posts: 7
Joined: Thu Mar 15, 2018 7:31 am

Re: Disable Auto-Login

Fri Mar 16, 2018 8:49 pm

sialee wrote:
Sun Oct 04, 2015 7:19 am
#autologin-user=pi
don't work please help another way
This is kind of late, but for the Raspbian OS, perform these steps from the command line:

Code: Select all

sudo raspi-config
Then follow with these options:
(enter) Boot Options ->
(enter) Desktop / CLI ->
(enter) B1 Console Text console, requiring user to login ->
(enter) B3 Desktop Desktop GUI, requiring user to login ->
This will stop both the automatic login both from the console and the GUI. It appears that you have to choose both B1 and B2 to ensure that the command-line won't be auto logged in and that you will also have a GUI prompt available.

-- L. James

--
L. D. James
[email protected]
www.apollo3.com/~ljames

network_janitor
Posts: 1
Joined: Sat Oct 05, 2019 7:44 am

Re: Disable Auto-Login

Sat Oct 05, 2019 7:50 am

Attempted to follow prescribed solution by commenting out the 'autologin-user=pi' section of /etc/lightdm/lightdm.conf - That failed, as well, even after a reboot of the pi.

I then ran 'raspi-config' and followed other method of disabling through menu system, this again, rebooted the pi, but solved the issue.

I ran a diff of the .conf file and it shows the only change is commenting out the autologin statement.

Odd that when one manually comments it out = no joy, but when through the menu it works.

Oh well. hope this helps someone :)

Thanks!

Return to “Raspbian”