Linux Mint 20 Cinnamon Auto Login with wifi

I wanted my occasional use PC (connected to a TV) to autologin and auto connect to the wifi, so I don't have to type the password into the login session, nor into the gnome keyring when the wifi starts.

Doing this does reduce security, so usual warnings apply! Why I wanted to do this is the PC is only really used with the TV and logging in via the air mouse and awkward keyboard is annoying , so I wanted the PC to auto login, and connect to the wifi so I can access it immediately.

In theory, it should be possible to do all of this from the GUI - simply set your user as auto login via the "Login WIndow" administration, and in Network Settings, ensure the wifi connection is available to all users.

I think - possibly due to my own fiddling, these were not working. Login Window never showed, but to set auto login, you can edit on the command line:

sudo nano /etc/lightdm/lightdm.conf

Add the line autologin-user= followed by your username if it is not there.

[Seat:*]
autologin-user=dan

Auto login works fine, but then you get prompted for the password again to unlock the gnome keyring in order to connect to the wifi. This can be solved by making the connection available to all users (if it works via the GUI for you), or by putting the password into a network manager config file

sudo nano /etc/NetworkManager/system-connections/Auto\ xxx.nmconnection

Auto\ xxx.nmconnection should already exist, but name will vary e.g. xxx is the name of your wifi connection.

In the file, locate the [wifi-security] section. Comment out psk-flags=1 (add # in front), then add a new line psk= followed by your wifi password

...snip...

[wifi-security]
key-mgmt=wpa-psk
#psk-flags=1
psk=wifipasswordgoeshere

...snip...

That should do it!

Thanks to posts
https://forums.linuxmint.com/viewtopic.php?t=286267
https://forums.linuxmint.com/viewtopic.php?t=330037

Labels

Linux | Linux Mint | PC