Linux System Administration

This article describes a simple steps to configure Wireless interface with WPA and WPA2 on Ubuntu and debian Linux. Before we can configure wireless network interface to be used with WPA and WPA2 encryption we need to install a wpasupplicant package:

# apt-get install wpasupplicant wireless-tools

Next change a permissions on /etc/network/interfaces to read/write by a root user only:

# chmod 0600 /etc/network/interfaces

Next use iwcofig command to get a name of your wireless interface:

# iwconfig

Open up /etc/network/interfaces file and add the following code to set wlan0 wireless interface to be used with DHCP:

auto wlan0
iface wlan0 inet dhcp
       wpa-ssid network-name
       wpa-psk pre-shared-key

In case you want to set your wireless interface with a static IP address add a following code into your /etc/network/interfaces file and alter it according to your needs:

auto wlan0
iface wlan0 inet static
       address 10.1.1.2
       netmask 255.0.0.0
       network 10.0.0.0
       broadcast 10.255.255.255
       gateway 10.1.1.1
       wpa-ssid network-name
       wpa-psk pre-shared-key

Restart your network and you should be done:

# /etc/init.d/networking restart

Before you continue reading this article make sure that you have VirtualBox Guest Additions installed within your guest operating system as this is a must prerequisite. VirtualBox Shared folders allows you to share data between your host operating system and virtual guest operating system.

In this article we are going use "Debian Linux as a host operation system" and "Ubuntu as a virtual guest system". This Article also assumes that you have your virtual guest operating system already installed.

Setup Shared folder

Before your start your guest operating system ( Ubuntu ) you need to change its settings. To be more exact we need to define share folder first.

Open the VM Settings and go to Shared Folders on your host operating system. Click on Add button and select a directory you wish to share with Ubuntu guest operating system.

Next you would need to define a name of this folder. The name will be used by a mount command later when mounting shared folder. In this example we use a following settings:

  • Name: share
  • Path: /home/lilo/temp

Define a VirtualBox Shared  Folder

Mount shared folder

Now that you have defined your shared folder start up your Ubuntu virtual guest system. Open a terminal and create a directory where you wish to mount your VirtualBox shared folder. If we want to for example mount VirtualBox shared folder into /media/share we need to first create this directory.

$ mkdir /home/myusername/share

Now that mount directory is ready we can mount VirtualBox shared folder.

$ sudo mount -t vboxsf share /home/myusername/share

NOTE: share is the name you have defined when creating a VirtualBox shared folder in previous step. Now simply navigate to your home directory and your /home/myusername/share folder and you should see your /home/lilo/temp data shared across.

Mount VirtualBox Shared Folder permanently

Once you restart your guest operating system to get access to your VirtualBox shared folder again you need to mount it again with the above command. To make this mount permanent add a following line into your /etc/fstab file:

share    /home/myusername/share    vboxsf    uid=1000,gid=1000  0     0

NOTE: uid=1000,gid=1000 will make an owner of all files within VirtualBox shared folder. Moreover you can use mount options for more settings such as read-only and so on.

Sikuli software helps a user to automate some many of the routine GUI task. It core it uses Java Runtime environment 6 and OpenCV ( Computer Vision library ) to recognize objects on the GUI desktop of acts upon instructions provided by a user to either click button or type text and etc.

This very short document describes how to install Sikuli on Ubuntu Lucid Lynx Linux system.

NOTE:

By saying installation we mean installation of Sikuli prerequisites, download of Sikuli and Sikuli execution. There is not need to install Sikuli as it can be directly executed from its source directory.

Installing Sikuli prerequisites

List of required Sikuli dependencies:

  • OpenCV 2.0
  • Sun Java Runtime Environment 6
  • control an EWMH/NetWM compatible X Window Manager ( wmctrl )

Ubuntu lucid Lynx had moved a Sun Java Runtime Environment 6 package away from a multiverse repository into proprietary repository "partner".

Therefore if you have not done so yet add partner repository to your apt sources list:

$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update

Now we can install all Sikuli dependencies in one go:

$ sudo apt-get install wmctrl libcv4 libhighgui4 libcvaux4 sun-java6-jre

Download Sikuli software

Now that all Sikuli dependencies are installed the next step is to download Sikuli software and unzip it to a directory of our choice.

$ wget http://launchpad.net/sikuli/trunk/0.10.2/+download/Sikuli-IDE-linux-i686-0.10.2.zip

NOTE: Please check http://groups.csail.mit.edu/uid/sikuli/ for a latest version of sikuli. Now unzip Sikuli with unzip command:

$ unzip Sikuli-IDE-linux-i686-0.10.2.zip

Start Sikuli

navigate to a unziped directory and execute sikuli-ide.sh script.

$ cd Sikuli-IDE/
$ ./sikuli-ide.sh

All done!

NOTE: No installation is required. You can start skikuli directly from its source directory.

Page 59 of 72



Free Linux eBooks

Go to top