Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!gatech!emcard!stiatl!meo From: meo@stiatl.UUCP (Miles O'Neal) Newsgroups: comp.windows.x Subject: Re: problems with keyboard after server crash Keywords: X11, crash (kbd_mode) Message-ID: <3792@stiatl.UUCP> Date: 15 Mar 89 16:51:42 GMT Organization: Sales Technologies Inc., Atlanta, GA Lines: 62 In article <13862@duke.cs.duke.edu> ndd@romeo.cs.duke.edu (Ned D. Danieley) writes: -I'm trying to debug an application which occasionally crashes, -taking the server with it. When this happens, the keyboard is -left in an unuseable state. I've tried kbd_mode -a: (list of nonworking attempts to fix was here) -Has anyone seen this behaviour? How can I gracefully reset my -keyboard? - -Sun 3/280 running SunOs 3.5 -X11R3, patches 1-8, purdue 2.0 speedups, gcc 1.33 Two possibilities: login as yourself or rrot from elsewhere; run kbd_mode -a with std all going to the keyboard device. Seems like this used to work when we tried it. What we do now is: run a script that brings up X11; in this script we set an environment variable (eg, XWINDOWS_UP); then we run xinit to bring up a CONSOLE xterm. Our .cshrc files contain the following code: if ($?XWINDOWS_UP) then unsetenv XWINDOWS_UP source .xwindows endif The above code should get run only the 1 time (that the xinit is run, starting the console xterm). The .xwindows file looks something like: setenv xterm set T = "`hostname` : `whoami` - `echo $cwd`" if (-f ~meo/.4term_hist) then source ~meo/.4term_hist endif xset m 4 2 xset s noblank xset s 600 30 xterm -title "$T" -fn a14 -geometry 80x56+5+5 -rw -s & xterm -title "$T" -fn a14 -geometry 80x36+575+5 -rw -s & xclock -chime -geometry 110x110+1035+785 -rv & if (! $?remote) then xmodmap -e "keycode 0x39 = Delete KP_Decimal" xmodmap -e "keycode 0x65 = Insert KP_0" endif exit # # The xmodmaps should be used ONLY on Sun 386i's running Sun's X11R2. # # User cust. stuff, such as xsetroot, etc, should also go in here notes: 1) xterm is used in the .cshrc file to determine when to set the term variable to xterm (vs when you might be using real terminals, the Sun console, etc). 2) remote is set when coming in from an X11 display terminal, so that the Sun modmaps won't happen. -Miles (gatech!stiatl!meo)