#!/bin/bash -ex # # Install Ubuntu desktop (Gnome) # # Tested on: # # ami-1515f67c # ubuntu-images-us/ubuntu-karmic-9.10-i386-server-20091027.1.manifest.xml # export DEBIAN_FRONTEND=noninteractive sudo -E apt-get update sudo -E apt-get upgrade -y sudo -E apt-get install -y \ ubuntu-desktop \ denyhosts \ pwgen if [ $(uname -m) = 'x86_64' ]; then nxclient="nxclient_3.4.0-5_x86_64.deb" nxnode="nxnode_3.4.0-6_x86_64.deb" nxserver="nxserver_3.4.0-8_x86_64.deb" else nxclient="nxclient_3.4.0-5_i386.deb" nxnode="nxnode_3.4.0-6_i386.deb" nxserver="nxserver_3.4.0-8_i386.deb" fi wget -O/tmp/$nxclient http://64.34.161.181/download/3.4.0/Linux/$nxclient wget -O/tmp/$nxnode http://64.34.161.181/download/3.4.0/Linux/$nxnode wget -O/tmp/$nxserver http://64.34.161.181/download/3.4.0/Linux/FE/$nxserver sudo dpkg -i /tmp/$nxclient sudo dpkg -i /tmp/$nxnode sudo dpkg -i /tmp/$nxserver # Would like to not do this if I can figure out how to use NX with ssh keys. sudo perl -pi -e ' s%^(PasswordAuthentication) no%$1 yes\nAllowUsers ubuntu nx% ' /etc/ssh/sshd_config sudo /etc/init.d/ssh restart cat <