Installing NetBeans on Xubuntu 10.04

Installing NetBeans is simple in Ubuntu, but Xubuntu doesn’t seem to have the package in its repositories. The following will guide you through the install.

First thing needed is Java. You can install the openJDK or the sunJDK.

For openJDK

sudo apt-get install openjdk-7-jdk

For Sun JDK

sudo apt-get install sun-java6-jdk

Next we need to download the NetBeans installer. Navigate to NetBeans.org and download the version you require.

After the download has completed run the following to begin the install.

sudo sh ./netbeans-x.sh

Replace x with the version you have downloaded.

And that is it! You now have NetBeans installed.

VirtualBox Guest Additions install Kubuntu 10.04

Install VirtualBox’s guest additions are relativly stright forward in Ubuntu. But for Kubuntu 10.04 it’s takes a little more work.

Open the terminal and execute the following commands. First, check to make sure the system is up to date.

sudo apt-get update
sudo apt-get upgrade

Restart the system after these have been installed. Next we need to install and get a few things.

sudo apt-get install dkms
sudo apt-get install build-essential

Restart the system again.
Now we can install the guest additions. Devices -> Install Guest Additions… Virtual CD should mount automatically.

cd /media/VBoxLinuxAdditions_x
sudo ./VBoxLinuxAdditions.run

Install might take a little while to compile. After it has completed, restart the system. Guest additions have now been successfully installed.

Linux Mounting Partitions

Most Linux distribution include auto mounting for different file system types. Specific distributions, you need to mound some file systems your self. The following commands will allow you to mount different file system types.

To list all partitions attached to the system, use the following commands.

fdisk -l

First thing, create a mount point for this new file system.

mkdir /media/drive

You can create this folder anywhere on the system. Most distributions mount all drives to /media.

Mounting FAT or FAT32:

mount -t vfat /dev/sdb1 /media/drive/

Mounting NTFS:

mount -t ntfs-3g /dev/sdb1 /media/drive/

Un-mounting the drive:

umount /media/drive/

Backtrack 5 MAC Changing

I have been playing with backtrack5 lately and there was one little issue I was starting to get irritated by. When spoofing your MAC address you were required to run all these commands to take the interface down. First is to stop airmon-ng then to take the interface down. The following script is going to do the following:

Note: Before running this script run ifconfig and find the device name for your wifi card. In my case is is wlan0. If your’s is different then change wlan0 to you device name.

  1. Shut down airmon-ng
  2. Shut down interface
  3. Change the MAC to 00:11:22:33:44:55
  4. Start interface
  5. Start airmon-ng
After the script is complete it will print the new MAC.
#!/bin/bash
echo "Shutting down wlan0..."
airmon-ng stop wlan0 > /dev/null
ifconfig wlan0 down > /dev/null
maccchanger --mac 00:11:22:33:44:55 wlan0 > /dev/null
echo "Starting wlan0"
airmon-ng start wlan0 > /dev/null
string=`macchanger -s wlan0`
echo "Changed MAC to: ${string:13}"

If you have any problem, drop me a line at info@blakemiller.ca

Synergy with Ubuntu & Windows

Synergy let you share a single mouse and keyboard across multiple computers. In the following example, thewall is going to have our server and laptopnew is going to be our second computer. thewall, is to the right of laptopnew. thewall is also our linux box running Linux Mint (gnome). laptopnew is running Windows 7 x64.

First thing we need to do is install Synergy on our two machines. On the linux box run:

sudo aptitude install synergy

Next we need to install Synergy on our second computer. The version of Synergy in the Ubuntu repos is version 1.3 so we need to install that version. Click here for the download list.

Once you have it installed on both machines we need to create our configuration file. The following is an example of my configuration file.

gedit ~/.synergy

Configuration file:

section: screens
thewall:
laptopnew:
end

section: aliases
laptopnew:
192.168.1.24
end

section: links
thewall:
left = laptopnew
laptopnew:
right = thewall
end

section: options
screenSaverSync = false

end

For this to work correctly you must use the hostnames of both machines. Now we can open a terminal and run:

synergys

This will start the server; next we want to hit the start button on the client. You should now be able to move your mouse between the two computers! Synergy also allows you to copy and paste (text only) between the machines.

To get the synergy server to run on startup we can just add it to the gnome startup. Menu -> Preferences -> Start Up Applications.

The next time you reboot Synergy should start automatically. That concludes this tutorial, if you have any questions or comments please leave them below.