VirtualBoxHints

Helpful hints for using the pre-configured Lubuntu disk image

1. Open a terminal window

To open a terminal window, press Ctrl + Alt + T

2. User name, password, and sudo

  • The system contains one user, with user name uml-computing-iv. The password is sfml.
  • At start-up, the system will automatically log in.
  • The sudo command requires the password above.

3. Web browser

The pre-configured disk image includes Firefox.

4. Network

Open FireFox (it's in the lower-left Menu > Internet) and make sure you have connectivity (using your host computer's internet connection).

If not, change your network setting to “NAT”. Click on the icon that looks like a pair of computer screens on the bottom of the VirtualBox window (in the collection of icons toward the right).

5. Install Ubuntu packages

The pre-configured disk image contains only the basic software and development system. If you would like to use any of the other software that is a part of the standard Ubuntu 14.04 distribution, install it using the command:

sudo apt-get install <package_name>

For example, to install Code::Blocks IDE, use:

sudo apt-get install codeblocks

To install Eclipse IDE with C++ support, use:

sudo apt-get install eclipse-cdt

6. Install Host Additions for Ubuntu

The Host Additions is a package of drivers that makes your virtual machine work better. For example, it allows you to resize the virtual machine's window to any size, and it allows you to copy and paste between the host and guest operating systems.

To install, open a terminal window (Menu > Other > XTerm) and type:

 sudo apt-get install virtualbox-guest-additions-iso

This downloads an ISO disk image file.

When it finishes, let's mount the image. First locate it using the file browser. Click the icon immediately next to the Start Menu that looks like a folder, and then type this directory into its browser address:

 /usr/share/virtualbox

It should look like this:

Right click on the ISO file and select "Disk Image Mounter," and then choose Open in File Manager.

Now you should have a window that looks like this:

The last step is to run the installer from the terminal. From your terminal window, carry out this series of commands:

 cd /media/uml-computing-iv/VBOXADDITIONS_5.0.14_105127
 sudo ./VBoxLinuxAdditions.run

This will take a little while as it installs.

After it's done, restart your virtual machine (Start Menu > Logout > Reboot) and the features are installed. (Try resizing your Ubuntu window.)

7. Take screen shots and window captures

Install the scrot package:

sudo apt-get install scrot

After this, press:

PrtScn to capture the screen
Alt + PrtScn to capture the current window

The capture file in PNG format will immediately appear in your home directory.

8. Exchange files with host operating system

First, create a folder in your Windows machine that will be the share point. Here, we will call it compiv.

Next, go to Virtual Machine settings, and select Shared Folders on the left of the settings window (1).

Click the "Folder +" icon on the right of the window (2).

Fill out the Add Share dialog: set Folder Path to the Windows path to the folder share. Leave the folder name the same (e.g., compiv). Make sure to check Auto-mount.

Now, in the virtual machine, create a mount point and mount the shared folder:

cd (this navigates to your home directory)
sudo mkdir compiv
sudo mount -t vboxsf compiv compiv

At this point, your shared folder from Windows will be mounted in the Ubuntu directory. Files from Windows will be accessible from Ubuntu and vice-versa.

When you reboot the virtual machine, you will have to re-issue the mount command.