[comp.windows.x] Sun 3/50 keyboard mode after server crash

dce@stan.UUCP (David Elliott) (02/14/89)

I have a bad habit of crashing my login session in such a way
that the kbd_mode command I use to put my Sun back into ASCII
mode may not get executed.

The result is that every character I type appears to the system
as a couple of EOFs, and all I can do is to reboot the machine.

Does anyone have a good solution to this problem?  It would seem
to me that the console could have a special gettytab entry to
force the keyboard mode to ASCII.

-- 
David Elliott		...!pyramid!boulder!stan!dce

dce@stan.UUCP (David Elliott) (02/16/89)

In article <456@salgado.stan.UUCP> dce@stan.UUCP (David Elliott) writes:
>I have a bad habit of crashing my login session in such a way
>that the kbd_mode command I use to put my Sun back into ASCII
>mode may not get executed.

I've received a couple of responses to my original note, and both
of them said "use kbd_mode -a".  Maybe I should have been more
explicit in the above, though I did say I use kbd_mode.

The problem is that kbd_mode may not get executed after the crash,
particularly when the crash happens due to NFS problems, so even
though I try to execute kbd_mode -a, it might not get executed.

I know that normally "kbd_mode -a" does get executed, because I
log out every day, which shuts down my X server.

-- 
David Elliott		...!pyramid!boulder!stan!dce

meo@stiatl.UUCP (Miles O'Neal) (02/17/89)

In article <462@salgado.stan.UUCP> dce@salgado.UUCP (David Elliott) writes:
>In article <456@salgado.stan.UUCP> dce@stan.UUCP (David Elliott) writes:
>>I have a bad habit of crashing my login session in such a way
>>that the kbd_mode command I use to put my Sun back into ASCII
>>mode may not get executed.
>
>I've received a couple of responses to my original note, and both
>of them said "use kbd_mode -a".  Maybe I should have been more
>explicit in the above, though I did say I use kbd_mode.

You still don't tell us how you are set up. While I don't know your
particulars, I do know that we had similar problems until we started
doing things as we are now, which is:

At login, or from a shell prompt, a script is invoked containing
the following:

xinit -C ...
kbd_mode -a
reset

This invokes the server with a console xtrem, which, when it goes away,
whether through a crash, exit or whatever, is succeeded by the kbd_mode
program by the shell. If you heretofore have started other X11 clients
right after your xinit (assuming you *use* xinit), put them in a file
called .xwindows in your home directory, which will get run as a script
when xinit runs.

-Miles