home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / doc / console-tools / examples / sample.rc < prev    next >
Encoding:
Text File  |  1999-04-08  |  1.1 KB  |  46 lines

  1. # Consoles to be initialized
  2. # INITTY=/dev/tty[1-9]*
  3. INITTY=/dev/tty1
  4.  
  5. # set numlock and set metabit mode on all virtual consoles
  6. for tty in $INITTY
  7. do
  8.     setleds -D +num < $tty > /dev/null
  9.     setmetamode metabit < /dev/tty$t > /dev/null
  10. done
  11.  
  12. # Cyrillic keyboard/console
  13. setfont    Cyr_a8x16 -m koi2alt
  14. loadkeys ru
  15.  
  16. # or: Latin1 keyboard/console
  17. setfont lat1-16 -m trivial
  18. loadkeys -d
  19.  
  20. # enable mapping
  21. for tty in $INITTY
  22. do
  23.     echo -n -e "\\033(K" > $tty
  24. done
  25.  
  26. # Opening a tty for reading or writing will create the corresponding
  27. # console. So, probably you want to do the above not on all /dev/tty*
  28. # but only on those where you start a getty. If the remaining ones
  29. # are opened using "open -s -l bash", then a "setleds -D +num" or so
  30. # in .profile will take care of the newly opened console.
  31.  
  32. # Let alt-uparrow (given at the shell prompt) create a new virtual console
  33. #
  34. loadkeys << EOF
  35. alt keycode 103 = F100
  36. string F100 = "open -l -s bash\n"
  37. EOF
  38. #
  39. # Let alt-uparrow (anytime) create a new virtual console
  40. # (watch out for security aspects!)
  41. #
  42. spawn_console&    # start a deamon that listens to the keyboard
  43. loadkeys << EOF
  44. alt keycode 103 = Spawn_Console
  45. EOF
  46.