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!



No comments :

Post a Comment

Please be responsible with comments. Any comments made on posts over 14 days will be moderated before appearing on the site.