You are not logged in.

#1 2014-06-13 14:00:07

teckk
Member
Registered: 2013-02-21
Posts: 578

Howto: Start X without manual login or DM.

For anyone who is interested.
I've got an Arch home entertainment center that I wanted the kids to turn on, have it boot up, launch X, start the window mgr, and display a menu that I made, with out ever having to log in or touch the keyboard-mouse.

This will do it.

Add to a users ~/.bash_profile

[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx

Then

mkdir /etc/systemd/system/getty@tty1.service.d
touch /etc/systemd/system/getty@tty1.service.d/autologin.conf

<UserName> is the user you wish to log in as.

echo -e "[Service] \nExecStart=\nExecStart=-/usr/bin/agetty --autologin <UserName> --noclear %I 38400 linux" > /etc/systemd/system/getty@tty1.service.d/autologin.conf

Or in case that confuses a newer user, that would be
/etc/systemd/system/getty@tty1.service.d/autologin.conf

[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin <UserName> --noclear %I 38400 linux

The machine will boot to window mgr without any intervention.

This would be for a machine that security is not a concern, like a home theater.
Edit: Fixed an error.

Last edited by teckk (2014-06-13 14:10:24)

Offline

#2 2014-06-13 14:16:01

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Howto: Start X without manual login or DM.

Offline

#3 2014-06-13 14:30:21

teckk
Member
Registered: 2013-02-21
Posts: 578

Re: Howto: Start X without manual login or DM.

Maybe I should also add, if you have a display mgr installed you'll probably need to disable it. I had XDM on that box and I did

mv ~/.xsessions ~/.XXXxsessions

Karol
https://wiki.archlinux.org/index.php/Start_X_at_Login
That will allow X to auto start but the user still has to login first.

https://wiki.archlinux.org/index.php/Au … al_console
This auto logs you into shell I think.

I've seen this question asked before on the forum, how to turn the machine on and have it ready with no more user input. That's what I came up with after doing some searching. Combine 1 and 2.

Offline

#4 2014-06-13 14:40:44

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Howto: Start X without manual login or DM.

teckk wrote:

I've seen this question asked before on the forum, how to turn the machine on and have it ready with no more user input. That's what I came up with after doing some searching. Combine 1 and 2.

That's what I'm asking about: how is what you wrote here different from the info that's in the wiki?

Offline

#5 2014-06-13 20:20:32

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Howto: Start X without manual login or DM.

The wiki is the appropriate place for this sort of thing; if in doubt, create the page in your namespace and then ask here for feedback and suggestions before creating a new page, adding a significant section or major change to an existing page.


Closing


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB