Thursday, 4 April 2013

Nested X Sessions

Nested X Sessions in a 'chroot' allow you to run multiple desktops and (almost) virtual machines on a single host. Before using this article you will need a basic idea of what a chroot is and you should have set one up in preparation.

The chroot used in this article is based on Ubuntu 12.10 with 'ubuntu-desktop' and 'metacity' installed

The host name of the host in this article is matthew-desktop (change this to the host name of your pre-existing Ubuntu 12.10 install.

Setting up the X Server

  1. In the chroot type: export DISPLAY=matthew-desktop:2 (this will tell all applications to use a different x server for displaying their GUI.
  2. In the host, install (using apt-get) Xephyr and xhost. Xephyr will act as the viewer for the nested  X Session, alternatively xnest can be used.
  3. In the host, type: xhost + (this allows connections to the host from external machines).
  4. In the host, Start Xephyr using the command Xephyr -ac -br -noreset -screen 1024x768 :2 (this should open an empty window.
  5. In the chroot, type gnome-session
  6. The Unity desktop should appear after a few seconds!



Wednesday, 27 March 2013

Pre DNS Tutorial


I've finally got my 'temporary' DNS server working. I'll be adding a tutorial soon for Ubuntu 12.10.

; <<>> DiG 9.8.1-P1 <<>> www.house.bargrove.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- 31572="" id:="" noerror="" opcode:="" p="" query="" status:="">;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.house.bargrove.com. IN A

;; ANSWER SECTION:
www.house.bargrove.com. 20324 IN A 192.168.1.10

;; Query time: 24 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Wed Mar 27 22:34:04 2013
;; MSG SIZE  rcvd: 56


Friday, 22 March 2013

A new addition

As per popular demand, the French language has been added to the cool stuff page!

Friday, 15 March 2013

IPv6 Tunnelling

With the recent Boom with IPv6 popularity, I thought that I would help support those valiant DNS providers and ISP's who are now running Teredo Tunnelling. Teredo Tunnelling is a method of transmitting IPv6 data over IPv4, this means that you can officially (and proudly) say that you are IPv6 compatible (take a look at the bottom of this site). If you're adventurous, you might want to try 6to4 tunnelling (an alternative to Teredo).

If you are interested, please visit:;
http://www.tunnelbroker.net (run by Hurricane Electric, tested) or
http://www.xs26.net (untested, but reasonably popular)

If you are using http://www.tunnelbroker.net, please follow the instructions below:
  1. Create an account using the registration form
  2. Login to http://www.tunnelbroker.net using the username you entered earlier and the password provided
  3. Click on 'Create regular tunnel' in the 'User Functions' sidebar
  4. Enter your IPv4 static IP*, shown below the box
  5. Chose your nearest server (at the time of writing, London is full, I would recommend the use of Amsterdam).
  6. On the new page that opens after clicking 'Create Tunnel,' Select Example configuations and chose your OS (if you are using windows, enter the commands in 'Command Prompt': cmd.exe or if you are using Linux enter the commands in a terminal session).
  7. That's it, you're IPv6 ready!
* You can use a Dynamic IP (the settings can be found in the 'Advanced' tab of the configuration page)

Wednesday, 6 March 2013

Ubuntu LXC


Containers have been around from a while now and they can be used in so many different applications. Containers are like virtual machines, however they use the kernel of the machine they run on. This causes problems as many people have found ways of breaking out the virtual machine and into the host (see here). Containers are far less 'resource-hogging' and, I believe, they are far more dynamic. Recently, I have come a cross a container system called 'LXC'. LXC is pretty idiot-proof, however a simple tutorial could become handy)

Setting up LXC on a Ubuntu Machine

  1. Open a terminal session (CTRL-ALT-t) and type in:
    sudo apt-get install -y lxc lxctl
  2. After the install finishes, type:
    sudo lxc-create -n testmachine -t ubuntu
  3. The next job is to start the machine. In the terminal, type:
    sudo lxc-start -n testmachine After a few seconds the machine should boot and a serial console will appear. It will ask for a username and password (the default username for the ubuntu image is 'ubuntu' and the password is also 'ubuntu').
  4. You should now have a running container!