21 comments on “FreeBSD 8.0 x86 and KDE4 full-screen in VirtualBox 3.1.4

  1. Heya,

    Good how to. But you could write also that input section needs this:

    Section “InputDevice”
    Identifier “Mouse0″
    Driver “vboxmouse”

  2. Thanks for this great tutorial Dave! It helped me a lot getting PCBSD 8.1 to run on the latest VirtualBox on my Mac. I wrote all about it on the PCBSD forum. It was a long road. No resizing yet, but at least a better port view and resolutions as well as a mouse pointer that can now go from the VirtualBox to the main system. In the PCBSD forum thread where I discussed it all I mentioned your excellent blog post as well. Keep on the good work!

  3. My installation of BC-BSD 8.1 in Virtualbox 3.2.8 was at first very frustrating, as I was stuck at 600×400 resolution and nothing any info I found through Google would make any difference. When I edited /etc/X11/xorg.conf, it immediately got rewritten. Even though the xorg.conf file was set on 1024×768, it still gave only 600×400. On a 19″ monitor, that’s pretty discouraging. But I’ve followed your howto and have got both a larger window to work in and mouse-cursor integration. This is sooo much better.

    However, most installations of the guest additions allow the screen to be re-sized at will, and also allow integration of the clipboards for easy copy/paste between the host and guest. Is there any way to get FULL use of the guest additions?

    In faith, Dave
    Viva Texas

    • To get auto-resize to work you first need to run “VBoxService” on boot.

      Then in your .xinitrc (or other mechanism that will run when X starts) run “VBoxClient –display” to enable the auto-resize. You can also run “VBoxClient –seamless” if you want to use seamless mode and “VBoxClient –clipboard” to enable clipboard sharing.

      • Dylan, thanks for your response.

        I created ~/.xinitrc, and put all 4 commands in it, then rebooted. Same size VBox window and no integration. So I tried ‘VBoxService’ in a terminal:

        If I run VBoxService as user, it gives an error: “VbglR3Init failed with rc=VERR_ACCESS_DENIED”.

        If I run it as root, it gives an error: “”VBoxService error: Failed to connect to the guest property service! Error: VBRR_INVALID_PARAMETER. VBoxService error: Service ‘timesync’ failed pre-init: VERR_INVALID_PARAMETER”.

        I do “sorta” OK in Linux but this is the first time I’ve been able to get a ‘BSD running so I don’t know much. “For Dummies” instructions might help a great deal. Thanks!

        In faith, Dave
        Viva Texas

  4. Hi Dave,

    You forgot to put the “vboxguest_enable” line in your “rc.conf”.

    It’s also worth nothing that if you set a specifc resolution in the “xorg.conf” file then auto-resize will be disabled, so you should *not* put in the 1280×1024 mode line.

    Here is a very brief list of what I did, although keep in mind I did not install KDE or any other desktop environment, just enough to test the auto-resize.

    a] Installed FreeBSD 8.1 and used “freebsd-update” to get it to the latest version
    b] Ran “pkg_add -r xorg virtualbox-ose-additions” to install the basic packages needed. You could use ports too.
    c] Added “dbus_enable”, “hald_enable” and “vbosguest_enable” to the rc.conf and rebooted.
    d] Ran “Xorg -configure” and copied the resulting “/root/xorg.conf.new” to “/etc/X11/xorg.conf”
    e] Edited “/etc/X11/xorg.conf” and changed “mouse” to “vboxmouse” on the input driver
    f] Ran “VBoxService”
    g] Ran “startx” resulting in a basic “twm” window manager.
    h] In one of the xterms ran “VBoxClient –display”, “VBoxClient –seamless” and VBoxClient –clipboard” (I haven’t tested the clipboard function though)

    After these steps I was able to use auto-resize and seamless mode. The “twm” window manager doesn’t like seamless mode though, so if you want seamless I’d recommend installing a different wm.

    Hope this helps.


    - Dylan

  5. The vboxguest_enable=”YES” entry already appears in my /etc/rc.conf file. I ‘#’ the modes entry in /etc/X11/xorg.conf, and rebooted; PC-BSD could not start ‘X’, so I logged in as root and removed the ‘#’ in xorg.conf with Nano. Now I reboot back to my 1280×1024 window size. Neither Seamless nor Clipboard are working.

    It seems that you are installing PC-BSD directly in your machine as host and installing Virtualbox in PC-BSD. I am installing Virtualbox in a PCLinuxOS host and trying to run PC-BSD as guest. The desktop is KDE. Don’t know if I made that plain above.

    I have installed the Guest Additions in PC-BSD. Looking through your ‘script’, there are already entries for dbus_enable and hald_enable in rc.conf. I changed ‘mouse’ to ‘vboxmouse’ in xorg.conf. On rebooting, I have my same 1280×1024 window, but the cursor is free now (seanless); however, nothing happens when I click on things: the flame icon gives me a tip but not a menu, and the konsole icon doesn’t give me a terminal. There’s a new tiny icon in the taskbar notifications area which says ‘driver “mouse”‘.

    So now I have seamless but can’t click on anything. ?????

    In faith, Dave
    Viva Texas

    • I followed Dylans recipe and can confirm that everything (including seamless mode) works perfectly for a FreeBSD 8.1 GUEST on an Ubuntu 10.10 Maverick host system. I’m using unmodified gnome desktop. Grafics acceleration is enabled both in the host and in Virtualbox, 32MB video ram have been assigned.

      I’m however new to FreeBSD and VirtualBox so I would appreciate any recommendations on how to best integrate VBoxService and the VBoxClient commands into startup scripts. I’ve gdm_enable in my rc.conf.


      • Hi Hubert,

        The important thing is that VBoxService is run by root on startup and then the various VBoxClient commands need to be run by root after X is started.

        To get VBoxService started I’d recommend creating or editing “/etc/rc.local” and adding a line to start “/usr/local/sbin/VBoxService”. You may need to “chmod a+x /etc/rc.local”

        For the VBoxClient open up “/usr/local/etc/gdm/PreSession/Default” and add the various VBoxClient lines to the end.


        - Dylan Bridgman

    • Hi Dave,

      I have installed PC-BSD on my side and here are the steps I followed to get it all working. Note that is has to be PC-BSD 8.1, the package installed in step c is not available for 8.0:

      a] Install PC-BSD 8.1. When asked on first startup, leave the driver as VESA.
      b] Open a terminal, run “su -” to get root
      c] Run “pkg_add -r virtualbox-ose-additions”
      d] Run “cp /usr/local/share/hal/fdi/policy/10osvendor/90-vboxguest.fdi /usr/local/etc/hal/fdi/policy/90-vboxguest.fdi”
      e] Create “/etc/rc.local” with the following contents:
      f] Run “chmod a+x /etc/rc.local”
      g] Edit “/etc/rc.conf” and add vboxguest_enable=”YES” to the end
      h] Edit /etc/X11/xorg.conf, change “vesa” to “vboxvideo”, change “mouse” to “vboxmouse”, and delete the lines for Buttons, ZAxisMapping, Emulate3Buttons, Device and Protocol
      i] Edit /usr/local/kde4/share/config/kdm/Xstartup and the following to the end:
      /usr/local/sbin/VBoxClient –display
      /usr/local/sbin/VBoxClient –seamless
      /usr/local/sbin/VBoxClient –clipboard
      j] Reboot

      • Apart from the VBoxClient commands needing to have two dashes, — , this works for me, but the clipboard sharing does not. Has anybody confirmed this works? (Win7x64 host)

  6. Dylan: I’m not going to have time for a couple of weeks to follow your process posted above to see if it will solve my problems. I’m getting ready to go on a camping trip to Virginia and Iowa. However, when I get back I will give her a whirl.

    I’m not giving up on PC-BSD; just plowed under right now.

    In faith, Dave
    Viva Texas

  7. Pingback: 2010 in review « Dave Koelmeyer

  8. Thanks all for this tutorial and comments.
    PCBSD 8.2 users may want to check this.
    In my case VBoxClient resides in /usr/local/bin.

    So in the file /usr/local/kde4/share/config/kdm/Xstartup I have
    /usr/local/bin/VBoxClient –display
    /usr/local/bin/VBoxClient –seemless
    /usr/local/bin/VBoxClient –clipboard

    On the other hand VBoxService and VBoxControl are in /usr/local/sbin.

    Prior to the change above fullscreen did not work, despite allowing 1680X1050 resolution.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s