Issue with freebsd as guest in virtualbox


New Member

Messages: 11

Hi, I am having an issue in VirtualBox, with FreeBSD as a guest.
This seems to only happen with FreeBSD its derivatives.

Basically, when I scroll up in _any_ browser using my mouse wheel, it causes me to go back one or more pages in my page viewing history. It is very annoying... I had hoped to use this VM frequently in light of Linux being such a failure that it's almost comical.

I have tried reinstalling, updating vbox, doing a fresh vbox install and I am certain my mouse device is set to PS/2 mouse, rather than tablet. Not that it matters as neither resolve this issue.


Active Member

Reaction score: 40
Messages: 194


For what I already experienced, that's the fault of moused. While in user root, type : service moused stop and test your browser. If there is no more trouble * , open /etc/rc.conf and delete the line moused_enable="YES".

A normal installation of FreeBSD does not enable moused in rc.conf. This rather concerns its derivatives like GhostBSD or TrueOS.

(*) Stopping moused hangs somewhat X. Just delete the line in rc.conf if there is one and reboot. If no line is visible and you don't find how moused is launched, try the modmap method bellow.
Last edited:



Reaction score: 941
Messages: 1,927

Just to enlighten moused(8) is automatically spawned if there is a mouse plugged in, but IIRC it just happens with USB mouses but not with PS/2 ones.


Staff member

Reaction score: 7,684
Messages: 30,622

IIRC it just happens with USB mouses but not with PS/2 ones.
Correct. For USB mice moused(8) is automatically loaded by devd(8) when a mouse is attached. For PS/2 mice it needs to be explicitly enabled and might interfere with VirtualBox's vboxmouse driver. I usually don't load it and configure Xorg to use the vboxmouse driver.


Active Member

Reaction score: 40
Messages: 194

I didn't know that, with FreeBSD, moused(8) is launched in case of USB mouse.

However, just to elaborate my point:
  • VirtualBox "plugs" a PS/2 mouse by default when it comes to create a VM.
  • After a dozen installations of FreeBSD, either in VMs or in real machines, I've never seen 'moused_enable="YES"' appear in /etc/rc.conf.
  • GhostBSD actually adds this very line in /etc/rc.conf. I wonder why...
  • TrueOS does not enable moused(8) in /etc/rc.conf but it runs anyway by default (I don't know from where). And it makes obviously the same trouble with the vboxmouse driver.
It's this kind of things wich made me choose FreeBSD instead of these derivatives. At the beginning, I cursed FreeBSD because I had to do the configuration of newly installed software by myself (and it isn't always easy). But now, I'm rather pleased with this principle.

Note : there is another solution to get rid of this unwanted "back page" and keep moused(8) running. You have to install x11/xmodmap and add this line as the first line of ~/.xinitrc: /usr/local/bin/xmodmap -e "pointer = 1 2 3 4 5 6 7 0 0 0". At least, it worked for me on GhostBSD until I realised this was in fact the fault of moused(8).