bhyve How to change the terminal and the general language in xfce4 / Xubuntu 21.04 emulated with vm.bhyve

Hello.

Another question on the linux vm emulated with vm.bhyve. Please don't blame me. I tried a lot of different settings but I haven.t been able to change the default and the wide and terminal / keyboard language in the xfce4 DM installed by default on Xubuntu 21.04 that I have emulated with vm.bhyve. I.m sure that it should be defined inside the configuration file of vm.bhyve,but I haven.t understood where. There is nothing inside the config.sample file that could be related to this setting. Below I have copied and pasted the content of that file on Ubuntu paste bin.

https://pastebin.ubuntu.com/p/tCp2gWkv9W/

Needless to say, to change it within Xfce I have tried everything,including this :

https://unix.stackexchange.com/questions/167794/how-might-one-change-language-interface-in-xfce

But maybe I missed some other method. What would you advise me to do ? thanks.
 
I don't use bhyve, but common sense suggests that it has nothing to do with the language used in its guest operating systems.
You better ask in a Linux forum how to properly set the language of Xubuntu.
 
I'm not sure if I understand your problem but if you are accessing your VM's using any VNC viewer, trying to use any keyboard mapping on the VM other than US keyboard will led to mismatches despite the key mapping used in the guest. At least it does on any VNC I try. This seems to be caused by a limitation of RFB protocol not being able to send actual key codes but only the key symbols.

Best bet is setting keyboard to standard US on the guest I think.

Maybe creating your own keyboard layout may work. I'm not sure. https://unix.stackexchange.com/ques...one-create-a-custom-keyboard-layout-for-linux
 
it seems the solution. I tried to apply the patch as follows : but Im not sure if it worked / how much it worked...what do u think ? I've got the patch file here :

https://osdn.net/users/koinec/pf/bh...bdlayout_option/bhyve_kbdlayout_fbsd13c.patch

Code:
root@marietto:/usr/src/usr.sbin # patch -u < bhyve_kbdlayout_fbsd13c.patch

Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -upN bhyve_orig/Makefile bhyve/Makefile
|--- bhyve_orig/Makefile    2020-04-23 09:06:39.000000000 +0900
|+++ bhyve/Makefile    2020-05-02 13:09:01.382770000 +0900
--------------------------
Patching file Makefile using Plan A...
Hunk #1 failed at 99.
1 out of 1 hunks failed--saving rejects to Makefile.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -upN bhyve_orig/bhyve.8 bhyve/bhyve.8
|--- bhyve_orig/bhyve.8    2020-04-23 09:06:39.000000000 +0900
|+++ bhyve/bhyve.8    2020-05-02 13:11:28.198679000 +0900
--------------------------
Patching file bhyve/bhyve.8 using Plan A...
Hunk #1 failed at 47.
Hunk #2 succeeded at 150 (offset -12 lines).
1 out of 2 hunks failed--saving rejects to bhyve/bhyve.8.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -upN bhyve_orig/bhyverun.c bhyve/bhyverun.c
|--- bhyve_orig/bhyverun.c    2020-04-23 09:06:39.000000000 +0900
|+++ bhyve/bhyverun.c    2020-05-02 13:09:01.437624000 +0900
--------------------------
Patching file bhyve/bhyverun.c using Plan A...
Hunk #1 succeeded at 188 (offset 20 lines).
Hunk #2 failed at 239.
Hunk #3 succeeded at 230 with fuzz 1 (offset 1 line).
Hunk #4 failed at 1024.
Hunk #5 succeeded at 1146 (offset 85 lines).
2 out of 5 hunks failed--saving rejects to bhyve/bhyverun.c.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -upN bhyve_orig/bhyverun.h bhyve/bhyverun.h
|--- bhyve_orig/bhyverun.h    2020-04-23 09:06:39.000000000 +0900
|+++ bhyve/bhyverun.h    2020-05-02 13:09:01.444814000 +0900
--------------------------
Patching file bhyve/bhyverun.h using Plan A...
Hunk #1 failed at 39.
1 out of 1 hunks failed--saving rejects to bhyve/bhyverun.h.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Common subdirectories: bhyve_orig/kbdlayout and bhyve/kbdlayout
|diff -upN bhyve_orig/ps2kbd.c bhyve/ps2kbd.c
|--- bhyve_orig/ps2kbd.c    2020-04-23 09:06:39.000000000 +0900
|+++ bhyve/ps2kbd.c    2020-05-02 13:09:01.462761000 +0900
--------------------------
Patching file bhyve/ps2kbd.c using Plan A...
Hunk #1 failed at 31.
Hunk #2 succeeded at 67 (offset 3 lines).
Hunk #3 succeeded at 97 (offset 3 lines).
Hunk #4 succeeded at 169 (offset 3 lines).
Hunk #5 succeeded at 327 (offset 3 lines).
Hunk #6 succeeded at 377 (offset 3 lines).
1 out of 6 hunks failed--saving rejects to bhyve/ps2kbd.c.rej
done

