# VMware guest: vmmouse vs. XkbLayout



## White (Aug 28, 2018)

Hello,

I try to setup a FreeBSD 11.2 with Openbox as a VMware Fusion guest but I struggle with the virtual mouse and the keyboard layout.
Here are the commands I use: https://gist.github.com/arthurwhite/cc3b9c77f1c4d712bd281abbdfcf0199
More specifically, the X11 configuration:

```
Section "ServerFlags"
    Option     "AutoAddDevices" "false"
EndSection

Section "InputDevice"
    Identifier "Mouse0"
    Driver     "vmmouse"
    Option     "Device" "/dev/sysmouse"
EndSection

Section "InputClass"
    Identifier "KeyboardDefaults"
    Option     "XkbLayout" "fr"
EndSection

Section "Device"
    Identifier "Card0"
    Driver     "vmware"
EndSection
```

For the `vmmouse` setting to be taken into account, `AutoAddDevices` must be disabled. But at the same time, it voids the `XkbLayout` setting so I end up with the default US layout in my X11 session.
Inversely, if I remove:

```
Section "ServerFlags"
    Option     "AutoAddDevices" "false"
EndSection
```
, I got the wanted layout but no virtual mouse.

HAL activated or not, same story.
I even tried to force it from a _/usr/local/etc/hal/fdi/policy/x11-input.fdi_ file, with no success:

```
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keyboard">
      <merge key="input.x11_driver" type="string">kbd</merge>
      <merge key="input.xkb.layout" type="string">fr</merge>
    </match>
    <match key="info.capabilties" contains="input.mouse">
      <merge key="input.x11_driver" type="string">vmmouse</merge>
    </match>
  </device>
</deviceinfo>
```

As a last solution, I could run `setxkbmap -layout fr` from _~/.xinitrc_ but that looks disgraceful...
Other ideas?


----------

