All the instructions below must be run as root,
so open a terminal and become root (and don't forget to exit the session when you're done with these instructions):
sudo su -
(those concerned about security and the use of a root session can quite easily add sudo to each of the steps below instead)
curl https://winswitch.org/gpg.asc | apt-key add -
echo "deb http://winswitch.org/ precise main" > /etc/apt/sources.list.d/winswitch.list;
apt-get update;
apt-get install winswitch
echo "deb http://winswitch.org/ oneiric main" > /etc/apt/sources.list.d/winswitch.list;
apt-get update;
apt-get install winswitch
echo "deb http://winswitch.org/ natty main" > /etc/apt/sources.list.d/winswitch.list;
apt-get update;
apt-get install winswitch
echo "deb http://winswitch.org/ lucid main" > /etc/apt/sources.list.d/winswitch.list;
apt-get update;
apt-get install winswitch
echo "deb http://winswitch.org/ squeeze main" > /etc/apt/sources.list.d/winswitch.list;
apt-get update;
apt-get install winswitch
echo "deb http://winswitch.org/ wheezy main" > /etc/apt/sources.list.d/winswitch.list;
apt-get update;
apt-get install winswitch
echo "deb http://winswitch.org/ sid main" > /etc/apt/sources.list.d/winswitch.list;
apt-get update;
apt-get install winswitch
(the NX packages were built by the FreeNX team)