My network hints for setting up VirtualBox on Mac Host with Linux Guests

Virtualbox is one of my favourite OpenSource project, and I am actively following it’s rapid development, headed by Sun/Oracle.
You can use it very easily, and there are tons of howto out of here on how to setup, configure and run your favorite operating system inside another.

The default settings put on your virtual machine a single NAT device, which is good if you only need to reach Internet inside the VM, but it became pretty unusable if you need to access to the VM from an external machine. Here came in help the bridged networking mode, so your VM will get an IP address directly from the DHCP of your current network (both wired or wireless), so you can connect to the VM from everywhere, as you can with the host machine. This is the most flexible environment.
If you want to stay more secure (and probably gain some transfer speed), you can use the host only network: it’s a network managed with dhcp by virtualbox, and it’s only accessible from your host machine (it has a dedicated virtual interface).

Sharing files with the host machine:

  • If you need to access to your music collection inside the VM, the best way is to activate the file sharing function of your mac inside System Preferences, and after mount it inside the VM using both command line:
    mount -t cifs -o username=yourusername,password=yourpassword,uid=1000,gid=1000 //name.of.the.host.machine/yourusername /mnt/here
  • If you need to export a directory from the VM to the host (for me, it’s the /var/www, so I don’t need to ftp/rsync files when doing web-development), the fastest way is to setup a nfs server and mount it on mac. Apt-get nfs-kernel-server and edit /etc/exports with:
    /home/scorp 192.168.56.1(rw,async,no_subtree_check,insecure,all_squash,anonuid=1000,anongid=1000)

Comments (1)

The essential OpenSource Software for your Mac

How many of you will never buy a mac for it’s price and for the prices of his dedicated software?
Nowadays the history is changed, there is a lot of OpenSource Software ready for you and for your Mac (and Linux, and Windows..)
Here is a list with a description of all the software I currently use on my laptop.

  • Adium: one of the best piece of software for mac. If you want to chat with friends and collegues, you can’t not use it
  • AppCleaner: a problem of Mac is the absence of some sort of uninstaller for application. You simply put the application in the trash, but the user settings remains in your home. With AppCleaner you can remove them automatically.
  • AppFresh: useful for keeping an eye on the update state of your installed application
  • Burn: on Mac you can simply use Finder for burning files, but sometimes you need something more refined. Burn, it says everything.
  • CyberDuck: the ftp/ftps/scp/s3 uber client. You need it, I know.
  • DropBox: it’s a commercial cloud storage service, but it has a free account with 2 Gb of free spaces for your documents. It’s very good for sharing files with friends, to keep backup copies of your important documents and to keep in sync documents on different worktstation
  • FireFox: probably you are already using it
  • Gimp: I don’t have many pretending for a photo editor, so GIMP will fit perfectly for me
  • iBackup: frequently TimeMachine is enought for many people, but not for all. If you need something more powerful and refined than TimeMachine, go with iBackup
  • Nocturne: if you often work on dark light, you probably you find this little tool very useful. It will reduce notably the illumination effect of your monitor, even when you have the brightness level to minimun
  • OpenOffice: Office replace, it works, don’t blame us with “My Word doesn’t bla bla bla”
  • Smultron: it’s a text editor, there are so many out, pick up your preferred (or leave yours in the comments)
  • Thunderbird: I don’t use very much desktop user agent for mail, Gmail do it better, but I you need, here you are
  • TimeTracker: time is money, keep track of it! Very useful when working on different project at the same time
  • Transmission: if you are a torrent user, you will certainly like transmission. It has a nice web interfaces, so you can manage you download even when you are out of home
  • VirtualBox: it’s a virtualization solution I prefer. I will discuss deeply of it in a new article.

Comments (1)

The perfect working environment with OpenSource Software on a Macbook

I am writing this article for sharing my actual setup on my recently bought MacBook Pro Unibody.

After some week, I managed how to make a third-boot system with rEFIt, having MacOS, Windows (I like enjoying some videogame, the last was Fallout 3), and Debian GNU/Linux.
I wasn’t very satisfied with this choice, because i wasted a lot of my 300 GB hd, and the hardware support in Linux wasn’t has in MacOS:
- Soundcard not supported by alsa [bug: #4432]
- The nvidia proprietary driver fails to detect the integrated 9400 chip, so I was forced to use the 9600GT, which is a waste of battery lifetime when I am not gaming
- The only good way to share documents between OS is thru a HFS+ paritition with journaling disabled.

So I preferred to try out MacOS as my first operating system for dealing out with browsing, mailing, chatting and listening to music.
For the working aspect, I can’t find something good and flexible like a Debian GNU/Linux system: so I installed VirtualBox and installed linux on it.

Now I split my experience in two separated articles:

Leave a Comment

iStat Menu Snow Leopard compatible!

iStat Menu 2.0 for Snow Leopard finally cames out of beta.
Download here!

Leave a Comment

Let Doctrine use APC User Cache in Symfony 1.2

Simply drop a new function of some lines inside ProjectConfiguration.class.php

  public function configureDoctrine(Doctrine_Manager $manager)
  {
    if (ini_get("apc.enabled")==1)
      if (sfApplicationConfiguration::getEnvironment() != "dev")
        $manager->setAttribute(Doctrine::ATTR_QUERY_CACHE, new Doctrine_Cache_Apc());
      else apc_clear_cache("user");
  }

Every result will be cached inside the apc user cache, so the load on database will be reduced.

Leave a Comment

Dropbox Debian – Backup, Sync, Share your files!

As described on his site:

Once installed, any file you drop into your Dropbox folder will synchronize and be available on any other computer you’ve installed Dropbox on, as well as from the web. Also, any changes you make to files in your Dropbox will sync to your other computers, instantly.

NB: this is not FREE software. Dropbox give you a free client (GPL2), but you should use their server for hosting your files. They also give a free 2 Gb account (others plan here).

Unfortunately, only .deb for ubuntu were available. I made you a package for Debian Lenny.

And, of course, the .deb package is hosted on Dropbox =P
http://files.getdropbox.com/u/630394/nautilus-dropbox_0.6.1_i386.deb

Additional link: how to setup a command line client for dropbox

Comments (1)