Xref: utzoo alt.hackers:262 alt.sources:2988 Path: utzoo!utgpu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!ub!uhura.cc.rochester.edu!rochester!udel!brahms.udel.edu!gdtltr From: gdtltr@brahms.udel.edu (root@research.bdi.com (Systems Research Supervisor)) Newsgroups: alt.hackers,alt.sources Subject: SPARCstation Monitor Message-ID: <17394@brahms.udel.edu> Date: 9 Jan 91 00:39:31 GMT Followup-To: poster Organization: Brain Dead Innovations, Inc. (BDI) Lines: 58 Approved: gdtltr@brahms.udel.edu Just get a SPARC? Miss the blinking LED's on your old Sun-3? Try blink.c ! Those keyboard lights never do anything anyway (except flash briefly when you start X,) so why not put them to some use? This trivial hack is known to work on a SPARC SLC w/SunOS 4.1 . Gary Duzan Time Lord Third Regeneration #include #include #include #include #include #include char ledtab[] = { LED_CAPS_LOCK, LED_COMPOSE, LED_SCROLL_LOCK, LED_NUM_LOCK, LED_SCROLL_LOCK, LED_COMPOSE }; main() { int kbdfd,i; if((kbdfd=open("/dev/kbd", O_WRONLY)) < 0) { perror("open"); abort(); } while(1) { for(i=0;i<6;i++) { if(ioctl(kbdfd, KIOCSLED, &ledtab[i]) < 0) { perror("ioctl"); abort(); } usleep(100000); } } } -- gdtltr@brahms.udel.edu _o_ ---------------------- _o_ [|o o|] Two CPU's are better than one; N CPU's would be real nice. [|o o|] |_o_| Disclaimer: I AM Brain Dead Innovations, Inc. |_o_|