/kb

personal knowledgebase

Notes on setting up Arch Linux in VirtualBox with Awesome wm

with 8 comments

For several reasons I wanted to have a GNU/Linux system with root access available. In a bright moment I suddenly realized that the simplest way of achieving this was to have a virtual installation on my Macbook.

I chose VirtualBox from Sun as virtualization environment as this is free software (GPL) and Arch Linux as the distribution because I’ve quite some experience with this distribution and it’s easy to create rather minimalistic installs with it.

This walkthrough does not explain how to install Arch Linux in Virtual Box, as this can be considered trivial. The focus is on setting up Arch Linux with the awesome window manager, correct screen resolution and getting access to shared directories in Mac OS.

After installing Arch Linux the first step is to install Xorg and Awesome together with the hwd tool which is used for configuration of Xorg.

pacman -Syu
pacman -S xorg awesome hwd

Then the VirtualBox Guest Additions must be installed in order to be able to set the correct screen resolution for Xorg. In the VirtualBox menu go to DevicesInstall Guest Additions

Perform the following commands as root/sudo:

mount /media/cdrom
bash /media/cdrom/VBoxLinuxAdditions.run

Add 98vboxadd-xclient to .xinitrc for your user and add modules to rc.conf according to Arch Linux Wiki VirtualBox Guide. Then reboot the Arch virtual machine.

In order to configure Xorg an xorg.conf file must be created:

hwd -xa

Edit xorg.conf and set the video driver to vboxvideo and add the resolution 1280×800 to the 16 color depth and remove the other resolutions. Remove all other color depths subsections.

If you want to start Xorg and Awesome and automatically log in at boot, follow the description in the Arch Wiki – Start X at boot and add exec awesome to .xinitrc.

File sharing is easy to set up. First set up the desired folder for sharing by going to DevicesShared Folders in the VirtualBox menu.

Create the folder where you want to mount the share in your Arch filesystem. This name must not be the same as the share name. Now you can mount the share with the following command (as root or sudo):

mount -t vboxsf NAME_OF_THE_SHARE /home/YOUR_USER/MOUNTPOINT

Theoretically related posts

  • No Related Post

Written by HÃ¥vard Grimelid

August 17th, 2008 at 8:54 pm

Posted in General

Tagged with , , ,

8 Responses to 'Notes on setting up Arch Linux in VirtualBox with Awesome wm'

Subscribe to comments with RSS or TrackBack to 'Notes on setting up Arch Linux in VirtualBox with Awesome wm'.

  1. Hi!

    I have tried everything you said, but I have two problems:

    1) There was nothing like 98vboxadd-xclient! So I removed it from .xinitrc. I am using VirtualBox 2.0.6 for that matter.

    2) Mouse and keyboard don’t work after I start X using “startx”

    Any idea?

    Anonymous bin Ich

    12 Dec 08 at 15:04

  2. Got it! Forgot to replace vesa and mouse with vboxvideo and vboxmouse repectively in xorg.conf…

    Anonymous bin Ich

    12 Dec 08 at 15:57

  3. Thank you!

    Nate

    17 Dec 08 at 09:02

  4. i have installed arch on virtualbox winxp host, but i can’t connect to internet. My Host setting is:

    IP address: 192.168.0.4
    Subnet mask: 255.255.255.224
    default gateway: 192.168.0.30

    can you help me?

    pitulloz

    26 Apr 09 at 06:37

  5. Hi pitulloz!

    You can get the internet working by editing /etc/rc.conf like this:

    eth0=”dhcp”
    INTERFACES=(eth0)
    ROUTES=(!gateway)

    Remeber to restart networking after changing the config:

    /etc/rc.d/network restart

    Hope that helps! :)

    Lauri Laine

    20 May 09 at 14:34

  6. Thank you. I have been trying to get xmonad on my VirtualBox for the last 5 hours and finally it worked. The key was to add: 98vboxadd-xclient to xinitrc.

    Ritesh Nadhani

    23 Aug 09 at 11:14

  7. Please tell us how fast your virtual arch/awesome machine is. I run it natively and I’m not going back to anything less minimalistic.

    Symen Timmermans

    25 May 10 at 00:57

  8. I haven’t done any testing on that. This was more of an experiment, so I’ve only used this setup for a couple of hours. Sorry.

    hgrimelid

    21 Jun 10 at 20:02

Leave a Reply