Enable autologin lightdm

Forum rules
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
bizcuit
Gangbanger
Posts: 330
Joined: Sat Feb 16, 2013 8:31 pm

Enable autologin lightdm

Unread post by bizcuit » Fri Feb 22, 2013 9:23 pm

Wasn't sure where to post this so adding it to this section seemed an appropriate place.

Had some headaches figuring out how to automatically login with lightdm. Wasn't covered very well on the net and decided to post about it here for others. In case like me you have a tendency to binge drink and are an impatient person by nature. :P

Anyway it turned out to be simple and straightforward. Opened the /etc/lightdm/lightdm.conf file with root or sudo privileges and scrolled down to a section in the file called [SeatDefaults], uncommented the line for autologin-user= and added my username, ... autologin-user=myusername.

There's another entry further up in the lightdm.conf file for autologin-user= and that threw me off for awhile, tried uncommenting it and no joy, no automatic login, shrugs.

Next edited a file named Default Xsession, on this OS "Trollinger" there was no file named "lightdm-xsessions.desktop" found in /usr/share/xsessions. Just the aforementioned Default Xsession file.

Changed it to be this to launch openbox. By way of example ...
[Desktop Entry]
Version=1.0
Name=Openbox Session
Exec=openbox-session
Icon=
Type=Application

That's about all I'd wanted to babble about and hopefully help another nixer on the interwebs tame autologin with lightdm. At least this is what worked for me ...


VlLBBQ ! ;)

User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: Enable autologin lightdm

Unread post by wuxmedia » Fri Feb 22, 2013 10:11 pm

^ you could add it to the Wiki?
"Seek, and Ye shall find"
"Github | Chooons | Site"

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: Enable autologin lightdm

Unread post by rhowaldt » Sat Feb 23, 2013 1:27 am

^ http://linuxbbq.org/wiki/index.php?title=LightDM :)

(didn't add the second bit because it is written vague as hell and I don't have LightDM to test it with)
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

bizcuit
Gangbanger
Posts: 330
Joined: Sat Feb 16, 2013 8:31 pm

Re: Enable autologin lightdm

Unread post by bizcuit » Sat Feb 23, 2013 3:21 am

^ Nicely summarized Rhow ... Though still kinda 1/2 cooked. Autologin on lightdm might not work w/o setting up the DE/WM you want in /usr/share/xsessions too.

I snagged most of it from Machine himself in a post in another forum. Just thought it needed clarification. Tried following what looked to be simple instructions, uncomment line, add your user name and you should be good to go. Neglected to mention the same line occurred more than once in the file and I neglected to closely read the file and find the other identical line in the [SeatDefaults] section. So it turned into a pita. Why isn't it working !!?!?!? :P

The other is just editing a file in /usr/share/xsessions. I guess often there'll be a file called "lightdm-xsessions.desktop" located there. In the case of Trollinger there are already a few x.desktop files setup, one for lxde and another for openbox and one named "Default Xsession" I edited that one, as described above to get openbox to launch as the default desktop in lightdm autologin ... Shrugs. What you need to add to that file is obviously going to depend on which de/wm you're intending to set as default. Ok ... did my best to explain what worked for me.

Subject just isn't well covered around the interwebs yet. Buncha buntu specific stuff and many that say you have to edit this, that ... pam.d/etc. Autologin is working as expected now, so am happy regardless. ;)

@Wux ... Didn't know someone could edit the wiki. Thanks ... makes sense, a community wiki that's maintained by the community. Hadn't even crossed my mind though.


Vll! :)

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: Enable autologin lightdm

Unread post by dkeg » Sat Feb 23, 2013 1:24 pm

@Wux ... Didn't know someone could edit the wiki. Thanks ... makes sense, a community wiki that's maintained by the community. Hadn't even crossed my mind though.
Yeah, imagine that. Well, that's how we roll here.

As per your original post, worked for me no problem. Edits in both

Code: Select all

/etc/lightdm/lightdm.conf
and

Code: Select all

/usr/share/xsessions/lightdm-xsession.desktop
Not sure if I'm really an auto login type user, but worked np nonetheless. FWIW, I'm running Kielbasa

Work hard; Complain less

bizcuit
Gangbanger
Posts: 330
Joined: Sat Feb 16, 2013 8:31 pm

Re: Enable autologin lightdm

Unread post by bizcuit » Sun Feb 24, 2013 12:02 am

Glad Dkeg ... I am definitely an autologin person aka: Lazy. :P

Was hoping to simplify it for others. Perhaps bring some nixers that might need this type of fix and/or might come here and end up trying and really liking Linux BBQ when they come up empty with searches. Took me wayyyyy longer than I thought it was going to. Would like to save other nixers the headaches if possible.


Vll! :)

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Enable autologin lightdm

Unread post by machinebacon » Sun Feb 24, 2013 3:52 am

Next time simply just ask if finding a solution takes longer than 2 minutes ;) LightDM is the most straightforward login manager and I wonder why it's problematic for some. Imagine it would be slim, or an "inittab"-ish autologin, that would be a much bigger pain. ;)
Cheers!
..gnutella..

bizcuit
Gangbanger
Posts: 330
Joined: Sat Feb 16, 2013 8:31 pm

Re: Enable autologin lightdm

Unread post by bizcuit » Sun Feb 24, 2013 11:46 am

^ Ah you're right, probably shouldve just asked. Became like a challenge to figure it out. Am not only a lazy person, also tend to be bull headed too. :P

Post Reply