[libvirt-users] virsh console and other language keymaps

Daniel P. Berrangé berrange at redhat.com
Thu Nov 29 15:11:52 UTC 2018


On Thu, Nov 29, 2018 at 06:41:19AM -0800, Michael Taboada wrote:
> Hi,
> I've got a small vm server running kvm + libvirt, and I made a simple
> shell script that allows users to ssh in and control their vms (power
> off, etc). However, one of my users uses the french canadian keyboard
> layout on her home computer, and upon being told "escape character is
>  ^]" expected to need to press ctrl+right-alt_] (] being in the same
> location it is on a US keyboard). This is because on a french canadian
> layout, the right bracket key is in the same spot at on US layout, but
> needs to press right alt with it or it is the c-cedilla key. However,
> upon pressing ctrl+right-alt+c-cedilla, nothing happens (even this is
> ctrl+right bracket on a canadian keyboard). Instead, pressing
> ctrl+c-cedilla on her canadian french keyboard exits the console as
> if it were using a US layout. My question: how to make it so pressing
> ctrl+(canadian ]) works? Is this something that has to be done on the
> vm side, or on the host side, or maybe on the client ssh side?

The guest OS is not involved. This is interpreted by virsh running
on the host. The  "^]" key is an ascii control character (0x1d).

Libvirt doesn't control how this control character is entered. It
just reads bytes from the console until it sees the value 0x1d.

IIUC how ^] is entered is upto the the terminal program you're
using, possibly with influence from TTY settnigs.

> I'd prefer it be something thast can be different based on
> who is using the virsh console  command since me, as the
> admin, may need to help with the console at some points,
> and my keyboard is US, so I have no c-cedilla or canadian
> right bracket key, but she does.

You can use '--escape STRING' to customize which control key
sequence triggers exit

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvirt-users mailing list