Enable auto-login on Debian VM boot

OK

1.
when I try to run any software

... is that just the case for running updates, or any command that requires the use of sudo?

2. At #19, you referenced the Debian Wiki article link Maarten provided, which says in part

Enable autologin​


Look up these lines in lightdm configuration file, uncomment them and customize to your preference.



[Seat:*]
#autologin-user=
#autologin-user-timeout=0

...what did you place at those lines, can you copy paste that here please?

With the updated information I have from you on your DE, I have set up one of my installed Debian distros with autologin, and it works fine, so we need to establish the differences you have.

Cheers

Wizard
 


OK

1.


... is that just the case for running updates, or any command that requires the use of sudo?

2. At #19, you referenced the Debian Wiki article link Maarten provided, which says in part



...what did you place at those lines, can you copy paste that here please?

With the updated information I have from you on your DE, I have set up one of my installed Debian distros with autologin, and it works fine, so we need to establish the differences you have.

Cheers

Wizard
Sorry for the delay, I was out of town for the holidays.

So if I try to do sudo, it does prompt for a password.

These are the lines added to the lightDM configuration file:

Code:
[Seat:*]
autologin-user=user
autologin-user-timeout=0
 
So if I try to do sudo, it does prompt for a password.

The advice given was not to bypass sudo, that is still needed within the VM to perform certain functions.

The advice was to provide autologin at the login window, before entering the VM desktop environment.

Can you give us details of the prompt you see in Terminal in the VM?

For example, mine in this distro I am currently in is as follows

Code:
chris@bullseyeMATEtesting:~$

Thanks

Wiz
 
The advice given was not to bypass sudo, that is still needed within the VM to perform certain functions.

The advice was to provide autologin at the login window, before entering the VM desktop environment.

Can you give us details of the prompt you see in Terminal in the VM?

For example, mine in this distro I am currently in is as follows

Code:
chris@bullseyeMATEtesting:~$

Thanks

Wiz
user@computer:~$
 
So you want to run sudo without having to enter a password afterwards?
 
No. I want to start the VM and use programs without a password.
Right now it does display the desktop without a password, but when I open any program, for example the browser, it then requires the keyring password.

I want to keep the sudo password requirement
 
Can you give examples because I just setup the same autologin in a vm and I am not getting any applications to ask for a password. However you should be able to open the keyring GUI application and then set a keyring password.
1. Open "Passwords and Keys" application through the menu
2. Click on the "+" symbol.
3. Click on "Password keyring"
4. A popup will appear asking your for a new keyring name, enter a name.
5. Afterwards it will ask you to enter a password for the keyring you just named, just leave the password blank/empty and press continue twice.
 
Last edited:
Can you give examples because I just setup the same autologin in a vm and I am not getting any applications to ask for a password. However you should be able to open the keyring GUI application and then set a keyring password.
1. Open "Passwords and Keys" application through the menu
2. Click on the "+" symbol.
3. Click on "Password keyring"
4. A popup will appear asking your for a new keyring name, enter a name.
5. Afterwards it will ask you to enter a password for the keyring you just named, just leave the password blank/empty and press continue twice.
Ok so let's take Skype as an example. So when I get auto-logged in to the VM, and open skype, it then has the keyring password prompt pop up, which is asking for the same password for the user to login.

If I go to:
Passwords and Keys
Then the Login section
Skype for Desktop has 2 entries
If I delete them, then Skype logs me out of the account

I don't see the ability to add a key
 
Ok so let's take Skype as an example. So when I get auto-logged in to the VM, and open skype, it then has the keyring password prompt pop up, which is asking for the same password for the user to login.
The way gnome-keyring works is that normally when you don't have autologin enabled a default keyring automatically gets created and your user login password is is used to unlock that default keyring. Now because you have autologin enabled, the keyring doesn't know what password to use to unlock the keyring where the credentials for Skype is stored. You can configure that keyring the unlocked without password, but the credentials for Skype still automatically get saved in the keyring.

I tried all of this myself to verify it, now here's the thing the Skype because seems to have a dependency on "gnome-keyring". So it seems to Skype is packages to automatically store you Skype credentials in gnome-keyring so that's the reason why that is happening. I tried another application, discord. When I login to Discord reboot and then open Discord again I found that Discord also automatically logs the user in but there are no credentials saved in they keyring, I found that in the users homedir $HOME/.config/discord.

However I'm getting the idea that this is the normal behavior of modern chat apps, I also found a post on reddit about a Discord user who is on Windows who was also wanting for Discord not to remember their password.

To verify this I installed an old(and opensource) chat app called "Pidgin" together with the plugin for Pidgin,"purple-discord. I was able to login into Discord on the Pidgin chat app. I then rebooted, opened pidgin again and this time Pidgin was asking for a password to login to Discord. Pidgin does have an option to save your password.

