Re: kbrequest as in older /etc/inittab

2024-01-05 Thread The Wanderer
(As is sometimes usual, I may well regret this.)

On 2024-01-05 at 07:30, Greg Wooledge wrote:

> On Thu, Jan 04, 2024 at 09:58:38PM -0600, Mike McClain wrote:
>
>> I don't think I can state any more clearly what I'm trying to do than
>> 'to tie a call to openvt to Alt Up'. I'm assuming you don't know how
>> to do that either.
> 
> And ... what does THAT do?
> 
> NAME
>openvt - start a program on a new virtual terminal (VT).
> 
> What program are you trying to start in the new VT?
> 
>> You're quite right you can increase the number of gettys
>> and you can log into every one of them before you can use them.
> 
> How does that FAIL to meet your desired state?  What do you want to do,
> that this doesn't allow?
> 
> Are you trying to "login" to a bunch of VTs as an unprivileged user
> without actually logging in?  Simply for convenience?  (If so, why
> can't you just SAY this so we know?)

I often find that it is useful to consider any given proposed course of
action in terms of three questions:

What goal are you trying to accomplish?

Why do you consider that goal to be worth accomplishing?

How do you propose to accomplish that goal?


The "how" of one goal can also be the "what" of another, and the "what"
of one goal can also be the "why" of another.


Here, the statement "tie a call to openvt to Alt+Up" is presented as the
"what", but we don't know the "why". It could either be because you want
to do this as a means to some other end, or because you want to do it
*for its own sake* - e.g., as Greg puts it, "simply for convenience".

If you want to do this for its own sake - if there is no higher "what"
behind this, if this is the end of the goal chain - then as Greg says,
it would be helpful for us to *know* that, because it will inform the
possible answers. Stating the "why" explicitly would clarify that.

On the other hand, if you want to do this as a means to accomplish some
other end - if the "what" of this goal is also the "how" of some other
goal - then in order to give useful answers, we will need to also know
at least the "what" of that other goal, and possibly also its "why".
(And, yes, that *can* apply recursively - although I would not expect it
to do so here.)

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw



signature.asc
Description: OpenPGP digital signature


Re: kbrequest as in older /etc/inittab

2024-01-05 Thread Greg Wooledge
On Thu, Jan 04, 2024 at 09:58:38PM -0600, Mike McClain wrote:
> I don't think I can state any more clearly what I'm trying to do than
> 'to tie a call to openvt to Alt Up'. I'm assuming you don't know how
> to do that either.

And ... what does THAT do?

NAME
   openvt - start a program on a new virtual terminal (VT).

What program are you trying to start in the new VT?

> You're quite right you can increase the number of gettys
> and you can log into every one of them before you can use them.

How does that FAIL to meet your desired state?  What do you want to do,
that this doesn't allow?

Are you trying to "login" to a bunch of VTs as an unprivileged user
without actually logging in?  Simply for convenience?  (If so, why
can't you just SAY this so we know?)

If that's what you want to do, then I imagine you're looking for some
invocation like:

/usr/bin/openvt -s /usr/bin/setpriv --reuid 1000 --regid 1000 --init-groups 
/bin/bash -l

Obviously change the UID and GID if those aren't right for your user
account.  I haven't tested this, so use at your own risk.  Especially
if it works -- because then anyone who gets hold of your running
system can open a login shell as you without needing your password.

If that's NOT what you're trying to do, then please TELL US what you
are trying to do, because having to guess it is frustrating.



Re: kbrequest as in older /etc/inittab

2024-01-04 Thread Mike McClain
On Mon, Jan 01, 2024 at 10:36:41AM -0600, David Wright wrote:
> Is the history of this issue relevant?
>   https://forums.raspberrypi.com/viewtopic.php?t=282768

David the most relevant part of that old post is the last line.

> On Mon, 1 Jan 2024 13:53:44 -0500 Greg Wooledge wrote:
> Oh, it's the same *name*.  Huh.  So, Mike, whatever you figured out in
> 2020, you entirely forgot, and now you're starting over in a new forum?

Yes, Greg, my name is still Mike. Have you always been Greg?

If you think I figured it out in 2020 you clearly didn't read that
post. I suggest you go back and read the last line at least.

> What are you actually trying to do?  If all you want are a bunch of
> additional text consoles, you can simply increase the number of gettys
> by editing the /etc/systemd/logind.conf file:

I don't think I can state any more clearly what I'm trying to do than
'to tie a call to openvt to Alt Up'. I'm assuming you don't know how
to do that either.

You're quite right you can increase the number of gettys
and you can log into every one of them before you can use them.

I'd like to thank you for the reference to logind.conf. I've been
looking for a while where the login on tty6 was coming from having set
ACTIVE_CONSOLES="/dev/tty[1,3]" in /etc/default/console-setup.
You are often helpful.

One of these days I'll find a solution, I thought triggerhappy might
do but so far haven't made that work either.

Be well fellas,
Still Mike
--
1984 was not meant as a blueprint for democratic governments.



Re: kbrequest as in older /etc/inittab

2024-01-01 Thread Greg Wooledge
On Mon, Jan 01, 2024 at 10:36:41AM -0600, David Wright wrote:
> On Sun 31 Dec 2023 at 23:09:42 (-0600), Mike McClain wrote:
[...]
> Is the history of this issue relevant?
> 
>   https://forums.raspberrypi.com/viewtopic.php?t=282768

Oh, it's the same *name*.  Huh.  So, Mike, whatever you figured out in
2020, you entirely forgot, and now you're starting over in a new forum?

What are you actually trying to do?  If all you want are a bunch of
additional text consoles, you can simply increase the number of gettys
by editing the /etc/systemd/logind.conf file:

...
# See logind.conf(5) for details.

[Login]
#NAutoVTs=6
...

By default, there are 6 gettys available (tty1 through tty6), but you
can increase the number here.  Or decrease it, in theory, but I can't
imagine too many uses for that.



Re: kbrequest as in older /etc/inittab

2024-01-01 Thread David Wright
On Sun 31 Dec 2023 at 23:09:42 (-0600), Mike McClain wrote:
> Prior to the introduction of systemd /etc/inittab had this line in it:
> kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this 
> work."
> and I found it useful to tie a call to openvt to Alt Up which went
> well with ALT Right or Left arrow to move between VTs.
> .
> Has anyone knowledge of how to do this under systemd?

Is the history of this issue relevant?

  https://forums.raspberrypi.com/viewtopic.php?t=282768

Cheers,
David.



Re: kbrequest as in older /etc/inittab

2024-01-01 Thread Curt
On 2024-01-01, Greg Wooledge  wrote:
>
> unicorn:~$ locate kbrequest.target
> unicorn:~$ locate kbrequest
> unicorn:~$ man -k kbrequest
> kbrequest: nothing appropriate.
> unicorn:~$ apt-cache search kbrequest
> unicorn:~$ 
>
> I can't find this in Debian 12.  Do you have more details about it?
>
>


I think it's in systemd.special.




Re: kbrequest as in older /etc/inittab

2024-01-01 Thread Greg Wooledge
On Mon, Jan 01, 2024 at 01:53:56PM +0200, Anssi Saari wrote:
> Mike McClain  writes:
> 
> > Prior to the introduction of systemd /etc/inittab had this line in it:
> > kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this 
> > work."
> > and I found it useful to tie a call to openvt to Alt Up which went
> > well with ALT Right or Left arrow to move between VTs.
> > .
> > Has anyone knowledge of how to do this under systemd?
> 
> Looks like there's a special target, kbrequest.target, which is started
> by alt-up. Some more systemd knowledge than I currently have is needed
> to tie openvt into that.

unicorn:~$ locate kbrequest.target
unicorn:~$ locate kbrequest
unicorn:~$ man -k kbrequest
kbrequest: nothing appropriate.
unicorn:~$ apt-cache search kbrequest
unicorn:~$ 

I can't find this in Debian 12.  Do you have more details about it?



Re: kbrequest as in older /etc/inittab

2024-01-01 Thread Anssi Saari
Mike McClain  writes:

> Prior to the introduction of systemd /etc/inittab had this line in it:
> kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this 
> work."
> and I found it useful to tie a call to openvt to Alt Up which went
> well with ALT Right or Left arrow to move between VTs.
> .
> Has anyone knowledge of how to do this under systemd?

Looks like there's a special target, kbrequest.target, which is started
by alt-up. Some more systemd knowledge than I currently have is needed
to tie openvt into that.



kbrequest as in older /etc/inittab

2023-12-31 Thread Mike McClain
Prior to the introduction of systemd /etc/inittab had this line in it:
kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work."
and I found it useful to tie a call to openvt to Alt Up which went
well with ALT Right or Left arrow to move between VTs.
.
Has anyone knowledge of how to do this under systemd?

Thanks,
Mike
--
... what I was born does not matter,
  only what I will make of myself, only what I will become.