LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-09-2015, 10:59 PM   #1
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Rep: Reputation: 255Reputation: 255Reputation: 255
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




Are they other methods?


thank you

(more nfo: https://bbs.archlinux.org/viewtopic.php?id=169483)

Last edited by Xeratul; 08-09-2015 at 11:00 PM.
 
Old 08-10-2015, 10:37 AM   #2
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
http://forums.debian.net/viewtopic.php?f=16&t=123694

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.
 
Old 08-10-2015, 01:28 PM   #3
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
Arrow

Hello

would you know if there is a simpler solution, I have in mind such as

apt-get install flashplugin-nonfree


or apt-get install console-autologin
dpkg-reconfigure console-autologin
give please username: myusername

et voila !
 
Old 08-10-2015, 02:36 PM   #4
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
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

Last edited by mzsade; 08-10-2015 at 02:39 PM.
 
Old 08-10-2015, 02:39 PM   #5
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
Quote:
Originally Posted by mzsade View Post
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.

Why to do x100-1000 times users things?
 
Old 08-10-2015, 02:56 PM   #6
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
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.
 
Old 08-10-2015, 03:05 PM   #7
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,780

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Quote:
Originally Posted by Xeratul View Post
someone could make it available to all of us, right.
That someone could be you!
 
Old 08-11-2015, 02:26 PM   #8
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
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.
Code:
#!/bin/bash

gkrellm &
eval `cat $HOME/.fehbg` &
exec openbox-session
.

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.
Attached Thumbnails
Click image for larger version

Name:	2015-08-12-001319_1366x768_scrot.jpg
Views:	975
Size:	64.1 KB
ID:	19129   Click image for larger version

Name:	2015-08-12-001513_1366x768_scrot.jpg
Views:	922
Size:	136.9 KB
ID:	19130  

Last edited by mzsade; 08-11-2015 at 02:34 PM.
 
Old 08-12-2015, 02:44 AM   #9
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
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.
 
Old 08-12-2015, 09:32 AM   #10
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
Quote:
Originally Posted by mzsade View Post
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...

I like to think about common Linux users.

Last edited by Xeratul; 08-12-2015 at 09:34 AM.
 
Old 08-12-2015, 10:02 AM   #11
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
Virtual console

Edit the provided unit either manually by creating the following drop-in snippet, or by running systemctl edit getty@tty1 and pasting its content:

/etc/systemd/system/getty@tty1.service.d/override.conf

[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin username --noclear I 38400 linux
 
Old 08-12-2015, 10:23 AM   #12
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
Quote:
Originally Posted by ntubski View Post
That someone could be you!
or You !!





it would be seriously nice that there is a package

Code:
apt-get install console-autologin
to setup the whole thing with assistance !!!!!!!!!!

Last edited by Xeratul; 08-12-2015 at 10:24 AM.
 
Old 08-12-2015, 01:24 PM   #13
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
Quote:
Originally Posted by Xeratul View Post
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.
 
Old 08-12-2015, 01:31 PM   #14
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, EndeavourOS, OpenSUSE, KDE Neon
Posts: 4,003
Blog Entries: 26

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
Quote:
Originally Posted by mzsade View Post
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.
 
Old 08-12-2015, 01:54 PM   #15
mzsade
Member
 
Registered: Sep 2009
Distribution: Linux Mint 9, Linux Mint 17.2(xfce), LMDE2(Mate), Debian Jessie minimal (with standalone OBox)
Posts: 299

Rep: Reputation: 34
Quote:
Originally Posted by Timothy Miller View Post
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?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] enable root login debian wheezy 7.8.0 cli-86 Debian 13 03-29-2015 02:50 AM
LXer: Enable automatic security update in Debian/Ubuntu LXer Syndicated Linux News 0 08-24-2011 11:10 AM
how to enable root login on console when LDAP server is down ldapsky Linux - Networking 0 05-06-2006 07:27 PM
Disable/Enable Root Login @ Console ryanstrayer Linux - Security 4 01-18-2002 04:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration