How do I disable/remap STOP-A/L1-A?

How do I disable/remap STOP-A/L1-A?

First, be sure you want to do this. If the problem is that users are
halting and rebooting the machine, note that disabling STOP-A will merely
prompt them to powercycle the machine (or remove and re-insert the keyboard
plug) instead. This is actually worse.

But if you're sure you want to do this, compile and run this little program.

/* Enable or disable abort sequence. John DiMarco */

#include
#include
#include
#include
#ifdef FILENAME_MAX
#include
#include
#else /* !FILENAME_MAX */
#include
#include
#endif /* !FILENAME_MAX */

#define ERR -1
#define DISABLE 0
#define ENABLE 1
#define KEYBOARD "/dev/kbd"

main(argc,argv)
int argc;
char *argv[];
{
static struct kiockey k;
int fd, mode=ERR;

if(2==argc){
switch(*(argv[1])){
case 'e':
mode=ENABLE;
break;
case 'd':
mode=DISABLE;
break;
}
}
if(ERR==mode){
printf("Usage: %s [enable|disable]\n", argv[0]); exit(1);
}
if(0>(fd=open(KEYBOARD, O_RDWR))){ perror(KEYBOARD); exit(1); }

k.kio_tablemask = KIOCABORT1;
k.kio_station=mode;
(void)ioctl(fd, KIOCSETKEY, &k);
printf("Abort sequence is now %s.\n", mode?"enabled":"disabled");
}

Stefan Voss points out that in Solaris 2.6 or later,
you can type "kbd -a enable|disable" or put "KEYBOARD_ABORT=enable|disable"
in /etc/default/kbd.

As of Solaris 2.6 with patch 105924-10 installed, Solaris 7 with
patch 107589-02 installed, or Solaris 8, you can also set the abort
sequence to the Alternate Break character sequence
(" ~ ", with at least half a second between
characters, and at most 5 seconds for the whole string) with the
command "kbd -a alternate", or by putting "KEYBOARD_ABORT=alternate"
into /etc/default/kbd.

Alternatively, you can disable all break signals by putting the line:

set abort_enable=0

into /etc/system, and rebooting.

Thanks to Dan Astoorian


Home
FAQ