[BRLTTY] screen startup before login
raoul megelas
rmgls at free.fr
Fri Nov 23 15:58:07 EST 2012
On Fri, 23 Nov 2012 12:57:36 -0500 (EST)
Nicolas Pitre <nico at fluxnic.net> wrote:
> On Fri, 23 Nov 2012, raoul megelas wrote:
>
> > #!/bin/tcsh
> >
> > /usr/local/bin/screen -dm # daemon in detached mode
> > /bin/brltty -q -b fs -d usb:
> >
> > and brltty starts now but does not display the login.
> > i mean the braille display shows a #
>
> That's most probably a shell prompt.
>
> > after blindly ligin (as before)
> > i do:
> > sudo screen -x to attach the screen to terminal.
> > and brltty connect fine but as root!
> >
> > what i need to know is to automate a procedure
> > when logged.
> > i tried several things in .tcshrc but this does not work.
> > i do not know how to do that.
> > perhaps you can help.
>
> What screen does is to create a pseudo terminal interface which is
> different from all the terminals where the system normally start a login
> process on. For example, on linux the normal login process is attached
> to /dev/tty1, /dev/tty2, etc. When screen executes, it
> dynamically creates /dev/pts/0, /dev/pts/1, etc. On BSD those device
> nodes probably have different names but the principle is the same. So
> what screen sees is the activity that goes via those /dev/pts/* devices,
> and that's not where the login processes are. By default, screen simply
> starts a shell, hence the # that you see.
>
> What you could do is to replace the getty process normally attached to
> the console (/dev/tty1 on Linux) which is responsible for setting up
> things and providing a login prompt. This used to be in /etc/inittab on
> Linux but maybe BSD still uses that.
>
> Then, you can specify a specific program to execute instead of the
> default shell. Something like:
>
> screen -s login
>
> However, on Linux at least, that works only if screen is executed as
> root. As you want to do this when booting the system that should be
> fine. Then you need to attach this screen process to the proper console
> device. See the WINDOW TYPES section in the screen man page.
>
> Note that I never attempted any of the above myself, except for trying
> out "screen -s login" as root. Once you start playing with the system
> login setup, you risk locking yourself out of your system if something
> is not working properly. So make sure you have alternative methods,
> such a rescue boot disk, in order to get back into your filesystem to
> fix things if need be. But I don't see how this couldn't be made to
> work.
Hi Nicolas,
Thanks for your precious time and explanation.
i understand this. i tried it,
but at this time i can't make it working.
waiting i have time to put the hand again in the screen code,
perhaps coukd you tell me how to force tcsh to execute commands at login
time.
i googled and never found a good example.
putting my commands in .tcshrc does not work.
even something like "sox somefile.wav...
Thanks for yours hints.
raoul
rmgls at free.fr
More information about the BRLTTY
mailing list