I also did some searching and it seems with the Windows Skype client there are a few ways around it, not the easiest ways either for a non-technical person. I also came across this post.
So this person is having the same issues as you but is use KDE Plasma and only having issues with Skype, while the other programs they are using are doing as they want, not remember there password.

Also decided to install KDE Plasma on my Debian vm to test out both Skype and Discord. KDE Plasma uses sddm as Desktop Display Manager and also supports auto-login. As I already assumed the Skype packages still depends on gnome-keyring so automatically logins after you login the first time into Skype and Discord reacts the same way as well as I had tested with Cinnamon.

After having tested out an old chat client, a new chat client, another Desktop Environment(on Debian) and having read those posts it still seems to to me that modern chat apps are designed that way. So whether you are using autologin or not modern chat apps seem to have a way builtin whether into the app or by using os authentication tools to have your credentials saved so that you only have to login once and after that they automatically login when you open them.

So in short it differs per application what is used to store the credentials of the user but it seems most modern chat apps are designed that way. Although I think that would be modern proprietary chat apps and the only exception I have come across so far is the Linux Microsoft Teams app, I don't know what opensource chat apps would do since I don't use any like that are similar to Discord and Skype. I would think you would have more options with those since opensource apps tend to give you more choice in what you want. So there's no solution an opensource os(Debian or any other distribution) can give) for a choice that a proprietary app makes. I know it's not a solution you were hoping for but it's at least an answer, which I hope will give you at some satisfaction of understanding why it's not working as you want.

So I don't know what other programs you are using that you are having the same with where the login gets saved even after a reboot of your system?
 
Last edited:
The way gnome-keyring works is that normally when you don't have autologin enabled a default keyring automatically gets created and your user login password is is used to unlock that default keyring. Now because you have autologin enabled, the keyring doesn't know what password to use to unlock the keyring where the credentials for Skype is stored. You can configure that keyring the unlocked without password, but the credentials for Skype still automatically get saved in the keyring.

I tried all of this myself to verify it, now here's the thing the Skype because seems to have a dependency on "gnome-keyring". So it seems to Skype is packages to automatically store you Skype credentials in gnome-keyring so that's the reason why that is happening. I tried another application, discord. When I login to Discord reboot and then open Discord again I found that Discord also automatically logs the user in but there are no credentials saved in they keyring, I found that in the users homedir $HOME/.config/discord.

However I'm getting the idea that this is the normal behavior of modern chat apps, I also found a post on reddit about a Discord user who is on Windows who was also wanting for Discord not to remember their password.

To verify this I installed an old(and opensource) chat app called "Pidgin" together with the plugin for Pidgin,"purple-discord. I was able to login into Discord on the Pidgin chat app. I then rebooted, opened pidgin again and this time Pidgin was asking for a password to login to Discord. Pidgin does have an option to save your password.

I also did some searching and it seems with the Windows Skype client there are a few ways around it, not the easiest ways either for a non-technical person. I also came across this post.
So this person is having the same issues as you but is use KDE Plasma and only having issues with Skype, while the other programs they are using are doing as they want, not remember there password.

Also decided to install KDE Plasma on my Debian vm to test out both Skype and Discord. KDE Plasma uses sddm as Desktop Display Manager and also supports auto-login. As I already assumed the Skype packages still depends on gnome-keyring so automatically logins after you login the first time into Skype and Discord reacts the same way as well as I had tested with Cinnamon.

After having tested out an old chat client, a new chat client, another Desktop Environment(on Debian) and having read those posts it still seems to to me that modern chat apps are designed that way. So whether you are using autologin or not modern chat apps seem to have a way builtin whether into the app or by using os authentication tools to have your credentials saved so that you only have to login once and after that they automatically login when you open them.

So in short it differs per application what is used to store the credentials of the user but it seems most modern chat apps are designed that way. Although I think that would be modern proprietary chat apps and the only exception I have come across so far is the Linux Microsoft Teams app, I don't know what opensource chat apps would do since I don't use any like that are similar to Discord and Skype. I would think you would have more options with those since opensource apps tend to give you more choice in what you want. So there's no solution an opensource os(Debian or any other distribution) can give) for a choice that a proprietary app makes. I know it's not a solution you were hoping for but it's at least an answer, which I hope will give you at some satisfaction of understanding why it's not working as you want.

So I don't know what other programs you are using that you are having the same with where the login gets saved even after a reboot of your system?
Wow thank you, that is very amazing that you did all of those tests to help me resolve this. You are very kind.

So Brave browser also asks for the keyring login, but the native Firefox that came with the distro does not.
 
Not knowing much about such stuff - VMs? Never use 'em; I'd sooner run a 'chroot' - would it not be identical to setting-up auto-login in a 'native' install.......hm?

Just curious..!

Mike. ;)
 

Members online


Latest posts

Top