# Some tips on compiling NeoOffice 3.2.1 Intel for Mac OSX

Posted: June 19th, 2012 | Author: | Filed under: Mac, NeoOffice, Virtual Box | Tags: , , , | No Comments »

If you are following the NeoOffice’s build instructions.. Here are a few extra tips:

1. Use 10.5 and old XCode 3.14. Yes, it will only generate 32bit binary.
2. Replace “My_Untested_Office_Suite” and “My Untested Office Suite” strings in neojava/makefile.
3. Make sure your networking is in Bridged mode.. instead of NAT. NAT will break cURL which the makefile needs for to grab Mozilla source.
5. Subversion is part of Macports now so you don’t need to install it separately (vs what they say).
6. The Makefile is very long (about 20 hours on my i series imac to complete its run). If something stops and get stuck. eg for me, adiumapplescriptrunner kept dying when it was compiling language packs (it just freezes), just kill the process under Activity Monitor. Then the makefile itself will continue on. You will need to pay attention as you might be asked to authenticate sudo via CLI.

Once everything has been setup. It is a rather simple compile, so enjoy! You final product will be called rather unimaginatively My_Untested_Office_Suite-3.2.1-intel.dmg and can be found underneath the $neojava/install directory. # Creating a Debian VirtualBox VM Posted: January 7th, 2011 | Author: | Filed under: Debian, Mac, Virtual Box | Tags: , , , , , , , , | No Comments » In the past, I used to use Parallels 5 for my VM needs (and I still do). Recently I have found out that in order to install the Parallel Guest Tools on the latest Ubuntu (10.10); I have to upgrade Parallels from version 5 to 6. Since Ubuntu updates every 6 month, it means that there is a good chance that I have to update Parallels every year on order for the latest version of Ubuntu to work. I have decided to check out VirtualBox and see how well it works with my Development environment. To create a basic Debian VirtualBox image: 1. Grab the latest netinst image 2. For typical development use, I don’t think one will use more than 8GB of disc space. 3. Use the Guided hard disc setup and use the whole drive 4. Deselect everything else and only install Standard System 5. Install GRUB to your bootloader 6. Go through the system setup and reboot 7. Install OpenSSH server by apt-get install openssh-server 8. Run apt-get upgrade 9. Run apt-get update 10. Do a ACPI Shutdown via the Machine menu or run shutdown now 11. Edit the VM’s Settings via the Oracle VM VirtualBox Manager I typically set: • Hardware clock in UTC time. This is to make sure that clocks are in sync so things like ssh won’t misbehave. • Disable Audio • Change Network -> Adapter 1 -> Attached to: Bridged Networking • Disable the Ports (both serial and USB) • Leave Shared Folders option unset, I just use SSH for everything. 12. Reboot, Login 13. Run ifconfig, the ip address will now be in your home network’s subnet (for me it is 192.168.123.0). So you can ssh into the machine via ssh username@ipaddress 14. Shutdown again and select Export Appliance under File in the VirtualBox Manager. Now, whenever you need a debian vm, you just have to import the appliance. At this stage. I also highly recommend you take a snapshot of the image before you do any tinkering. 15. Start the machine again, if you want to give the vm a static IP run nano /etc/network/interfaces Replace  12 allow-hotplug eth0 iface eth0 inet dhcp with (IP Address and Gateway adjusted to taste)  123456 iface eth0 inet static address 192.168.1.10 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 Run /etc/init.d/networking restart 16. Next time, you can start the Virtual Machine via commandline by using VBoxHeadless -startvm “machinename” # Receipe for Compiling and Installing FreeRADIUS 2.1 on Debian 5 from source Posted: January 6th, 2011 | Author: | Filed under: Debian, freeRADIUS, Virtual Box | Tags: , , , , , , , , , , , | No Comments » With the advent of virtualization, I prefer to have virtual machines that perform one and only function. So instead of having one server that would be my RADIUS, file server etc. I rather have several virtual machines each performing one task. To setup a FreeRADIUS server from source on a Debian server: First install Debian: 1. Grab the latest netinst CD from debian.org. 2. Install the base installation (I think 3GB of disc space will be more than enough). 3. Run apt-get update and apt-get upgrade to make sure you have the latest version. 4. Edit the network configuration which is located /etc/network/interfaces 5. Install sudo 6. Install openssh-server, so that you can ssh into the machine remotely. 7. Save and Shutdown the VM. 8. Replicate the VM via your virtualization software. We will use one copy to compile from source, and the other one to install. Second, configure, compile and create the Debian packages. Since we are using this as a one off compile machine, we will compile as root. 1. Grab the latest stable FreeRADIUS source code from the website 2. apt-get install bunzip2 3. apt-get install fakeroot 4. apt-get install dpkg-dev (this will get all of the development environment) 5. apt-get build-dep freeradius (this will grab all the libraries required for compile). Unlike the official instructions libssl-dev is automatically downloaded. 6. apt-get install quilt 7. run ./configure in the source directory 8. run make to compile 9. fakeroot dpkg-buildpackage -b -uc Now you should have the following one directory up. freeradius_2.1.10+git_amd64.changes freeradius_2.1.10+git_amd64.deb freeradius-common_2.1.10+git_all.deb freeradius-dbg_2.1.10+git_amd64.deb freeradius-dialupadmin_2.1.10+git_all.deb freeradius-iodbc_2.1.10+git_amd64.deb freeradius-krb5_2.1.10+git_amd64.deb freeradius-ldap_2.1.10+git_amd64.deb freeradius-mysql_2.1.10+git_amd64.deb freeradius-postgresql_2.1.10+git_amd64.deb freeradius-server-2.1.10 freeradius-server-2.1.10.tar freeradius-utils_2.1.10+git_amd64.deb libfreeradius2_2.1.10+git_amd64.deb libfreeradius-dev_2.1.10+git_amd64.deb Third, install and configure your FreeRADIUS machine. 1. Transfer the FreeRADIUS *.deb files from the compiling machine to the deployment machine. 2. You can shutdown and delete the compiling virtual machine now. 3. Create a directory for the Certificate Authority (I use /ca) 4. Copy the the files: xpextensions, client.cnf, server.cnf, ca.cnf and bootstrap from the raddb/certs directory to the /ca directory 5. Install Openssl by issue the following command apt-get install openssl openssl-blacklist ssl-cert libltdl3 libperl5.10 6. Edit the *.cnf files and create the required certificates 7. Note the path of the server certificate and keys, also the location of the ca certificate 8. Run openssl dhparam -out dh 2048 in the ca directory (note the path) 9. Also run dd if=/dev/urandom of=random count=2 10. Install mysql (optional, or any database backend) by using this command: apt-get install mysql-server, libmysqlclient15-dev 11. Install libpcap0.8 (optional) 12. Install the deb files in the following order via dpkg -i package.deb command: 13. libfreeradius2_2.1.10+git_amd64.deb libfreeradius-dev_2.1.10+git_amd64.deb freeradius-common_2.1.10+git_all.deb freeradius_2.1.10+git_amd64.deb freeradius-mysql_2.1.10+git_amd64.deb (or postgres version) freeradius-utils_2.1.10+git_amd64.deb freeradius-dbg_2.1.10+git_amd64.deb 14. Edit the eap.conf file in the /etc/freeradius directory and put in the variables gained from Step 7. 15. Create a freerad user and freerad group 16. Add this 2 commands in the /etc/init.d/freeradius file: mkdir -p /tmp/radiusd chown freerad:freerad /tmp/radiusd Somewhere before the statement test -f$PROGRAM || exit 0 should be fine (mine is around line 23). This is for the option to verify the client certificate, the option to do that is located in eap.conf.

