I have a Sun Type7 keyboard on my Debian Linux (/etc/debian_version == 7.8) box, and, since it appears to be much like the Sun type6 I attempted:

$ (setxkbmap -model sun6 -layout us -geometry 'sun(type6)' -v 10 ; setxkbmap -print) |sed 's/^/    /'
Setting verbose level to 10
locale is C
Warning! Multiple definitions of keyboard model
         Using command line, ignoring X server
Warning! Multiple definitions of keyboard layout
         Using command line, ignoring X server
Trying to load rules file ./rules/evdev...
Warning! Multiple definitions of geometry
         Using command line, ignoring rules file
Applied rules from evdev:
rules:      evdev
model:      sun6
layout:     us
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+sun_vndr/us(type6)+inet(evdev)
geometry:   sun(type6)
xkb_keymap {
    xkb_keycodes  { include "evdev+aliases(qwerty)" };
    xkb_types     { include "complete"  };
    xkb_compat    { include "complete"  };
    xkb_symbols   { include "pc+sun_vndr/us(type6)+inet(evdev)" };
    xkb_geometry  { include "pc(pc104)" };

Note that the first bit of output looks like it tries to set the geometry to 'sun:type6', but that the reported xkb_geometry ends up as 'pc(pc104)'

There does appear to be a type6 geometry defined in my /usr/share/X11/xkp/geometry/sun file, but the subsequent 'setxkbmap -print' seems insensitive to the '-geometry xxxx' options I've tried (where xxxx in pc101, pc104 ).

How does one configure the 'setxkbmap -geometry' option so that something like:

xkbprint :0 -  |ps2pdf - > sun6.pdf # try to make use of the xkb_geometry

... would display a picture of the Sun type 6 keyboard?

Edited to change sun:type6 to sun(type6): The format of the options seems to be 'file(entry)' within the /usr/share/X11/xkb/option_name/ directory.

  • 1
    You are using the wrong model. As per /usr/share/X11/xkb/rules/base only sun_type6_usb = sun(type6) is defined; if you scroll down you'll see that all undefined models are mapped to pc104: * = pc(pc104). If you want to use sun6 as a model you'll have to define it. Otherwise just run setxkbmap -rules 'xorg' -model 'sun_type6_usb' -layout us -geometry 'sun(type6)' -v 10 . Let me know if it works for you (works fine here but I'm not on Debian). – don_crissti Apr 20 '15 at 19:17
  • Thanks. That particular line worked for printing out the graphic, but it seemd to disable my arrow keys. I then figured out that the 'rules' setting seems to be sticky, and I needed something like 'setxkbdmap -rules evdev -model sun6 -layout us` to get them back. Also, your comment helped me figure out that I was interpreting the rules files improperly -- the ! model variant = geometry lines aren't comments, they are actual parser directions, which makes things much more clear. – Dave X Apr 20 '15 at 20:43
  • 1
    No problem. Here's some related stuff that might be useful. – don_crissti Apr 20 '15 at 20:56

Per don_crissti's comments above, I eventually edited my /usr/share/X11/xkb/rules/evdev to include these lines under the !model = geometry section:

!model        =       geometry
sun6          =       sun(type6)
sun5          =       sun(type5)
sun4          =       sun(type4)

The http://anti.teamidiot.de/nei/2010/06/sun_unix_keyboard_linux_gnome/ was also a good resource in understanding what these files do.

My current setup is below, and each xkb_(WHAT) line is interpretable by looking in the appropriate /usr/share/X11/xkb/(WHAT) directory for the files on the RHS.

$ setxkbmap -print
xkb_keymap {
    xkb_keycodes  { include "evdev+aliases(qwerty)" };
    xkb_types     { include "complete"  };
    xkb_compat    { include "complete"  };
    xkb_symbols   { include "pc+sun_vndr/us(type6)+inet(evdev)+ctrl(nocaps)"    };
    xkb_geometry  { include "sun(type6)"    };

The following will set a the xkb/geometry to the entry defined as 'type6' within the /usr/share/X11/xkb/geometry/sun file:

setxkbmap -geometry 'sun(type6)' 

If you use the -print option while setting the options, it merely echos the options given and does not report the resultant configuration. Do setxbkmap -print without other options to see what is set.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.