Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

auto login and startx without a display manager - lenny

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Message
Author
contredire
Posts: 188
Joined: 2009-01-10 23:12
Location: Linköping, sweden

#21 Post by contredire »

I have installed gnome again. how do I remove gdm without removing all gnome stuff?
Debian Lenny

User avatar
kce
Posts: 265
Joined: 2008-10-31 16:48

#22 Post by kce »

You'll have to remove gdm from the rc scripts. This worked for me:

Code: Select all

update-rc.d gdm remove
More paranoid than AMLJ!

handheldCar
Posts: 221
Joined: 2009-11-27 02:31
Location: North Cackalack

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

#23 Post by handheldCar »

Very nice, the first post still works.

PS There's the nodm package.

PPS For Xfce, both of these approaches--the nodm package and the inittab script--disable the powerdev user's ability to shutdown or restart the computer, so in that case, gdm seems best because it can be configured from Xfce settings. Kdm can be configured from systemsettings if you could supply the administrative password. That was done by running 'kdesu systemsettings' in KDE 4.4, but I don't know how it's done in Xfce. Xdm isn't really simple either, so gdm wins.

IamTrying
Posts: 1
Joined: 2011-10-23 14:43

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

#24 Post by IamTrying »

Just modify the line, i have tested and works.

$ apt-get install mingetty
$ vim /etc/inittab
# /sbin/getty invocations for the runlevels.
#
# The "id" field MUST be the same as the last
# characters of the device (after "tty").
#
# Format:
# <id>:<runlevels>:<action>:<process>
#
# Note that on most Debian systems tty7 is used by the X Window System,
# so if you want to add more getty's go ahead but skip tty7 if you run X.
#
#1:2345:respawn:/sbin/getty 38400 tty1
1:2345:respawn:/sbin/mingetty --autologin sun tty1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
6:23:respawn:/sbin/getty 38400 tty6

librefan
Posts: 12
Joined: 2012-03-19 11:27

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

#25 Post by librefan »

Hello,

I'm not sure I understand the difference in the following:
MeanDean wrote: 1. for auto login

edit /etc/inittab and change

Code: Select all

1:2345:respawn:/sbin/getty 38400 tty1
to make it look like

Code: Select all

#1:2345:respawn:/sbin/getty 38400 tty1
below it add the following new line

Code: Select all

1:2345:respawn:/bin/login -f YOUR_USER_NAME tty1 </dev/tty1 >/dev/tty1 2>&1
be sure to replace YOUR_USER_NAME with the user you want to be automatically logged in

2: for automatic startx
edit .bash_profile (or other file that gets run when you login) and add

Code: Select all

if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then
    startx
fi
I have no display manager and want to get to the desktop directly. Do I go through step 1 and 2? Or just step 2?

Is this still working with Wheezy (testing)?

Many thanks for your help!

adenukolnis
Posts: 459
Joined: 2012-02-24 18:36

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

#26 Post by adenukolnis »

to get to the desktop directly.
If you do not want to have to type in a username and password AND you want the graphical environment to start automatically then you want 1 and 2

Is this still working with Wheezy (testing)?
I haven't tried it lately. I can't think of any reason it wouldn't but I will soon try it and post back.

librefan
Posts: 12
Joined: 2012-03-19 11:27

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

#27 Post by librefan »

Many thanks adenukolnis, for your clear reply. I'll try that as soon as.

librefan
Posts: 12
Joined: 2012-03-19 11:27

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

#28 Post by librefan »

Well, it didn't work for me. The boot got as far
Starting system message bus: dbus
and then it hanged.

lego
Posts: 56
Joined: 2008-01-09 09:43

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

#29 Post by lego »

librefan wrote: Is this still working with Wheezy (testing)?
It works for me.

Lou
Posts: 1739
Joined: 2006-05-08 02:15

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

#30 Post by Lou »

Thank you guys, i'm overwhelmed, so much help and so ****** fast!

THANK YOU!!!
Devuan Jessie - IceWM - vimperator - no DM
KISS - Keep It Simple, Stupid

intrinsic
Posts: 5
Joined: 2009-11-26 18:18

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

#31 Post by intrinsic »

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

User avatar
manishthatte
Posts: 15
Joined: 2014-05-12 02:46

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

#32 Post by manishthatte »

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

#33 Post by manishthatte »

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

#34 Post by manishthatte »

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

amaurot
Posts: 11
Joined: 2014-07-28 13:42

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

#35 Post by amaurot »

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

naednaem
Posts: 46
Joined: 2014-07-26 09:12

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

#36 Post by naednaem »

I suspect that systemd breaks this method

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

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

#37 Post by Bro.Tiag »

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?titl ... th_Systemd with modification for debian.

From the console (as root);
mkdir /etc/systemd/system/getty@tty1.service.d
Edit autologin.conf
vi /etc/systemd/system/getty@tty1.service.d/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

milomak
Posts: 2158
Joined: 2009-06-09 22:20
Been thanked: 1 time

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

#38 Post by milomak »

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: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

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

#39 Post by Head_on_a_Stick »

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
deadbang

milomak
Posts: 2158
Joined: 2009-06-09 22:20
Been thanked: 1 time

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

#40 Post by milomak »

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: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid

Post Reply