4

Yesterday I have installed Debian on a virtual machine.

I have SSH configured and everything set up.

I don't like developing inside a VM.
It doesn't help to resize the browser and test everything the way I want.

So, I decided to connect using Xming and PuTTY, which works flawlessly.

The boring stuff is that I have to always choose a username and password to be able to use the machine.

How can I set it to automatically login into the desktop without asking username or password?

EDIT
Author says re ssh keys "It's not that. I just want that when I boot the VM, it goes straight to the desktop instead of the LXDE login screen. Everything else is working perfectly. "

  • @barlop I was explaining WHY I want to do on this way. I can remove those lines if needed. The question itself might be badly worded, but it is no reason to downvote. I just want to skip the login screen and go to the desktop. – Ismael Miguel Jan 9 '15 at 11:05
  • +1 yeah I removed the downvote even before your comment, 'cos at least the question is interesting..but it's annoying that your question looked like you might've needed to know about ssh keys (talking about ssh and wanting to log in automatically) when you later say you weren't asking about ssh keys. Also at least you responded fast to say you didn't – barlop Jan 9 '15 at 11:27
  • @barlop I'm really sorry for the wording. Your edit looks great! Can you please remove the line saying "I have SSH configured and everything set up."? And change "The boring stuff is that I have to always choose a username and password to be able to use the machine." to "The boring part is that I have to login first to the desktop to use it."? That might help a lot more to define what I want. – Ismael Miguel Jan 9 '15 at 11:40
  • ok but first, to clarify, which machine is it that you have to use the username and password to get into? can you provide a screenshot (could be a pic taken from your phone), or something from google images, that shows the user/pass screen that you need to automatically get through? ('cos I guess you have a windows system a linux system and ssh and a pic would clarify what you mean) – barlop Jan 9 '15 at 11:49
  • 1
    @barlop If you have any doubt and you want to try it yourself, and you find any doubt, you can ask here and I will happily answer. – Ismael Miguel Jan 9 '15 at 15:46
4

This is really easy to do.

Open the file /etc/lightdm/lightdm.conf and navigate to line 78 (you can enable line numbers on Leafpad).

It should be saying #autologin-user=.

Remove the # and change it to have your username after (for example: autologin-user=test).

Reboot your machine and wait a little.


For more informations, you can also check https://askubuntu.com/questions/426831/lxde-auto-login


If you are using Debian 9, check https://superuser.com/a/1337778/777328
(Thank you Adrian W for the link!)

  • I've installed debian 8.5 and LXDE and there is no /etc/lightdm/lightdm.conf file – integratorIT Aug 23 '16 at 14:05
  • 1
    @infografik I know. This is specific to Debian 7. On Debian 8.5, it is a bit different. I can't say now because I don't remember how it is, but as soon as I get home (in 5 hours), I can tell how I've done with Debian 8.5. I have it working without GUI, and the setting to run GUI-less is on the same file. – Ismael Miguel Aug 23 '16 at 14:08
  • 1
    For newer Debian versions, see superuser.com/a/1337778/777328 – Adrian W Feb 4 at 17:36
  • @AdrianW Done, added to the post. Thank you! – Ismael Miguel Feb 5 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.