On Sun, 25 Sep 2016, Brian wrote:
On Sat 24 Sep 2016 at 15:07:10 +0000, david...@freevolt.org wrote:
On Sat, 24 Sep 2016, Lisi Reisz wrote:
My husband has just asked to do this. His system is vanilla from
this point of view. (Mine is in a mess, with a messed-up scim and
no foreign fonts "working", but that is another story.)
Advice please on the best way to achieve this for him. I.e., what
do those of you doing this or similar find works comfortably.
This is what I use in my /etc/default/keyboard file:
$ grep '^[^#]' /etc/default/keyboard
XKBMODEL="pc101"
XKBLAYOUT="us,ru,sy"
XKBVARIANT=""
XKBOPTIONS="grp:caps_toggle,compose:menu"
BACKSPACE="guess"
The "ru" portion of the XKBLAYOUT value, and the "grp:caps_toggle"
setting in XKBOPTIONS are the relevant parts for your purposes.
It makes capslock a toggle between en_US, russian, and syrian
arabic keyboard layout.
The usual capslock function is still available via Shift+Capslock.
I'll be interested to see other responses.
Neat! Done as root, of course, because I do not think a user can
change the keymap.
Yes. A method that allows an unprivileged user to configure their
keyboard in a given VT would better suit my purposes but, until I find
that method, this is what I'm using.
(Though I have since changed the XKBLAYOUT to just "us,ru" because
that three-way toggling, us -> ru -> us -> sy, was so annoying as to
be practically non-functional, my arabic is crap besides, etc.)
The setupcon manual implies a ~/.keyboard can be used but it does
not work for me.
Me neither. I have not managed to get that to work. (For french
language input, specifically, I prefer the "alt-intl" value for
XKBVARIANT, but for most other purposes it is somewhat impractical on
my keyboard model, and I would not wish to impose it on arbitrary
users. I should/might/will probably start a new thread soon about
getting ~/.keyboard customisation to work in virtual terminals.)
However, a user can set the screen font by specifing a file to use
with VARIANT. This is ~/.console-setup.CYR:
ACTIVE_CONSOLES="/dev/tty[1-6]"
CHARMAP="UTF-8"
CODESET="CyrSlav"
FONTFACE="TerminusBold"
FONTSIZE="14x28"
Load it with 'setupcon -f' CYR.
Thank you so much for this. This filled in a couple of missing links
for me, and now I can view cyrillic in the VT of my choice.
(Before this, I could enter, but not view cyrillic in a VT, unless I
made system-wide changes. That is, to view whatever I had typed, I had
to either start up an X display, or as root make the system-wide
change to CyrSlav codeset.)
Also, having speculated that the ACTIVE_CONSOLES value could be a
command substitution, I tried
ACTIVE_CONSOLES="$(tty)"
in my ~/.console-setup.cyr. It works as expected.
Now issuing "setupcon -f cyr" in a given VT configures CyrSlav codeset
for just that VT. (As default, I prefer Lat15.)