Linux hints and tips
Install VirtualBox additions
VirtualBox is a free open source virtualisation program that enables you to run an operating system within a window on the desktop. It's very useful for testing different versions of Linux without having to actually install them on the computer. You can run Linux within Windows, Mac OS X, and even another Linux distro within a window on your Linux desktop.
It was originally developed by Innotek GmbH, then Sun, and now Oracle. You can find Oracle VM VirtualBox at the corporate website. If you follow the links to the download page you'll see links to get VirtualBox and VirtualBox Open Source Edition.
Assuming you've got VirtualBox and have installed Linux in it, you'll want to install the VirtualBox additions. One thing these do is to enable the mouse to pass from the guest operating system, such as Linux running in a window, to the host operating system, the one that's installed on your computer. Without the VirtualBox extensions the mouse is trapped inside the guest OS window and you have to press a hotkey (right Control on PCs, left Apple key on Macs), to switch to the host OS.
Another thing the VirtualBox additions do is to enable you to resize the guest OS window. You can drag the corners or sides like a regular window to change the guest OS desktop size. You can also switch to full screen mode (use the menu or press the hotkey and F). You'll then be using the guest OS, any Linux distro you like, for exmaple, as if it was the real thing installed on your computer.
You can also access a shared folder on the host OS from within the guest OS and this is useful for passing files from one to the other.
Installing the VirtualBox additions is easy with some Linux distros, but not all of them and you could run into problems. Ubuntu is a piece of cake, and distros based on Ubuntu are generally easy too. Here's what you do:
Solve VirtualBox additions installation problems
For various reasons, the instructions above don't always work, but there are usually solutions to the problem. For example, instead of typing
You may find that
If you manage to locate the VirtualBox additions CD that's mounted and run the file, sometimes you'll get an error message about a missing GNU C compiler. Some Linux distros include the compiler by default, but some don't and if it's not installed you'll have to install it. Run Add-Remove Programs or the Synaptic Package Manager or whatever the program is called that enables you to install software and find the GNC C compiler (a search for gcc might do the trick). Fedora calls them Various Compilers (C, C++, Objective C, Java...). Select it and also select C++ support for GCC if it's listed too. You can then return to the Terminal window and try the
This sometimes still fails with a message that you need to install the build and header files for your current Linux kernal. OK, back to the Add-Remove Programs or the Synaptic Package Manager and search for headers. Specifically, ones for Linux rather than special ones for specific software packages. They may be called something like libc6-dev (GNU C Library: Development Libraries and Header Files), Linux-headers-generic (GNU C Library: Development Libraries and Header Files), Linux-headers-2.6.28 (Header files related to Linux kernel version 2.6.28). Install them and then try the
There are many Linux distros and some are quite similar, but others aren't. Hopefully, there is enough info here to get the VirtualBox extensions installed. However, sometimes no amount of fiddling with the commands and installed files will get them running and you could never guess how to do it. After some searching on the web, this is what you need to do to get VirtualBox additions working in Debian: