Re: [systemd-devel] permanent autologin

2021-05-02 Thread Emanuel Berg
>> After touching those files you need to run »systemd
>> deamon-reload« to tell systemd, that you touched them.
>
> This worked
>
>   $ sudo systemctl daemon-reload
>
> and after copying the tty1 directory and renaming it, there is
> autologin everywhere!
>
> :)

How to do it,

  https://dataswamp.org/~incal/conf/.zsh/vt

lines 7-19.

-- 
underground experts united
https://dataswamp.org/~incal

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] permanent autologin

2021-05-02 Thread Emanuel Berg
Silvio Knizek wrote:

> After touching those files you need to run »systemd
> deamon-reload« to tell systemd, that you touched them.

This worked

  $ sudo systemctl daemon-reload

and after copying the tty1 directory and renaming it, there is
autologin everywhere!

:)

-- 
underground experts united
https://dataswamp.org/~incal

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] permanent autologin

2021-05-02 Thread Emanuel Berg
Silvio Knizek wrote:

> So, if you have this setup, I really suggest that you use
> specialised units

Hm... what "units" do you refer to here?

> for every terminal and a graphical login manager for the
> X stuff. So instead of starting agetty you can directly
> start emacs or tmux as the User= you want.

That already works fine, zsh starts everything automatically
when I'm logged in, which happens automatically now as well,
well, at least in tty1 but now that I got reminded about this,
I'll do such folders/files for all the ttys.

> And again for X, you want a graphical login manager

?

> beacuse than your session has proper access rights and is in
> fact tagged as graphical by loginctl. Or you drop the ttys
> completely and work only in X, like everybody else and use
> some window manager with multiple desktops.

Hahaha, what are you talking about?

-- 
underground experts united
https://dataswamp.org/~incal

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] permanent autologin

2021-05-02 Thread Emanuel Berg
My other message doesn't seem to have come yet, but to answer
that message, yes, it does work on tty!

I need one such directory and file for each tty?

-- 
underground experts united
https://dataswamp.org/~incal

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] permanent autologin

2021-05-02 Thread Emanuel Berg
Silvio Knizek wrote:

> /etc/systemd/system/getty@tty1.service.d/10-autologin.conf
> [Service]
> ExecStart=
> ExecStart=-/sbin/agetty -a incal --noclear %I $TERM

I tried it in tty2 and it didn't work. Is it because it only
works for tty1 as is mentioned, of for some other reason,
I don't know. I'll restart Emacs now, and see if it works
for tty. If it doesn't work, I'll reboot and see what happens.
If it still doesn't work then yeah, something's up :)

-- 
underground experts united
https://dataswamp.org/~incal

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] permanent autologin

2021-05-02 Thread Emanuel Berg
Silvio Knizek wrote:

>
> your path is wrong. You want the following:
>
> /etc/systemd/system/getty@tty1.service.d/10-autologin.conf

I don't have that file or even directory, but I can put it
there manually, of course.

> Do you need this auto login for debug reasons (than maybe
> debug- shell.service is better suited), do you want to start
> a terminal 1application (than maybe use a normal .service
> with TTYPath), or do you start graphical applications (use
> a login manager with auto login instead)?

I have it setupt like this [1] so that

Linux VT   1 -> Emacs
 2-4 -> tmux
   5 -> (do nothing)
   6 -> X

I don't really "need" auto login, it is more like I want it :)

[1] https://dataswamp.org/~incal/conf/.zprofile

-- 
underground experts united
https://dataswamp.org/~incal

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] permanent autologin

2021-05-02 Thread Silvio Knizek
Am Sonntag, dem 02.05.2021 um 19:14 +0200 schrieb Emanuel Berg:
> Silvio Knizek wrote:
>
> >
> > your path is wrong. You want the following:
> >
> > /etc/systemd/system/getty@tty1.service.d/10-autologin.conf
>
> I don't have that file or even directory, but I can put it
> there manually, of course.
It's expected that you don't have this directories and files. You can
just create them. In man:systemd.unit you find how templates and drop-
ins work.
After touching those files you need to run »systemd deamon-reload« to
tell systemd, that you touched them.
>
> > Do you need this auto login for debug reasons (than maybe
> > debug- shell.service is better suited), do you want to start
> > a terminal 1application (than maybe use a normal .service
> > with TTYPath), or do you start graphical applications (use
> > a login manager with auto login instead)?
>
> I have it setupt like this [1] so that
>
> Linux VT   1 -> Emacs
>  2-4 -> tmux
>    5 -> (do nothing)
>    6 -> X
>
> I don't really "need" auto login, it is more like I want it :)
>
> [1] https://dataswamp.org/~incal/conf/.zprofile
>
So, if you have this setup, I really suggest that you use specialised
units for every terminal and a graphical login manager for the X stuff.
So instead of starting agetty you can directly start emacs or tmux as
the User= you want.
And again for X, you want a graphical login manager, beacuse than your
session has proper access rights and is in fact tagged as graphical by
loginctl.
Or you drop the ttys completely and work only in X, like everybody else
and use some window manager with multiple desktops.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] permanent autologin

2021-05-01 Thread Silvio Knizek
Am Samstag, dem 01.05.2021 um 07:17 +0200 schrieb Emanuel Berg:
> I do autologin like this:
>
>    ExecStart=-/sbin/agetty -a incal --noclear %I $TERM
>
>    /etc/systemd/system/getty.target.wants/getty@tty1.service # line ~39
>
>    $ sudo systemctl daemon-reload
>
> However, it seems to disappear after a while, maybe when
> systemd gets updated?
>
> So my question is how do I make the autologin
> change permanent?
>
Hi Emanuel,

your path is wrong. You want the following:

--- /etc/systemd/system/getty@tty1.service.d/10-autologin.conf
[Service]
ExecStart=
ExecStart=-/sbin/agetty -a incal --noclear %I $TERM
---

This creates a single overwrite for only this one instanciated unit.
The first empty ExecStart= is for technical reasons.

Do you need this auto login for debug reasons (than maybe debug-
shell.service is better suited), do you want to start a terminal
1application (than maybe use a normal .service with TTYPath), or do you
start graphical applications (use a login manager with auto login
instead)?

BR
Silvio

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel