#!/bin/bash# script to install freenx ppa and package# this script should be run as root with with "sudo"if [ `id -u` != "0" ]; then echo "Sorry, you are not root." exit 1fi# add the freenx ppa repository listecho -e 'deb http://ppa.launchpad.net/freenx-team/ppa/ubuntu jaunty main\ndeb-src http://ppa.launchpad.net/freenx-team/ppa/ubuntu jaunty main' >> /etc/apt/sources.list.d/freenxppa.sources.list# add the public key of FreeNX PPAapt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2a8e3034d018a4ce# update software informationapt-get update# install freenxapt-get install freenx# Now use nxsetup to install necessary files and create the special user "nx"/usr/lib/nx/nxsetup --install