Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

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


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!