paul4ar
Posts: 8
Joined: Mon Mar 14, 2016 7:19 pm

Auto-login to Raspbian desktop with own username?

Sat Mar 26, 2016 10:13 pm

Using Raspian Jessie here. I initially used the raspi-config tool to set my system to auto-login to the desktop environment as user pi. However, later, I deleted and replaced user pi with user paul in the appropriate places and this works fine; except for one thing: I now no longer can auto-login to the desktop environment and it now prompts for the password.

How do I set user paul to autologin to the desktop environment?

Thanks,

Paul.

User avatar
DougieLawson
Posts: 41683
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Auto-login to Raspbian desktop with own username?

Sun Mar 27, 2016 12:12 am

Edit /etc/systemd/system/autologin@.service and change the one occurence of 'pi' in that file to 'paul'
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on Twitter/LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

federicosibella
Posts: 7
Joined: Mon Jul 27, 2015 1:45 pm
Location: Bergamo, Italy
Contact: Website

Re: Auto-login to Raspbian desktop with own username?

Thu Jun 16, 2016 2:16 pm

Hello, I have the same request.
I tried changing the file that paul4r mentioned but the autologin doesn't work
If I remove the check for autologin from raspy-config utility rebooting the PI i get the login window. If I enable the autologin option it starts with Pi login automatically. :?:
Is there any other option to check?

thank you in advance
Federico

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Auto-login to Raspbian desktop with own username?

Thu Jun 16, 2016 2:59 pm

federicosibella wrote: If I remove the check for autologin from raspy-config utility rebooting the PI i get the login window.
That sounds correct, without autologin you'll get the login window.
If I enable the autologin option it starts with Pi login automatically.
That sounds correct as well, since the user "pi" is hardcoded for the autologin.

If you want to autologin with a user other than "pi", then read and follow @Dougie's post.

Romonga
Posts: 123
Joined: Mon May 09, 2016 7:09 pm
Location: Montgomery Il

Re: Auto-login to Raspbian desktop with own username?

Thu Jun 16, 2016 6:21 pm

My understanding is that this is controlled in /etc/lightdm/lightdm.conf

There is a line in there that reads autologin-user=pi

i simply placed my username in that file, rebooted and it auto-logged me in with that id.
You can run, but you will only die tired.

federicosibella
Posts: 7
Joined: Mon Jul 27, 2015 1:45 pm
Location: Bergamo, Italy
Contact: Website

Re: Auto-login to Raspbian desktop with own username?

Thu Jun 16, 2016 6:34 pm

Romonga wrote:My understanding is that this is controlled in /etc/lightdm/lightdm.conf

There is a line in there that reads autologin-user=pi

i simply placed my username in that file, rebooted and it auto-logged me in with that id.
This is what I did but it didn't work. I edited the lightdm.conf file placing instead of PI user my new user in the auto-logon parameter line. I rebooted the Raspberry and it started again with PI logged in... The other tests I described in my post were made just to check auto logon and not auto logon in order to test my new created user...

Romonga
Posts: 123
Joined: Mon May 09, 2016 7:09 pm
Location: Montgomery Il

Re: Auto-login to Raspbian desktop with own username?

Thu Jun 16, 2016 7:36 pm

Odd, When I wanted to get rid of the default user I did the following.

Create User
sudo adduser <username>

Add user to groups
sudo usermod -a -G pi,adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,netdev,spi,i2c,gpio,pi-share <username>

sudo nano /etc/lightdm/lightdm.conf
Replaced =Pi to my user id.

I rebooted and autologon worked.
You can run, but you will only die tired.

federicosibella
Posts: 7
Joined: Mon Jul 27, 2015 1:45 pm
Location: Bergamo, Italy
Contact: Website

Re: Auto-login to Raspbian desktop with own username?

Mon Jun 20, 2016 6:27 am

thank you for your reply but if I do like this my user will be automatically added to th e admins group isn't it?
that's not good for my requirements since my autologged user must not be a privileged user

federicosibella
Posts: 7
Joined: Mon Jul 27, 2015 1:45 pm
Location: Bergamo, Italy
Contact: Website

Re: Auto-login to Raspbian desktop with own username?

Mon Jun 20, 2016 6:49 am

SOLVED

since I made many tests on this installation I decided to format the Sd card and make a new Raspbian installation
After that i created my user, edited the lightdm.conf file and... it worked fine....

thank you for the support!

Return to “Troubleshooting”