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. "

11
  • @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. Commented Jan 9, 2015 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
    Commented Jan 9, 2015 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. Commented Jan 9, 2015 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
    Commented Jan 9, 2015 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. Commented Jan 9, 2015 at 15:46

1 Answer 1

7

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!)

8
  • I've installed debian 8.5 and LXDE and there is no /etc/lightdm/lightdm.conf file Commented Aug 23, 2016 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. Commented Aug 23, 2016 at 14:08
  • 1
    For newer Debian versions, see superuser.com/a/1337778/777328
    – Adrian W
    Commented Feb 4, 2019 at 17:36
  • @AdrianW Done, added to the post. Thank you! Commented Feb 5, 2019 at 9:47
  • 1
    @Rebroad I stumbled across this answer on linux & unix: How do you make the HDMI hot-pluggable on a Pi?. It shows a window which might interest you. Commented Jan 8, 2020 at 9:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .