Klaus Zimmermann's Corner

Enabling Fullscreen on a FreeBSD guest VM

Perhaps not much of a "learn FreeBSD one command at a time" this time, but still useful for those who wish to start learning FreeBSD without a dedicated machine.

Once you install FreeBSD as a guest VM in VirtualBox, you might notice that you are limited to a 1024x800 resolution once you go graphical, which is sort of annoying and loses that feeling of desktop integration. If you search for a solution, many posts and sites appear to offer a solution, but as I've found out, many are wrong, including the FreeBSD Handbook this time.

I thought that solving this involved going low-level and fiddling with several config files, but turns out the solution was much more low-tech, and I think applies to pretty much any guest-host combination. Here it is:

  1. On the Guest machine, install the virtualbox-ose-additions package. This is the package name under FreeBSD, for other OSes, look for something like "VirtualBox Guest Addons."
  2. On the FreeBSD guest, add vboxguest_enable="YES" and vboxservice_enable="YES" to /etc/rc.conf. Other OSes might need to have the service enabled another way.
  3. Power down the guest machine.
  4. On the Host, open the VirtualBox Manager and set the Graphics Controller to VBoxSVGA, and enable 3D acceleration. Be careful: Virtuabox might complain that the settings aren't compatible and reset it to the default after you close the window. If this happens, set it from the "outside" without clicking the wizard (worked for me), or from the command line.
  5. Power on the guest and change your graphical settings with xrandr.
where to change the graphics settings in vbox
Instead of opening the wizard and configuring it, click this setting and change it straight from here. Otherwise VirtualBox overwrites it with the default.

There you go. No need to manually edit xorg.conf on the guest, or install DKMS drivers as so many forum posts and other documentation insisted. This simple, low-tech solution worked perfectly after spending almost one weekend of beating around the bush...

Have you ever tried using a fullscreen session on a FreeBSD VM before? How did you enable it? Share with me at Mastodon!

This post is number #9 of my #100DaysToOffload project. Follow my progress through Mastodon!

Last updated on 04/05/21