root@marietto:/usr/src/usr.sbin # sh bhyve_kbdlayout.shar
sh: cannot open bhyve_kbdlayout.shar: No such file or directory

root@marietto:/usr/src/usr.sbin # cd /usr/src/usr.sbin/bhyve

root@marietto:/usr/src/usr.sbin/bhyve # make

[Creating objdir /usr/obj/usr/src/amd64.amd64/usr.sbin/bhyve...]
echo bhyve.full: /usr/lib/libc.a /usr/lib/libvmmapi.a /usr/lib/libmd.a /usr/lib/libpthread.a /usr/lib/libz.a /usr/lib/libutil.a /usr/lib/libsbuf.a /usr/lib/libcam.a /usr/lib/lib9p.a    /usr/lib/libnetgraph.a /usr/lib/libcrypto.a >> .depend
......
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -g -MD  -MF.depend.ps2kbd.o -MTps2kbd.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/ps2kbd.c -o ps2kbd.o
/usr/src/usr.sbin/bhyve/ps2kbd.c:407:14: error: variable has incomplete type 'struct stat'
        struct stat sb;
                    ^
/usr/src/usr.sbin/bhyve/ps2kbd.c:407:9: note: forward declaration of 'struct stat'
        struct stat sb;
               ^
/usr/src/usr.sbin/bhyve/ps2kbd.c:413:16: error: use of undeclared identifier 'kbdlayout_name'
        strncat(path, kbdlayout_name, (sizeof(path) - strlen(PS2KBD_LAYOUT_BASEDIR) - 1));
                      ^
/usr/src/usr.sbin/bhyve/ps2kbd.c:415:8: error: implicit declaration of function 'stat' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        err = stat(path, &sb);
              ^
/usr/src/usr.sbin/bhyve/ps2kbd.c:423:7: error: implicit declaration of function 'open' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        fd = open(path, O_RDONLY);
             ^
/usr/src/usr.sbin/bhyve/ps2kbd.c:423:18: error: use of undeclared identifier 'O_RDONLY'
        fd = open(path, O_RDONLY);
                        ^
/usr/src/usr.sbin/bhyve/ps2kbd.c:427:7: error: implicit declaration of function 'read' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        sz = read(fd, buf, sb.st_size );
             ^
/usr/src/usr.sbin/bhyve/ps2kbd.c:427:7: note: did you mean 'fread'?
/usr/include/stdio.h:263:9: note: 'fread' declared here
size_t   fread(void * __restrict, size_t, size_t, FILE * __restrict);
         ^
/usr/src/usr.sbin/bhyve/ps2kbd.c:429:2: error: implicit declaration of function 'close' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        close(fd);
        ^
/usr/src/usr.sbin/bhyve/ps2kbd.c:458:6: error: use of undeclared identifier 'kbdlayout_name'
        if (kbdlayout_name != NULL)
            ^
8 errors generated.
*** Error code 1

Stop.
make: stopped in /usr/src/usr.sbin/bhyve
 
I don't understand the problem between the VM and Xfce. I used this guide to set the language on FreeBSD. Then I selected the keyboard layout from the Xfce settings panel. I hope it will help you.

Code:
locale -a | grep es_ES

ee ~/.profile
LANG=es_ES.ISO8859-1; export LANG
MM_CHARSET=ISO-8859-1; export MM_CHARSET

ee ~/.xinitrc
exec /usr/local/bin/startxfce4 --with-ck-launch
LANG=es_ES.ISO8859-1; export LANG
setenv LANG es_ES.ISO8859-15

Maybe I only needed one of them.
 
instead,I have applied these patches here : https://cgit.freebsd.org/src/commit/?id=b563ff5d4f812df198ade6991834782a5d35af08

and this is what happened :

Code:
root@marietto:~ # cd /usr/src/usr.sbin/bhyve