17. Add an entry into the clients.conf which indicate the IP of your AP where TLS requests will be coming from, the ipaddr variable is the ip address of your AP. The secret has to be the same as the secret set on the AP. The secret is completely unrelated to anything else, so you can have a random phrase. It is between the AP and the FreeRADIUS server. It is not required anywhere else.
client wifi {
secret = mysecretisnosecret
nastype = other
}
18. Setup mysql (ie set root password etc), then run admin.sql, nas.sql, ippool.sql, schema,sql and cui.sql in the /etc/freeradius/sql/mysql
21. Do your clean up ie create ssh keys for remote logins etc.

Testing:

2. Run radius server in debug mode: freeradius -X (note captialised X)
It should return something simliar to this:

Sending Access-Request of id 28 to 127.0.0.1 port 1812
NAS-Port = 1812
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=28, length=26

4. If the FreeRADIUS server is not receiving your request from your AP. eg You initiated 802.1X authentication but the AP reports the server is not responding AND there is no activity shown on the screen of freeradius -X. Reset the AP!

# Ubuntu 10.10 Guest in VirtualBox Shared Folders Issues.

Posted: November 29th, 2010 | Author: | Filed under: Ubuntu, Virtual Box | Tags: , , , , , , , , , , , , | No Comments »

I have recently installed Ubuntu 10.10 as a VM to check out the Android SDK. After the basic install, I find the Shared Folder feature doesn’t work, even though I have installed the Guest Additions. I keep get the following error: /sbin/mount.vboxsf: mounting failed with the error: No such Device

I checked and under /sys/modules/ there is no vboxsf module, so obviously something in the VBoxLinuxAdditions-amd64.run script is not working.

After digging around I was told the simple way is to install the Guest Additions OSE version from apt-get. However since I am using the Closed Source edition (differences between versions can be found here). I thought there must be a better solution.

What happened is VBoxLinuxAdditions-amd64.run doesn’t do a sanity check for the existence of 3 components that Ubuntu needs to compile the modules, namely dkms, build-essential and linux-headers-generic. It requires a different set of packages for other Linux distributions. To solve the problem, run sudo apt-get install dkms build-essential linux-headers-generic. Then run VBoxLinuxAdditions-amd64.run, the modules will be compiled. Do a reboot to make sure the modules are loaded.

Once reboot, when you do lsmod | grep vbox. You should have something like this:

 1234 vboxvideo               1956  2 drm                   206161  3 vboxvideo vboxsf                 34612  0 vboxguest             176030  9 vboxsf

To mount the folder (example):

1. Create the Shared Folder on the Guest Window toolbar. For me I created a Folder Name with the name vb.
2. In Ubuntu create the directory /mnt/vb
3. Then run sudo mount -t vboxsf vb /mnt/tmp

Remember the files will not have the user’s ownership, so it is a good idea to cp the files into another folder, then do a chown user * to correct the ownership. The files will belong to root and root ownership group.

# Upgrading VirtualBox 3.1 -> 3.2 on Ubuntu 10.04

Posted: July 19th, 2010 | Author: | Filed under: Ubuntu, Virtual Box | Tags: , , , , , | No Comments »

Assume: you have VirtualBox (OSE / non OSE) 3.1 installed. You also have sudo rights.
Note: OSE version doesn’t have RDP support, non OSE has RDP support.
VirtualBox files are usually stored in: /home/username/.VirtualBox/ directory with HardDisks and Machines sub directories. (A backup is always a good idea before an upgrade!)

1. Shut down your existing VMs. I find if you are using VBoxHeadless, the process might not end after the VM has been shutdown.
2. Quit VirtualBox GUI (if running); kill all VBoxHeadless processes.
3. Use dpkg -remove packagename or Synaptic Package Manager to remove your exisiting installation. (Synaptic is probably easiest since you don’t need to look up the package name). Even if you remove the package your existing VMs will still be around, but it never hurt to do a backup before hand!
4. Locate your VirtualBox 3.2 .deb package.
5. Install via dpkg -i debfilelocation
6. VirtualBox Guest Additions are located in /usr/share/virtualbox. You have to manually mount the Additions in the virtual machines. I find it the quickest to edit the setting via the VirtualBox GUI
8. Stop the VMs and launch them via VBoxHeadless if so desired.

# Configuring VirtualBox for useful Windows Guests.

Posted: May 20th, 2010 | Author: | Filed under: Virtual Box | Tags: , , , , , | No Comments »

I find VirtualBox 3.1 is quite mature and usable for everyday. Granted, I only use my Windows sessions via RDP and all of them are in 2D applications. VirtualBox has graphics acceleration, build in RDP viewer (even for pre XP computers). The only thing that is really missing is the clone functionality, but hey it is free and I am sure someone is working on it!

Here are a few tips to make things more useful (especially for people who are remote accessing the Guest OSes).

1. Set default GUI resolution of Guest OS to any:
This way you can RDP into the virtual machine at any resolution you like.
Run the follow command in Terminal:

 1 VBoxManage setextradata global GUI/MaxGuestResolution any
2. You only need to enable RDP on pre XP Windows or non Windows Guest:
Remember the IP address you have to RDP into is the host machine (in my case the Ubuntu machine). Also each VM Guest has to have a unique Server Port.
3. If you want GuestOS to be accessible on the network remember to set it to bridged mode.
4. If you feel the Windows GuestOS network performance is too slow.
Try the virtio drivers.
However chances are you might need to reactivate the Windows Genuine Advantage, if you are changing it once the GuestOS has been setup. YMMV.
5. Get to know the VBoxHeadless command.
Typically it is