Project

General

Profile

Support #658

Install a FreeBSD Desktop As a VirtualBox Guest

Added by Daniel Curtis about 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Virtualization
Target version:
Start date:
09/13/2015
Due date:
% Done:

100%

Estimated time:
2.00 h
Spent time:

Description

I enjoy testing FreeBSD, and running it as a VM guest allows me to great flexibility in testing and development. This is a simple guide on how to install LXDE and X11 on a vanilla FreeBSD 10.2 VirtualBox guest.

Prepare the Environment

  • Make sure the system is up to date:
    pkg update && pkg upgrade
    
  • Install sudo
    pkg install sudo
    
  • Add user to the sudo group:
    pw groupadd sudo
    pw usermod bob -G sudo
    
  • Edit the sudo file:
    visudo
    
    • And uncomment the sudo group line:
      %sudo ALL=(ALL) ALL
      

Install Xorg and LXDE

  • Install Xorg:
    pkg install xorg hal dbus
    
  • Start and enable hald and dbus at boot:
    echo 'dbus_enable=”YES”' >> /etc/rc.conf
    echo 'hald_enable=”YES”' >> /etc/rc.conf
    service dbus start
    service hald start
    
  • Install the lxde-meta package:
    pkg install lxde-meta
    
  • Install the virtualbox-ose-additions package:
    pkg install virtualbox-ose-additions
    
  • Start and enable vboxguest and vboxservice at boot:
    echo 'vboxguest_enable="YES"' >> /etc/rc.conf
    echo 'vboxservice_enable="YES"' >> /etc/rc.conf
    service vboxguest start
    service vboxservice start
    
  • Log out of root:
    exit
    
  • Create a xorg configuration file:
    sudo X -configure
    sudo mv /root/xorg.conf.new /usr/local/etc/X11/xorg.conf
    
  • Create a backup xorg.conf file and edit the existing xorg.conf file:
    sudo cp /usr/local/etc/X11/xorg.conf /usr/local/etc/X11/xorg.conf.bak
    sudo vi /usr/local/etc/X11/xorg.conf
    
    • And make sure the Device and InputDevice sections are correct:
      Section "Device" 
              ### Available Driver options are:-
              ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
              ### <string>: "String", <freq>: "<f> Hz/kHz/MHz" 
              ### [arg]: arg optional
              Identifier "Card0" 
              Driver "vboxvideo" 
              VendorName "InnoTek Systemberatung GmbH" 
              BoardName "VirtualBox Graphics Adapter" 
              BusID "PCI:0:2:0" 
      EndSection
      
      Section "InputDevice" 
              Identifier "Mouse0" 
              Driver "vboxmouse" 
      EndSection
      
  • Create the .xinitrc file:
    echo '#!/bin/sh' >> ~/.xinitrc
    echo 'exec startlxde' >> ~/.xinitrc
    
  • And make the .xinitrc file executable:
    chmod +x ~/.xinitrc
    
  • Now start LXDE:
    startx
    

Resources

History

#1 Updated by Daniel Curtis about 5 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

#2 Updated by Daniel Curtis almost 5 years ago

  • Category set to Virtualization
  • Status changed from In Progress to Resolved
  • % Done changed from 50 to 100

#3 Updated by Daniel Curtis almost 5 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF