Autologin on lightdm

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
sikejsudjek

Autologin on lightdm

Post by sikejsudjek »

Hi, just upgraded to 18.2 and installed light dm. How do I autologin ? I've found a couple of tutorials for other distros and edited the lightdm config file but its still asking for a password ?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
ehtron
Level 10
Level 10
Posts: 3364
Joined: Thu Apr 14, 2016 8:15 am
Location: Germany / Baltic Sea
Contact:

Re: Autologin on lightdm

Post by ehtron »

Hi :)

copy this in the terminal
for the current user.

Code: Select all

echo "autologin-user="$USER | sudo tee -a /etc/lightdm/lightdm.conf
and reboot ;)
Lg. Ehtron :)
Keine Hilfe bei fehlender System / Desktop Angabe.
Ich gebe Hilfe zur Selbsthilfe.
User avatar
Pjotr
Level 24
Level 24
Posts: 20120
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Autologin on lightdm

Post by Pjotr »

@ehtron: shouldn't the contents of lightdm.conf be a bit more, namely:

Code: Select all

[Seat:*]
autologin-guest=false
autologin-user=username
autologin-user-timeout=0
.... where 'username' needs to be replaced by, well, the user name?
Last edited by Pjotr on Thu Jul 06, 2017 4:49 am, edited 1 time in total.
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
sikejsudjek

Re: Autologin on lightdm

Post by sikejsudjek »

Thanks Pjotr that worked - I think I edited the wrong file before.
sikejsudjek

Re: Autologin on lightdm

Post by sikejsudjek »

Spoke too soon ! Worked the first time - now login screen is back. It briefly flashes up a text saying x server failed to start, lightdm login comes back, and if I put in password it loads up mint correctly. Doesn't seem to want to autologin whatever I do....
User avatar
ehtron
Level 10
Level 10
Posts: 3364
Joined: Thu Apr 14, 2016 8:15 am
Location: Germany / Baltic Sea
Contact:

Re: Autologin on lightdm

Post by ehtron »

Hi :)

do you used my setup?

please show your conf

Code: Select all

cat /etc/lightdm/lightdm.conf
Lg. Ehtron :)
Keine Hilfe bei fehlender System / Desktop Angabe.
Ich gebe Hilfe zur Selbsthilfe.
User avatar
Pjotr
Level 24
Level 24
Posts: 20120
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Autologin on lightdm

Post by Pjotr »

Note that the user name isn't allowed to contain capital letters "under the hood"....
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
sikejsudjek

Re: Autologin on lightdm

Post by sikejsudjek »

Thanks seems to be working now. Somehow the file had a couple of extra entries. Removing these and mdm seems to have fixed it. Thanks all for your help !
rambo919
Level 5
Level 5
Posts: 673
Joined: Wed May 22, 2013 3:11 pm

Re: Autologin on lightdm

Post by rambo919 »

Merely having mdm and lightdm installed at the same time created problems for me too(including that flashing blue screen prompt), as if both were trying to run the desktop even though lightdm was clearly set as the default... might be because mdm was set to auto login and lightdm was not?
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Autologin on lightdm

Post by Cosmo. »

If you have an upgraded system (with mdm from the previous version) and activated auto-login and install after that lightdm, auto-login will be automatically set for lightdm

In the official instructions is set, that after installing lightdm mdm must get removed. Following my experiments the system will not properly shutdown if both are installed, although in theory they should be able to coexist.
rambo919
Level 5
Level 5
Posts: 673
Joined: Wed May 22, 2013 3:11 pm

Re: Autologin on lightdm

Post by rambo919 »

Nope auto-login was set previously, did not do it. Edited the conf manually now as previously shown a few posts up.... infinite booting. Booted into recovery mode and removed those three lines, boots fine but of course no auto logon.
User avatar
Mr_Sinister
Level 1
Level 1
Posts: 17
Joined: Sat Jul 08, 2017 3:57 am

Re: Autologin on lightdm

Post by Mr_Sinister »

It works well for me. Thank you.
User avatar
Terryphi
Level 4
Level 4
Posts: 254
Joined: Mon Jun 06, 2011 6:30 am
Location: West Wales. UK
Contact:

Re: Autologin on lightdm

Post by Terryphi »

I have upgraded to 18.2 and installed lightDM and removed mdm. Everything is fine but I now need to make it autologin. I have read the posts above but I do not have file /etc/lightdm/lightdm.conf . Should it already exist or does it need to be created? No one mentioned this.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Autologin on lightdm

Post by Cosmo. »

It has to get created. But you can make your life easier: Open the settings for the login window and disable the guest account. You can at once enable it again, if you want. This step creates the file automatically and - more important - creates inside also the necessary file structure; so only the 2 lines for activating auto-login need to get added (the last 2 lines as given by Pjotr).
User avatar
Terryphi
Level 4
Level 4
Posts: 254
Joined: Mon Jun 06, 2011 6:30 am
Location: West Wales. UK
Contact:

Re: Autologin on lightdm

Post by Terryphi »

Thanks Cosmo for your clear explanation. That worked perfectly.
User avatar
Mr_Sinister
Level 1
Level 1
Posts: 17
Joined: Sat Jul 08, 2017 3:57 am

Re: Autologin on lightdm

Post by Mr_Sinister »

To be quite honest I don't really understand the purpose of making autologin active so difficult. Linux Mint is supposed to be user friendly so this is a huge misunderstanding in my opinion. All in all it's possible but still - no nice menu with even nicer switch just to activate one simple option is a faux pas. I think we can all agree editing (or creating in this case) configuration files is not the most user friendly solution to choose.
Last edited by Mr_Sinister on Thu Jul 05, 2018 7:40 am, edited 1 time in total.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Autologin on lightdm

Post by Cosmo. »

I would agree, but a developer here calls that nitpicking.
User avatar
Terryphi
Level 4
Level 4
Posts: 254
Joined: Mon Jun 06, 2011 6:30 am
Location: West Wales. UK
Contact:

Re: Autologin on lightdm

Post by Terryphi »

Just for the record, Cosmo. I for one find your forum contributions very helpful.
Image
Version: LM 21.3 64bit Mate "If something is worth doing, it is worth doing for free."
User avatar
jameskga
Level 4
Level 4
Posts: 220
Joined: Sat Jun 04, 2016 8:23 pm

Re: Autologin on lightdm

Post by jameskga »

Me too. I also enjoy his style.

Keep going Cosmo.
They say your favorite Mint edition was the one you installed when you still went to school with your friends.
I am out there
User avatar
Pjotr
Level 24
Level 24
Posts: 20120
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Autologin on lightdm

Post by Pjotr »

Cosmo. wrote:I would agree, but a developer here calls that nitpicking.
I don't want to post in that thread, because it has gone sour....

First of all, I consider your contributions as very valuable for this community. Your advice is always expert and helpful. :)

But I know a bit about translations, because I've been an active Dutch translator since 2011. Both upstream (applications) and downstream (the distributions).

The Mint and Ubuntu developers don't concern themselves with translations at all. They leave that entirely to the translation teams on Launchpad, which are completely autonomous. So if you wish to correct an existing translation, you should notify the Launchpad translation team for your language. Or request to join that team....
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
Locked

Return to “Cinnamon”