How to make auto login work in Ubuntu? (no display manager)
I am trying to autologin and auto startx on my ubuntu minimal installation (15.04 Vivid Velvet 32bits; mini.iso) I am following several guides that I found but none of them work (the startx part works, but not the autologin)
For example: https://rowen121.wordpress.com/2011/...rtx-in-ubuntu/ https://wiki.ubuntuusers.de/autologin http://www.shellperson.net/autostart-x-without-gdm/ http://www.debianadmin.com/how-to-au...in-debian.html One of the problems is everytime I go and look for the file they tell me to edit, it's not there. When I do sudo nano whatever the file, it is empty (tty1.conf for example, or inittab) In all the guides they say to uncomment a line and add another, but all those files are empty for me. Maybe it is because they refer to Debian and things change. I have managed to make it work installing nodm. Then I don't need to write my username nor password, and then, it auto startx (I added startx in .bash_profile), and finally takes me to i3-wm. I haven't installed a display manager (well, just nodm as the last option to try) nor desktop environment. I would like to get it working without the need of installing a display manager (rungetty/mingetty/getty/whatever works and it's easy on resources) Please if you know the steps that work for you and ubuntu, or a guide that I can follow I would appreciate it. Thanks in advance Note: nothing is encrypted |
so just take https://wiki.ubuntuusers.de/autologin
Have you installed rungetty? Do you want graphical login or command line interface? Do not put startx into .bash_profile, that is definitely not the right way. |
Yes, I installed rungetty.
As I said, I want to be presented directly with i3-wm, no display manager. I don't need a desktop environment for now either, just plain simple i3 What do you suggest about startx then? I didn't research more because it worked! Thanks |
It seems Ubuntu 15.04 now uses systemd, and apparently things have changed.
So I kept on searching now for systemd autologin and got it working. I found this guide that served me well: http://memo-linux.com/debian-8-syste...splay-manager/ So I did: Code:
sudo mkdir -pv /etc/systemd/system/getty@tty1.service.d/ Code:
[Service] Save and close (CTRL+O, CTRL+X) Now: Code:
systemctl enable getty@tty1.service That would be for the autologin part. Next, to start X automatically, continue with this: Code:
sudo nano ~/.bash_profile Code:
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx (Source: https://wiki.archlinux.org/index.php...art_X_at_login) At this point I found another possibility for that file here: http://unix.stackexchange.com/questi...p-with-systemd Code:
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then In this last link they advised to do a last step "You will have to modify your ~/.xinitrc to start your desktop environment, how to do that depends on the DE" So I did: Code:
sudo nano ~/.xinitrc Code:
exec i3 Last thing to do: Code:
sudo reboot I think I read if you already have a display manager you have to remove it first. I hope this can be useful for you. Please comment and improve it. |
All times are GMT -5. The time now is 02:42 PM. |