auto login and startx without a display manager - lenny

Share your own howto's etc. Not for support questions!

Re: auto login and startx without a display manager - lenny

Postby intrinsic » 2013-12-31 01:05

hey guys old thread but I need to know
I assume the user that's being logged in has no password since I see nothing in the posted code that indicates a password is given.

how would one modify

1:2345:respawn:/bin/login -f YOUR_USER_NAME tty1 </dev/tty1 >/dev/tty1 2>&1

with a password
intrinsic
 
Posts: 5
Joined: 2009-11-26 18:18

Re: auto login and startx without a display manager - lenny

Postby manishthatte » 2014-05-14 07:54

I want to try meandean's method.

But how do i find the bash profile?
Taking baby steps in Debian
User avatar
manishthatte
 
Posts: 15
Joined: 2014-05-12 02:46

Re: auto login and startx without a display manager - lenny

Postby manishthatte » 2014-05-14 08:05

I tried iamtrying's method too. Doesnt work. Still the login screen is there.

What to do?
Taking baby steps in Debian
User avatar
manishthatte
 
Posts: 15
Joined: 2014-05-12 02:46

Re: auto login and startx without a display manager - lenny

Postby manishthatte » 2014-05-23 05:24

Below given method worked for me:

1) Edit /etc/lightdm/lightdm.conf with sudo

2) Remove # from the line > autologin-user = manish

3) Save the file and reboot :)
Taking baby steps in Debian
User avatar
manishthatte
 
Posts: 15
Joined: 2014-05-12 02:46

Re: auto login and startx without a display manager - lenny

Postby amaurot » 2014-08-15 10:58

I am running Jessie and tried the rungetty method,
it does not work.
A login is still displayed.
I wonder how to troubleshoot this..
Many thanks
amaurot
 
Posts: 11
Joined: 2014-07-28 13:42

Re: auto login and startx without a display manager - lenny

Postby naednaem » 2014-08-15 11:22

I suspect that systemd breaks this method
naednaem
 
Posts: 46
Joined: 2014-07-26 09:12

Re: auto login and startx without a display manager - lenny

Postby Bro.Tiag » 2014-09-22 03:52

naednaem wrote:I suspect that systemd breaks this method


It does, here is a solution.

If you've modified /etc/inittab put it back to it's original.

From https://wiki.manjaro.org/index.php?title=Auto-Login_without_a_Graphical_Desktop_Manager_%26_with_Systemd with modification for debian.

From the console (as root);

Edit autologin.conf

with;
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux

Now update your .bash_profile;
# Following automatically calls - startx when you login:
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx

Reboot.

Cheers
User avatar
Bro.Tiag
 
Posts: 1937
Joined: 2007-06-02 19:14

Re: auto login and startx without a display manager - lenny

Postby milomak » 2015-07-15 22:36

if say i want to build a media center (using kodi/xbmc), could i replace replace startx with kodi/xbmc?

edit - replacing startx with kodi effectively ran startx and then started kodi

i suppose what i wanted to see was how these prepackaged solutions load straight into a kodi without a de loading.
Desktop: iMac Late-2015 27" 5K Retina (17,1 - 3.3GHz) - MacOS and Windows 10 (Bootcamp)/ Sid (External SSD)
Laptop: Lenovo ideapad Y700 [nVidia Optimus] (64-bit) - Sid, Win10, Solus
Kodi Box: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
milomak
 
Posts: 1998
Joined: 2009-06-09 22:20

Re: auto login and startx without a display manager - lenny

Postby Head_on_a_Stick » 2015-07-16 06:41

milomak wrote:i suppose what i wanted to see was how these prepackaged solutions load straight into a kodi without a de loading.

Create a file at ~/.xsession with the following content:
Code: Select all
#!/bin/bash
if [ -z "${DBUS_SESSION_BUS_ADDRESS-}" ] && type dbus-launch >/dev/null; then
  eval $(dbus-launch --sh-syntax --exit-with-session)
fi
source /etc/profile
exec kodi
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10675
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: auto login and startx without a display manager - lenny

Postby milomak » 2015-07-16 22:55

Head_on_a_Stick wrote:
milomak wrote:i suppose what i wanted to see was how these prepackaged solutions load straight into a kodi without a de loading.

