Re: Change max ttys from 8 to 12?

2023-12-28 Thread Rhialto
On Tue 19 Dec 2023 at 12:38:19 -, Michael van Elst wrote:
> Bumping both limits to 12 (and augmenting keysyms and the keymaps
> for this) would align this with the other *BSDs.

I agree. It removes an arbitrary asymmetry.

> The con side here is that some keyboards either only have 10 function
> keys or already use F11 and F12 for other purposes (like DEC keyboard
> has F11=ESC, so ctrl-alt-f11 invokes DDB).

Sure, but most of the keyboards have 12 function keys and even if some
don't, nobody is forced to try to use them.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert
\X/ There is no AI. There is just someone else's work.   --I. Rose


signature.asc
Description: PGP signature


Re: Change max ttys from 8 to 12?

2023-12-19 Thread Michael van Elst
u...@stderr.spb.ru (Valery Ushakov) writes:

>Switching from a fixed size array to a dynamic one is probably not too
>much work either.  But then, overall, I think that trying to make the
>kernel substitute for screen, tmux (in base), etc is kinda dead end,
>so I'd rather we don't encourage it.


We currently already have an inconsistent configuration. wscons
is limited to 8 screens but there are keyboard symbols to switch
to 10 screens where the last two cannot be used.

So bumping the screen limit to 10 shouldn't really be the question.

Bumping both limits to 12 (and augmenting keysyms and the keymaps
for this) would align this with the other *BSDs. The con side here
is that some keyboards either only have 10 function keys or already
use F11 and F12 for other purposes (like DEC keyboard has F11=ESC,
so ctrl-alt-f11 invokes DDB).



Re: Change max ttys from 8 to 12?

2023-12-19 Thread Valery Ushakov
On Tue, Dec 19, 2023 at 11:10:52 +0100, Dan-Simon Myrland wrote:

> 2) Make a custom kernel with the option WSDISPLAY_DEFAULTSCREENS=12

Why?  WSDISPLAY_DEFAULTSCREENS is the number of screens pre-created by
the kernel, but you can always create as many as you need (subject to
WSDISPLAY_MAXSCREEN), see /etc/wscons.conf and /etc/rc.d/wscons.  The
default for that default is actually 0.


> I don't mind that NetBSD has four active ttys by default, but the steps
> to enable all 12 seems unnecessarily tedious. I realize that not all
> architectures have 12 function keys, but laptops usually do. If the
> kernel supported a maximum of 12 ttys on popular architectures,
> enabling then would only require steps 1 and 2.

But where do you stop?  macs have like, what, 19?

I don't like the idea.  The only real limitation currently is the
switching commands/keysyms.  WSDISPLAY_MAXSCREEN is a static limit b/c
it was easier to hardcode it, but it may be made an option easily as
far as I can tell.

Switching from a fixed size array to a dynamic one is probably not too
much work either.  But then, overall, I think that trying to make the
kernel substitute for screen, tmux (in base), etc is kinda dead end,
so I'd rather we don't encourage it.

-uwe


Re: Change max ttys from 8 to 12?

2023-12-19 Thread Martin Husemann
On Tue, Dec 19, 2023 at 11:10:52AM +0100, Dan-Simon Myrland wrote:
> This might be bikeshedding, but would it make sense to change the
> maximum allowed ttys, on commodity architectures like i386/amd64 at
> least, to 12?

I guess most people just don't use Ctrl-Alt-Fn a lot (but instead
run X with a window manager providing several virtual desktops).

But anyway, your point is valid:

> In order to use all 12 function keys to switch between 12 ttys on my
> laptop I need to do the following steps:
> 
> 1) Add new ttys to /etc/ttys
[..]
> 10) Recompile userland so that wsconsctl etc works properly

This is a lot to do and AFAICT there is no downside in providing them
all by default (minus the /etc/ttys change, as we need one reserved for
the X server and actually hard code that device in various places).

If you send-pr and provide a tested patch for the others, it will have good
chances to get applied after review.

Martin