Archive for December, 2007

Bridge network interface on VirtualBox in Fedora 8

These instructions are for using a virtual machine in VirtualBox using a bridged network connection instead of a NAT connection. This makes the virtual machine behave more like a regular machine on your network, using its own IP from your network, etc. These instructions assume static ip addresses. These changes will remain in place after the machine is rebooted.

1. If you don’t have VirtualBox installed yet, install it. You can download it here, the Fedora 7 RPM installed correctly for me on Fedora 8. I downloaded it, then installed it with this command:
$ su -
# yum --nogpgcheck install VirtualBox-1.5.2_25433_fedora7-1

2. Install the bridge-utils package from Yum:
$ su -
# yum install bridge-utils

3. Create a configuration file for the bridge (br0):
# gedit /etc/sysconfig/network-scripts/ifcfg-br0

Enter the following in this file and save it:
DEVICE=br0
TYPE=Bridge
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.100.2 #enter the IP you use for the host machine here
NETMASK=255.255.255.0 #enter the correct subnet mask for your network
GATEWAY=192.168.100.1 #enter the correct default gateway for your network
DELAY=0
STP=off

4. Add your NIC card (eth0 for me) to the bridge:
# gedit /etc/sysconfig/network-scripts/ifcfg-eth0

Add this to the end of the file and save it:
# BRIDGE=br0

Adding this line results in the eth0 interface being added to the br0 bridge whenever the host machine boots.

5. As root, create a permanent virtual interface for the virtual machine to use and add it to the bridge:
# VBoxAddIF vbox0 YOURUSERNAME br0

Replace YOURUSERNAME with your username that you log into Linux as.

6. Restart the network and vboxnet services:
# service network restart
# service vboxnet restart

7. In your virtual machine settings in Virtual Box, in the Network section, choose ‘Host Interface’. The Interface Name is vbox0.

8. If you are using Windows XP in your virtual machine, boot into it, go into the TCP/IP settings, and specify the IP address, Default Gateway, and DNS servers as if you are adding a normal client to your network.

You should now be able to access your WIndows XP virtual machine as if it were a normal machine on your network. Note that you may have to disable or modify the Windows XP firewall for some network activities.

Add Livna Repository to Fedora 8

rpm.livna.org is a repository of add-on packages for Fedora maintained by a group of volunteers. rpm.livna.org is not a standalone repository, but an extension of Fedora (previously Fedora Core and Fedora Extras). rpm.livna.org distributes packages that have been deemed unacceptable to Fedora due to licensing or patent issues.

Here is how I add the Livna repository to Fedora 8:

Go to http://rpm.livna.org/rlowiki/ and download the Fedora 8 Repository RPM.

Use Yum to install the RPM (as root):
$ su
Password:
# yum --nogpgcheck install livna-release-8.rpm

If you want to avoid the GPG warning whenever you install something from the livna repository, you can import their GPG key. Go here to access their public key, save the contents of this page to a file (e.g. livna.asc).

Import the key.
$ gpg --import livna.asc

Control which app Firefox uses to handle MMS streams

Here is how to control which application Firefox uses to handle MMS streams:

Type about:config Firefox address bar.

Right-click on any text in there and select “New” and then “String”.

In the first dialog box, as preference name, type network.protocol-handler.app.mms.

In the second dialog box, as string value, type in vlc (or the path to your favorite media player)

Command to mount ISO file in Linux

Here is the command to use to mount an ISO file in Linux so that you can explore the file as if it were mounted on a CD-Rom or DVD-Rom, without having to burn to a disc:

sudo mount -t iso9660 -o loop filename.iso /folder/to/mount/to

This functionality is similar to Daemon Tools or Alcohol on Microsoft Windows.

Make F-Spot the default application for your digital camera

Here’s how to make F-Spot your default application for importing photos from your digital camera in Ubuntu Gutsy 7.10:

System -> Preferences -> Removable Drives and Media. Click the ‘Cameras’ tab. Check the box next to ‘Import digital photographs when connected’. Enter the following for ‘Command:’:

f-spot-import %h

Now when you plug a digital camera into the computer, F-Spot will open and prompt you to import your pictures.