Attaching a german USB-Keyboard (non-Sun) to a Sun Blade workstation

One of the advantages of Sun's Blade workstations is that it uses USB for keyboard and mouse, instead of the old proprietary connector. That way, we can attach alternate devices from the mass-market, instead of Sun-only hardware. It is no problem to exchange e. g. the Sun mouse by an all optical mouse (higher precision, no dirt accumulates). When using standard PC USb keyboards, there are however issues when using a non-US layout keyboard.

When attaching a standard Cherry USB keyboard with german layout to a Sun Blade 100, the Blade thinks it is a US-layout keyboard, it cannot correctly identify as german; this is, as far as I can tell, the fault of Cherry: Sun keyboards identify their layout, whereas cheap PC hardware (in a tradition of being cheap and crap; this is not limited to Cherry, other brands producing for standard PCs have the same problem) do not. PC users have to adjust the layout via software. So do we, if we want to use the keyboard with the right layout at a Sun.

Luckily, this is not too difficult. We will restrict ourselves to X11, ignoring the console, as today nobody works at the console. Using xmodmap, we can easily change the layout. The necessary adaptions are presented below:

/etc/dt/config/de.xmodmap

keycode  27 = q Q at
keycode  35 = z Z
keycode  36 = y Y
keycode  38 = 2 quotedbl
keycode  39 = 3 section
keycode  42 = 6 ampersand
keycode  43 = 7 slash braceleft
keycode  44 = 8 parenleft bracketleft
keycode  45 = 9 parenright bracketright
keycode  46 = 0 equal braceright
keycode  52 = ssharp question backslash
keycode  53 = acute grave
keycode  54 = udiaeresis Udiaeresis
keycode  55 = plus asterisk asciitilde
keycode  57 = numbersign apostrophe
keycode  58 = odiaeresis Odiaeresis
keycode  59 = adiaeresis Adiaeresis
keycode  60 = asciicircum degree
keycode  61 = comma semicolon
keycode  62 = period colon
keycode  63 = minus underscore
keycode 107 = less greater bar

Save this table as /etc/dt/config/de.xmodmap. Then copy /usr/dt/config/Xsetup to /etc/dt/config/Xsetup and modify it as shown below (add the emphasized line):

/etc/dt/config/Xsetup (excerpt)

...
    if [ "$DTXSERVERLOCATION" != "remote" ]; then
      $XDIR/xmodmap /etc/dt/config/de.xmodmap

      #
      # Since X server is local, optimize by checking local desktop
      # font directories and making one call to xset.
      #

...

That's all. Log out, log in, enjoy the german layout.