How to Enable Automatic Login on Debian 8 Jessie (for Console)?
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to Enable Automatic Login on Debian 8 Jessie (for Console)?
Hello,
I would like to enable autologin without using inittab (since jessie hasnt) and without gdm.
I found this:
Code:
Autologin to text in Debian Jessie
article #756, updated 168 days ago
First do this:
sudo mkdir -pv /etc/systemd/system/getty@tty1.service.d
sudo nano /etc/systemd/system/getty@tty1.service.d/autologin.conf
This will edit a new file autologin.conf. Here is the text for it:
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin $username --noclear I 38400 linux
Make sure you replace $username with the username with which you want login to occur.
If, peradventure, you would like X to automatically start up after the above autologin to text, add the following to ~/.profile:
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
Your way is very much like the one above except that you don't have to make any directory, it's already there (Systemd stuff, i guess). It has worked for me both on my Jessie xfce install and Debian with standalone OpenBox install so i feel safe to venture that it should work for you too.
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299
Rep:
What could be simpler than copy-pasting 2 lines of code in the designated places and running exactly 1 command after that? Did you even open the link i posted?
Edit: Aha! I see now that you are a senior member and were just out to have some fun. I am such an ass for taking the bait. :LOL
What could be simpler than copy-pasting 2 lines of code in the designated places and running exactly 1 command after that? Did you even open the link i posted?
quite tiring that we must always find a workaround, while someone could make it available to all of us, right.
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299
Rep:
It's the sheer minimalism of the method that i am taken in by, even though i hardly know any bash to speak of, i daresay you couldn't find a more elegant way to do it. All i can hope to do is one day parse the code for myself and understand exactly how it worked.
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299
Rep:
Since the OP has neither marked this as solved nor has pursued it further i see fit to not let this thread go to waste and open a new one, for my question is related to what happens after implementation of auto-login and auto-startX as per the aforementioned method.
I succumbed to temptation and decided to make my openbox window pretty. Followed these instructions in the Debian OpenBox wiki faithfully;
Code:
# apt-get install feh
Now, pick a wallpaper and try this command in a terminal:
feh --bg-scale /path/to/your/background/image.jpg
Note: Apart from JPEG, feh can also handle a variety of other image file types, including PNG, TIFF and GIF.
Once you have chosen a wallpaper, feh stores its name in a file called .fehbg. That means you can tell it to restore the wallpaper on the next boot by checking that file. Add the following to the autostart.sh file in /etc/xdg/openbox.
#My wallpaper
eval `cat $HOME/.fehbg` &
. Because of the auto-login, or because i have rEFind installed on another partition that supersedes the boot loaders of all other partitions, whatever the reason, nothing happened, my session started normally without any wallpaper.
Next i created this .xsession file and made it executable.
Now here's curious part, this is what i get when i boot or reboot my computer, i see the wallpaper for a brief instant, then it disappears and i'm left with what's in the first Screenshot;
It is only after i "Exit" the openbox session from it's menu, sometimes twice, that the session restarts automaticlly and i get to what's in the second one.
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299
Rep:
On a hunch i went to my LMDE partition and did a fsck -y on this partition from it. Sure enough, it told me that there was an error on line 4 in my /etc/fstab which was magnanimously ignored (has to be by rEFind, this bootloader is a real blessing for the newbie), a "dirty bit" was removed and the partition was clean..tee-hee, "dirty bit". I booted back into my Debian partition and edited my /etc/fstab. Did a
Code:
ls /etc/xdg/openbox
and now there was an autostart.sh file next to autostart. This time i put this line in /etc/xdg/openbox/autostart
Code:
eval `cat $HOME/.fehbg` && gkrellm &
and saved it to ~/.config/openbox/autosart. Voila, problem solved!
The issue mentioned in the title of this thread should now either be considered resolved or followed up and it irks me no end that the OP despite his seniority has left it hanging out to dry and not had the courtesy to do either.
What could be simpler than copy-pasting 2 lines of code in the designated places and running exactly 1 command after that? Did you even open the link i posted?
Edit: Aha! I see now that you are a senior member and were just out to have some fun. I am such an ass for taking the bait. :LOL
try to understand. What is simple for you might not be simple for everybody, you know...
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299
Rep:
Quote:
Originally Posted by Xeratul
try to understand. What is simple for you might not be simple for everybody, you know...
I like to think about common Linux users.
You do much injustice to "common Linux users" if you attribute to them an IQ level of a trained chimpanzee. Mine is not especially higher than that of one btw, i assure you. Those who switch to Linux from other operating systems do so to understand their systems better and have more control over them if nothing else and not just to avoid spending money.
You do much injustice to "common Linux users" if you attribute to them an IQ level of a trained chimpanzee. Mine is not especially higher than that of one btw, i assure you. Those who switch to Linux from other operating systems do so to understand their systems better and have more control over them if nothing else and not just to avoid spending money.
Or just to keep their system running after the original OS is no longer supported, but they don't feel there's any reason to purchase a new OS. That's been a lot of people since XP support went away.
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299
Rep:
Quote:
Originally Posted by Timothy Miller
Or just to keep their system running after the original OS is no longer supported, but they don't feel there's any reason to purchase a new OS. That's been a lot of people since XP support went away.
There's that lot too..hmmm, do i really care if they want a Windows like system and won't lift a finger to type a basic command?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.