After installing FreeBSD with a desktop environment, the first thing I wanted to fix was the virtual screen size, which was much smaller than the physical screen. I eventually managed it, after several hours’ experimenting and trying various fixes posted on the Web.
Before getting to that, a fresh installation doesn’t have the ‘sudo’ program to enable the execution of specific tasks with root privilieges. Switch to another terminal, e.g. Ctrl+Alt+F4, log in as root, then install ‘sudo‘:
#pkg install sudo
Now we need to add the user to the sudoers file, using the visudo command. Unfortunately we must use vi. All we need to know here is the ‘I’ key is used for inserting text, and when done the ‘Esc’ key, followed by the ‘:wq’ command.
Add something like the following into the file:
michael All=(ALL) ALL
Maxing Out the Display
As often happens when installing Linux/UNIX on VirtualBox, and sometimes when installing on physical hardware, the desktop is much smaller than the physical screen.
In this case, I’m guessing the underlying problem was the operating system attempted to detect the video hardware and load the appropriate driver for it. Failing that (because it’s VirtualBox), the operating system falls back to a generic driver module. We need to replace this module with something from the VirtualBox Additions package. The following solution was taken from the FreeBSD wiki (the last place I looked!).
To install the VirtualBox Additions:
#sudo pkg install virtualbox-ose-additions-4.3.32
Then enable the VirtualBox guest services by adding the following lines to /etc/rc.conf:
Skip the other steps in the wiki page and go straight to the bit about xorg.conf. The following lines in the Device section are the important ones:
VendorName "InnoTek Systemberatung GmbH"
BoardName "VirtualBox Graphics Adapter"
Hopefully the boot messsages would show the VirtualBox additions being loaded successfully whenever the system is rebooted, and a full size desktop should appear.
Installations without a Desktop Environment
Before resolving the KDE problem, I managed to fix the display size for the command line by playing with the video mode. As far as I can tell, this only works when the generic display driver module’s loaded.
The following command displays a list of video modes:
#vidcontrol -i mode
Whichever one of those listed is used is a matter of trial and error, of trying the ones that appear right, with something like:
When you’ve hit the correct one, the mode can be made persistent by adding the following line to /etc/rc.conf: