BeagleBone Black running a lightweight desktop (LXDE) is almost necessary when developing and compiling application natively on the BeagleBone Black, especial vision related applications requiring visualization. In this blog post I will describe the steps to install Ubuntu 14.04 on BeagleBone Black with LXDE (lubuntu-desktop) as the desktop.
First, follow this link for instructions on how to format the SDcard and load the boot loader and rootfs onto the SDcard.
Next, boot the image on BeagleBone Black directly off the SDcard. Login and and perform the following steps:
$ sudo apt-get update $ sudo apt-get upgrade $ sudo apt-get install lubuntu-desktop
It will take close to 30 minutes before the installation completes. After the installation, create the file /etc/X11/xorg.conf
with the following contents:
Section "Monitor" Identifier "Builtin Default Monitor" EndSection Section "Device" Identifier "Builtin Default fbdev Device 0" Driver "fbdev" # Driver "modesetting" EndSection Section "Screen" Identifier "Builtin Default fbdev Screen 0" Device "Builtin Default fbdev Device 0" Monitor "Builtin Default Monitor" DefaultDepth 16 #Chipsee lcd7 bbb-exp-c: # DefaultDepth 24 EndSection Section "ServerLayout" Identifier "Builtin Default Layout" Screen "Builtin Default fbdev Screen 0" EndSection
Now reboot the BeagleBone Black, and you should see something like the picture shown at the top of this post. Connect a USB keyboard and a USB mouse to the BeagleBone Black, login into LXDE. Immediately turn off Light Locker under the Preference→Light Locker Settings. This is needed to prevent a screen lock bug from keeping you locked out of the desktop.
It is highly advised that one create a swap file to enable memory swap. This is often necessary for memory-intensive applications to run properly, including building a large software package and video/imaging applications.
To add a 2 GB swap file,do the following:
sudo mkdir -p /var/cache/swap/ sudo dd if=/dev/zero of=/var/cache/swap/swapfile bs=1M count=2048 sudo chmod 0600 /var/cache/swap/swapfile sudo mkswap /var/cache/swap/swapfile sudo swapon /var/cache/swap/swapfile
and add the below line to /etc/fstab
:
/var/cache/swap/swapfile none swap sw 0 0
Now enter the command top
to see if the swap memory is no longer showing zeroes.