root@marietto:/usr/src/usr.sbin/bhyve # make
rm -f .depend
echo bhyve.full: /usr/lib/libc.a /usr/lib/libvmmapi.a /usr/lib/libmd.a /usr/lib/libpthread.a /usr/lib/libz.a /usr/lib/libutil.a /usr/lib/libsbuf.a /usr/lib/libcam.a /usr/lib/lib9p.a    /usr/lib/libnetgraph.a /usr/lib/libcrypto.a >> .depend
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -g -MD  -MF.depend.console.o -MTconsole.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/console.c -o console.o
In file included from /usr/src/usr.sbin/bhyve/console.c:35:
/usr/src/usr.sbin/bhyve/console.h:51:1: error: '/*' within block comment [-Werror,-Wcomment]
/*void console_key_event(int down, uint32_t keysym);
^
/usr/src/usr.sbin/bhyve/console.h:57:8: error: '/*' within block comment [-Werror,-Wcomment]
#endif /* _CONSOLE_H_ */
       ^
/usr/src/usr.sbin/bhyve/console.h:31:2: error: unterminated conditional directive
#ifndef _CONSOLE_H_
 ^
/usr/src/usr.sbin/bhyve/console.c:43:2: error: unknown type name 'kbd_event_func_t'
        kbd_event_func_t        kbd_event_cb;
        ^
/usr/src/usr.sbin/bhyve/console.c:47:2: error: unknown type name 'ptr_event_func_t'
        ptr_event_func_t        ptr_event_cb;
        ^
/usr/src/usr.sbin/bhyve/console.c:89:22: error: unknown type name 'kbd_event_func_t'
console_kbd_register(kbd_event_func_t event_cb, void *arg, int pri)
                     ^
/usr/src/usr.sbin/bhyve/console.c:99:22: error: unknown type name 'ptr_event_func_t'
console_ptr_register(ptr_event_func_t event_cb, void *arg, int pri)
                     ^
/usr/src/usr.sbin/bhyve/console.c:113:1: error: '/*' within block comment [-Werror,-Wcomment]
/*              (*console.kbd_event_cb)(down, keysym, console.kbd_arg);
^
/usr/src/usr.sbin/bhyve/console.c:109:1: error: unterminated /* comment
/*console_key_event(int down, uint32_t keysym)
^
/usr/src/usr.sbin/bhyve/console.c:122:2: error: expected identifier or '('
}
 ^
10 errors generated.
*** Error code 1
 
this is my .xinitrc file :

nano ~/.xinitrc

Code:
#. /usr/local/etc/xdg/xfce4/xinitrc
setxkbmap it
exec ck-launch-session dbus-launch --exit-with-session startplasma-x11

it works great on FreeBSD. It allows me to use the language I want. But it's not enough for the linux guest emulated with bhyve.
 
Code:
root@marietto:/usr/src/usr.sbin/bhyve # make

cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -g -MD  -MF.depend.config.o -MTconfig.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/config.c -o config.o

In file included from /usr/src/usr.sbin/bhyve/virtio.c:50:
In file included from /usr/src/usr.sbin/bhyve/virtio.h:36:
/usr/src/sys/dev/virtio/virtio.h:90:23: error: unknown type name 'device_t'
void     virtio_describe(device_t dev, const char *msg,
                         ^
/usr/src/sys/dev/virtio/virtio.h:95:27: error: unknown type name 'device_t'
int      virtio_bus_is_modern(device_t dev);
                              ^
/usr/src/sys/dev/virtio/virtio.h:96:39: error: unknown type name 'device_t'
void     virtio_read_device_config_array(device_t dev, bus_size_t offset,
                                         ^
/usr/src/sys/dev/virtio/virtio.h:96:53: error: unknown type name 'bus_size_t'
void     virtio_read_device_config_array(device_t dev, bus_size_t offset,
                                                       ^
/usr/src/sys/dev/virtio/virtio.h:102:24: error: unknown type name 'device_t'
void     virtio_read_ivar(device_t dev, int ivar, uintptr_t *val);
                          ^
/usr/src/sys/dev/virtio/virtio.h:103:25: error: unknown type name 'device_t'
void     virtio_write_ivar(device_t dev, int ivar, uintptr_t val);
                           ^
/usr/src/sys/dev/virtio/virtio.h:104:36: error: unknown type name 'device_t'
uint64_t virtio_negotiate_features(device_t dev, uint64_t child_features);
                                   ^
/usr/src/sys/dev/virtio/virtio.h:105:31: error: unknown type name 'device_t'
int      virtio_finalize_features(device_t dev);
                                  ^
/usr/src/sys/dev/virtio/virtio.h:106:30: error: unknown type name 'device_t'
int      virtio_alloc_virtqueues(device_t dev, int flags, int nvqs,
                                 ^
/usr/src/sys/dev/virtio/virtio.h:108:24: error: unknown type name 'device_t'
int      virtio_setup_intr(device_t dev, enum intr_type type);
                           ^
/usr/src/sys/dev/virtio/virtio.h:108:43: error: declaration of 'enum intr_type' will not be visible outside of this function [-Werror,-Wvisibility]
int      virtio_setup_intr(device_t dev, enum intr_type type);
                                              ^
/usr/src/sys/dev/virtio/virtio.h:109:26: error: unknown type name 'device_t'
int      virtio_with_feature(device_t dev, uint64_t feature);
                             ^
/usr/src/sys/dev/virtio/virtio.h:110:19: error: unknown type name 'device_t'
void     virtio_stop(device_t dev);
                     ^
/usr/src/sys/dev/virtio/virtio.h:111:31: error: unknown type name 'device_t'
int      virtio_config_generation(device_t dev);
                                  ^
/usr/src/sys/dev/virtio/virtio.h:112:20: error: unknown type name 'device_t'
int      virtio_reinit(device_t dev, uint64_t features);
                       ^
/usr/src/sys/dev/virtio/virtio.h:113:30: error: unknown type name 'device_t'
void     virtio_reinit_complete(device_t dev);
                                ^
/usr/src/sys/dev/virtio/virtio.h:114:31: error: unknown type name 'device_t'
int      virtio_child_pnpinfo_str(device_t busdev, device_t child, char *buf,
                                  ^
/usr/src/sys/dev/virtio/virtio.h:114:48: error: unknown type name 'device_t'
int      virtio_child_pnpinfo_str(device_t busdev, device_t child, char *buf,
                                                   ^
/usr/src/sys/dev/virtio/virtio.h:122:33: error: unknown type name 'device_t'
void     virtio_read_device_config(device_t dev, bus_size_t offset,
                                   ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
*** Error code 1

Stop.
make: stopped in /usr/src/usr.sbin/bhyve
 
Last edited by a moderator:
I don't understand the problem between the VM and Xfce. I used this guide to set the language on FreeBSD. Then I selected the keyboard layout from the Xfce settings panel. I hope it will help you.

Code:
locale -a | grep es_ES

ee ~/.profile
LANG=es_ES.ISO8859-1; export LANG
MM_CHARSET=ISO-8859-1; export MM_CHARSET

ee ~/.xinitrc
exec /usr/local/bin/startxfce4 --with-ck-launch
LANG=es_ES.ISO8859-1; export LANG
setenv LANG es_ES.ISO8859-15

Maybe I only needed one of them.

You mean you changed locale in FreeBSD host then selected the keyboard in the VM and it worked? guest VM is linux?
 
I've got all the files included in this zipped file :


and I have extracted everything inside /usr/src and then from within the folder : /usr/src/usr.sbin/bhyve,I did :

Code:
root@marietto:/usr/src/usr.sbin/bhyve # make

cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.atkbdc.o -MTatkbdc.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/atkbdc.c -o atkbdc.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.acpi.o -MTacpi.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/acpi.c -o acpi.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.audio.o -MTaudio.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/audio.c -o audio.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.bhyvegc.o -MTbhyvegc.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/bhyvegc.c -o bhyvegc.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.bhyverun.o -MTbhyverun.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/bhyverun.c -o bhyverun.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.block_if.o -MTblock_if.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/block_if.c -o block_if.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.bootrom.o -MTbootrom.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/bootrom.c -o bootrom.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.config.o -MTconfig.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/config.c -o config.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.console.o -MTconsole.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/console.c -o console.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.ctl_util.o -MTctl_util.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/sys/cam/ctl/ctl_util.c -o ctl_util.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.ctl_scsi_all.o -MTctl_scsi_all.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/sys/cam/ctl/ctl_scsi_all.c -o ctl_scsi_all.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.fwctl.o -MTfwctl.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/fwctl.c -o fwctl.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.gdb.o -MTgdb.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/gdb.c -o gdb.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.hda_codec.o -MThda_codec.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/hda_codec.c -o hda_codec.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.inout.o -MTinout.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/inout.c -o inout.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.ioapic.o -MTioapic.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/ioapic.c -o ioapic.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.kernemu_dev.o -MTkernemu_dev.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments -I/usr/src/sys/amd64   -c /usr/src/usr.sbin/bhyve/kernemu_dev.c -o kernemu_dev.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.mem.o -MTmem.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/mem.c -o mem.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.mevent.o -MTmevent.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/mevent.c -o mevent.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.mptbl.o -MTmptbl.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/mptbl.c -o mptbl.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.net_backends.o -MTnet_backends.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/net_backends.c -o net_backends.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.net_utils.o -MTnet_utils.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/net_utils.c -o net_utils.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.pci_ahci.o -MTpci_ahci.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/pci_ahci.c -o pci_ahci.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.pci_e82545.o -MTpci_e82545.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/pci_e82545.c -o pci_e82545.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.pci_emul.o -MTpci_emul.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/pci_emul.c -o pci_emul.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.pci_hda.o -MTpci_hda.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/pci_hda.c -o pci_hda.o
cc  -O2 -pipe -fno-common   -I/usr/src/usr.sbin/bhyve/../../contrib/lib9p -I/usr/src/sys -DINET -DINET6 -DNETGRAPH -I/usr/src/sys/dev/e1000 -I/usr/src/sys/dev/mii -I/usr/src/sys/dev/usb/controller -fPIE -g -MD  -MF.depend.pci_fbuf.o -MTpci_fbuf.o -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments    -c /usr/src/usr.sbin/bhyve/pci_fbuf.c -o pci_fbuf.o
/usr/src/usr.sbin/bhyve/pci_fbuf.c:231:7: error: implicit declaration of function 'vm_munmap_memseg' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                if (vm_munmap_memseg(ctx, sc->fbaddr, FB_SIZE) != 0)
                    ^
/usr/src/usr.sbin/bhyve/pci_fbuf.c:231:7: note: did you mean 'vm_mmap_memseg'?
/usr/include/vmmapi.h:111:5: note: 'vm_mmap_memseg' declared here
int     vm_mmap_memseg(struct vmctx *ctx, vm_paddr_t gpa, int segid,
        ^
1 error generated.
*** Error code 1
 
I suggest to you to create a linux virtual machine using bhyve and xubuntu and then to change the default english language to another one of your choice,for example the italian. And tell me if you will have this language everywhere. Most of all,for the mapping of the keyboard when u use the terminal. (i'm using kde5 on freebsd and xfce4 on the linux virtual machine)
 
You mean you changed locale in FreeBSD guest then selected the keyboard in the VM and it worked? VM is linux?

why you added this :
Code:
LANG=es_ES.ISO8859-1; export LANG
setenv LANG es_ES.ISO8859-15
on ~/.xinitrc ?

according to this site : https://programmersought.com/article/29704544946/

: sh

Modify ~/.profile file, add

LANG=zh_CN.UTF-8; export LANG
MM_CHARSET=zh_CN.UTF-8; export MM_CHARSET

: csh

Modify ~/.cshrc file, add

setenv LANG zh_CN.UTF-8
setenv MM_CHARSET UTF-8
 
Last edited by a moderator:
I suggest to you to create a linux virtual machine using bhyve and xubuntu and then to change the default english language to another one of your choice,for example the italian. And tell me if you will have this language everywhere. Most of all,for the mapping of the keyboard when u use the terminal. (i'm using kde5 on freebsd and xfce4 on the linux virtual machine)
I am not sure if the scope of this forum is to suggest that members make a virtual machines - to your specification - in order to assist your understanding.
 
I am not sure if the scope of this forum is to suggest that members make a virtual machines - to your specification - in order to assist your understanding.

the scope of the suggestions is not to assist me,but to give me some suggestions so that I can have a clearer vision of the problems that arise. But to give suggestions without trying can be a source of errors.
 
Last edited:
I am not sure if the scope of this forum is to suggest that members make a virtual machines - to your specification - in order to assist your understanding.

English is not his first/native language for sure so I guess the best option is being patient about it. English is not my first language also and sometimes is a struggle to transmit the correct message, sometimes with a risk of being (inadvertently) rude or something. Just because vocabulary or cultural differences.

the scope of my suggestion is not to assist me,but it is to have a clearer vision of the problems that arise. Giving suggestions without trying can be a source of errors.

You must get used to it. You cannot expect having always the best and most accurate support in the forums. Sometimes it goes in the opposite direction: People giving wrong or bad advice. They are just users trying to help anyway so it's your responsibility to filter it and adjust your expectations. Suggestions are just suggestions after all, it always can be a source of errors and this is normal.

why you added this :

LANG=es_ES.ISO8859-1; export LANG
setenv LANG es_ES.ISO8859-15

on ~/.xinitrc ?

according to this site : https://programmersought.com/article/29704544946/

: sh

Modify ~/.profile file, add

LANG=zh_CN.UTF-8; export LANG
MM_CHARSET=zh_CN.UTF-8; export MM_CHARSET

: csh


Modify ~/.cshrc file, add

setenv LANG zh_CN.UTF-8
setenv MM_CHARSET UTF-8

My suggestion is that you try being more organized while interacting with the posts. In this example you quoted a question I made to the other poster and asked why I added some settings? It makes no sense. Overall, the lack of this type of organization will make people confused about answering to the posts or about what you are really asking.
 
I'm not sure if I understand your problem but if you are accessing your VM's using any VNC viewer, trying to use any keyboard mapping on the VM other than US keyboard will led to mismatches despite the key mapping used in the guest. At least it does on any VNC I try. This seems to be caused by a limitation of RFB protocol not being able to send actual key codes but only the key symbols.

Best bet is setting keyboard to standard US on the guest I think.

Maybe creating your own keyboard layout may work. I'm not sure. https://unix.stackexchange.com/ques...one-create-a-custom-keyboard-layout-for-linux
With my Belgium keyboard debian+xfce4 running under vm-bhyve , using vnc works perfect. Explain that ?
Altough i remember having problems with other linux distro's even on bear metal. So my best guess is the problem can be linux-distro related.
 
With my Belgium keyboard debian+xfce4 running under vm-bhyve , using vnc works perfect. Explain that ?
Altough i remember having problems with other linux distro's even on bear metal. So my best guess is the problem can be linux-distro related.
What's you keyboard exactly? 'AZERTY'? How do you config your keyboard? Using setxkbmap? Whats the keyboard config you use?
Do you have locale set to Belgium also?
 
It's an azerty variant.
I did almost no config.
My .zshrc,
Code:
# Lang & Local
export LANG="en_US.UTF-8"
export LC_ALL=$LANG
export LC_COLLATE=$LANG
export LC_CTYPE=$LANG
export LC_MESSAGES=$LANG
export LC_MONETARY=$LANG
export LC_NUMERIC=$LANG
export MM_CHARSET=$LANG
export TZ=Europe/Brussels

My rc.conf
Code:
keymap="be.acc.kbd"

My .xinitrc
Code:
setxkbmap be
 
It's an azerty variant.
I did almost no config.
My .zshrc,
Code:
# Lang & Local
export LANG="en_US.UTF-8"
export LC_ALL=$LANG
export LC_COLLATE=$LANG
export LC_CTYPE=$LANG
export LC_MESSAGES=$LANG
export LC_MONETARY=$LANG
export LC_NUMERIC=$LANG
export MM_CHARSET=$LANG
export TZ=Europe/Brussels

My rc.conf
Code:
keymap="be.acc.kbd"

My .xinitrc
Code:
setxkbmap be
So I config my keyboard the same way you do (and same LANG) except that my keyboard is ABNT2. Can't get many keys right in Ubuntu bhyve guest VM despite keyboard settings in Ubuntu, accessing with VNC.
But if I boot bare directly to Ubuntu it works.
Doesn't look like a Ubuntu/Linux issue for me.
 
The solution for this "bug" should be as follows :

1) Download latest-patch.

https://osdn.net/downloads/users/30/30328/bhyve_keyboard_layout_patch_20210505.tgz

2) Extract archive

# tar xvfz bhyve_keyboard_layout_patch_20210505.tgz

* Below, it is assumed that it is expanded to / root.

3) Backup bhyve original src-tree

# cd /usr/src/usr.sbin
# cp -r bhyve bhyve_orig

4) Apply patch1 - Support for QEMU Extended Key Event Messages.

# cd /usr/src/usr.sbin
# patch -u < /root/bhyve_keyboard_layout_patch/qemu_ext_keyevent_msg/bhyve_qemu_ext_key_event_msg_fbsd130r.patch

5) Apply patch2 - Support for Keyboard Layout specified option.

# cd /usr/src/usr.sbin
# patch -u < /root/bhyve_keyboard_layout_patch/kbdlayout_option/bhyve_kbdlayout_option_fbsd130r.patch
# sh /root/bhyve_keyboard_layout_patch/kbdlayout_option/bhyve_kbdlayout_layoutfile.shar

6) Build & Install

# cd /usr/src/usr.sbin/bhyve
# make
# make install

by Koine Yuusuke​

 
Back
Top