Create a file at ~/.xsession with the following content:
Code: Select all
#!/bin/bash
if [ -z "${DBUS_SESSION_BUS_ADDRESS-}" ] && type dbus-launch >/dev/null; then
  eval $(dbus-launch --sh-syntax --exit-with-session)
fi
source /etc/profile
exec kodi


thanks.

do i leave the changes i made to inittab?
Desktop: iMac Late-2015 27" 5K Retina (17,1 - 3.3GHz) - MacOS and Windows 10 (Bootcamp)/ Sid (External SSD)
Laptop: Lenovo ideapad Y700 [nVidia Optimus] (64-bit) - Sid, Win10, Solus
Kodi Box: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
milomak
 
Posts: 1998
Joined: 2009-06-09 22:20

Re: auto login and startx without a display manager - lenny

Postby Head_on_a_Stick » 2015-07-17 06:57

milomak wrote:do i leave the changes i made to inittab?

I'm sorry, I'm not familiar with /etc/inittab or how to use it :?

If you have Kodi autostarting from there, then yes you should probably disable that.
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10675
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: auto login and startx without a display manager - lenny

Postby milomak » 2015-07-17 23:58

thank you good sir. indeed not reverting the innitab changes has kodi loading twice.

you are a scholar and a gentleman.
Desktop: iMac Late-2015 27" 5K Retina (17,1 - 3.3GHz) - MacOS and Windows 10 (Bootcamp)/ Sid (External SSD)
Laptop: Lenovo ideapad Y700 [nVidia Optimus] (64-bit) - Sid, Win10, Solus
Kodi Box: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
milomak
 
Posts: 1998
Joined: 2009-06-09 22:20

Re: auto login and startx without a display manager - lenny

Postby Head_on_a_Stick » 2015-07-18 00:43

You're welcome :)

Thread Update for Debian jessie (systemd)

For automatic login, edit the file at /etc/systemd/system/getty.target.wants/getty@tty1.service and change the "ExecStart=" line in the "[Service]" section to this:
Code: Select all
ExecStart=-/sbin/agetty -a <user name> %I $TERM

Replace "<user name>" with your user name.

For automatic `startx` use this snippet in ~/.bash_profile (or ~/.zprofile for zsh users):
Code: Select all
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx

viewtopic.php?f=16&t=123694
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10675
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: auto login and startx without a display manager - lenny

Postby Nili » 2015-07-20 18:54

Head_on_a_Stick wrote:You're welcome :)
Thread Update for Debian jessie (systemd)

For automatic login, edit the file at /etc/systemd/system/getty.target.wants/getty@tty1.service and change the "ExecStart=" line in the "[Service]" section to this:
Code: Select all
ExecStart=-/sbin/agetty -a <user name> %I $TERM

Replace "<user name>" with your user name.


Heya there Head_on_a_Stick,

This part of your code interests me (ofcourse i am using right now)
Code: Select all
ExecStart=-/sbin/agetty -a nili %I $TERM


...but I need a help, since i have actived only two tty "tty1 which startx autostart and tty2 as a backup".

I noticed after startx start on tty1 while on tty2 it is made nili (automatic login). I don't want to stay login all time tty2 (as well couldn't stop with exit because autostart again :)) It must be stopped early on boot.

So, my question: Is there anyway to prevent autologin on tty2?

Many thanks...
Kindly regards

Nili
OS: FreeBSD // CWM & Devuan // Fluxbox (lean & mean).
I only play 96kHz Hi-Res audio WAV or FLAC via DAC player.
Chuck Norris doesn't approve systemd.
User avatar
Nili
 
Posts: 377
Joined: 2014-04-30 14:04
Location: $HOME/♫♪

Re: auto login and startx without a display manager - lenny

Postby Head_on_a_Stick » 2015-07-20 19:07

@Nili -- could you post this in my Howto that is specifically for jessie please?
viewtopic.php?f=16&t=123694

This one is for lenny.

When you post in the other thread, include the output of:
Code: Select all
ls -l /etc/systemd/system/getty.target.wants
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10675
Joined: 2014-06-01 17:46
Location: /dev/chair

PreviousNext

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable