You are not logged in.

#1 2024-08-12 17:27:56

jfk
Member
Registered: 2017-12-11
Posts: 131

[SOLVED] Avoiding prompt when autologin without display manager

Setting a one-user system on LUKS, I felt that I could spare myself a display manager. After decrypting my partition, I autolog to my user and then systemd launches my wayland qtile session as a user unit:

[Service]
ExecStart=
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin ME %I $TERM
[Unit]
Description=Autostart qtile

[Service]
ExecStart=/usr/bin/qtile start -b wayland

[Install]
WantedBy=default.target

However, in that sequence, the prompt is displayed before the systemd command is executed which is a tad annoying. Is there a way to avoid this?

Last edited by jfk (2024-08-13 21:17:27)

Offline

#2 2024-08-12 19:11:33

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,062

Re: [SOLVED] Avoiding prompt when autologin without display manager


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2024-08-12 22:12:03

jfk
Member
Registered: 2017-12-11
Posts: 131

Re: [SOLVED] Avoiding prompt when autologin without display manager

I should have mentionned that I'd tried that. I still get a tty prompt.

Last edited by jfk (2024-08-12 22:20:54)

Offline

#4 2024-08-13 00:15:39

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [SOLVED] Avoiding prompt when autologin without display manager

Why a service for starting qtile?  Just exec it from your shell profile as outlined in the wiki.

The symptoms your are describing are coming from starting qtile and a login shell (which, by the way is left open just visually obscured) in parallel - but by using a systemd user service, you are forcing them to run in parallel.

Last edited by Trilby (2024-08-13 00:17:02)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2024-08-13 20:36:41

jfk
Member
Registered: 2017-12-11
Posts: 131

Re: [SOLVED] Avoiding prompt when autologin without display manager

Why a service for starting qtile?  Just exec it from your shell profile as outlined in the wiki.

Because I wanted to set an

After= 

to autostart my kanshi unit after the qtile session had been loaded. Kanshi sets my display resolution and needs wlroots to output the correct setting. Otherwise, it executes too quickly even as a user unit.

However, putting the qtile command into my .bash_profile solves the issue I raised. Now, how can I start kanshi after the qtile session without using a qtile hook? Is it possible with systemd?

Last edited by jfk (2024-08-13 20:48:35)

Offline

#6 2024-08-13 21:03:52

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [SOLVED] Avoiding prompt when autologin without display manager

Systemd is just really the wrong tool for all of that.  Further kanshi is really for *changing* display settings dynamically after the compositor is running - are your screen settings frequently changing?  I.e. are you regularly swapping out monitors and / or connecting to projectors or other outputs?  If not, why not just configure your screens in qtile itself.  Or at least just set the most common / default setup there - then if / when you need to connect  to a projector or some other output, then you can just run kanshi as needed.

Alternatively, if you really want to run kanshi every time qtile starts, use qtile's Startup hooks.

Again, you explicitly want to run things in series, but you're trying to force that goal onto a tool (systemd) which was explicitly designed to avoid having to start things in sequence.  You probably can contort systemd services into doing this, but it will be complex and as a result fragile.  If you don't need what systemd services provide, don't use them.

Last edited by Trilby (2024-08-13 21:04:44)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2024-08-13 21:16:50

jfk
Member
Registered: 2017-12-11
Posts: 131

Re: [SOLVED] Avoiding prompt when autologin without display manager

OK I'll avoid systemd for that kind of tasks - thx.

N.B. as stated in qtile documentation, you cannot set the screen resolution from the config file.

Last edited by jfk (2024-08-13 21:23:37)

Offline

Board footer

Powered by FluxBB