Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

How can I make the RPi auto-login when booted, when the GUI is disabled?

You don't have to type a password, when logging in when GUI enabled, so there is probably an easy way of disabling the password prompt in the console.

share|improve this question
    
Very dangerous, I missed the bit about not having a password and seemed to have screwed up the SD card. Be warned! –  user7670 May 28 '13 at 17:08

2 Answers 2

up vote 8 down vote accepted

You should be able to edit the /etc/inittab file to enable autologin.

Find a line like this in /etc/inittab

1:2345:respawn:/sbin/getty --noclear 38400 tty1

This starts the getty process on tty1. You can add the getty --autologin option to that line:

1:2345:respawn:/sbin/getty --autologin {USERNAME} --noclear 38400 tty1

Replace {USERNAME} with the user you want to login.

Note I have not tested this, check the manpage for getty for more details.

share|improve this answer
1  
I have tested it; it works fine. Also, put something in ~/.bash_profile and that will get run automatically after you are logged in. –  greggo Jan 18 '13 at 18:28

there is an easier way to do this using raspi-config this article explains it http://www.opentechguides.com/how-to/article/raspberry-pi/5/raspberry-pi-auto-start.html

showing :

  1. how to auto login to the shell prompt (using a method similar to above)
  2. Run scripts at startup
  3. Auto start the desktop using raspi-config
share|improve this answer
    
this article shows how to auto login to the desktop using raspi-config, but the question is asking how to auto login when there is no GUI or Desktop (so bringing up the shell prompt). However this article also shows how to auto login to the shell as well. –  kolin May 15 '13 at 8:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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