The man who will use his skill and constructive imagination to see how much he can give for a dollar,
instead of how little he can give for a dollar, is bound to succeed
-Henry Ford

A quick and dirty guide to getting your laptop to like your VRG3D apps in $G

Disclaimer: this is the basic sequence of steps one needs to take to get his/hers $G tree setup on a Windows machine outside of the department. A big chunk of it is taken from the official $G Documentation and is simply here to reconfirm that the instructions are, indeed, working, and to get them all in one place. It is definitely not the only way to get things running, so if you have a different choice of tools/connection options, you're welcome to experiment :)

Setting up cygwin

Get Cygwin from the official site. The installation directory is C:\Cygwin, and that's where I store my setup.exe file that needs to be run every time you want to change anything in the installation, e.g. install more packages, get sources, update libraries, etc.

Once you run setup.exe, most of the settings could be left at their default values. Make sure the root install directory is C:\Cygwin, local package directory could be anything (e.g. c:\temp\cyginst). As for the list of packages to initially install, it depends on your preferences (e.g. I installed vi but not emacs), but I suggest you have the following in addition to the defaults:

Devel: cvs, cvsutils, doxygen, gcc, gcc-g++, gdb
Graphics: opengl
Net: autossh, inetutils, openssh
Shells: bash, tcsh
X11: xterm, xorg-x11-* (etc.) if you plan on using X (e.g. for tunneling).

After installing and rebooting, you should be able to start it, and usually you don't need to change any environment variables by hand.

Configuring SSH access to the department

Start Cygwin and create .ssh directory in your home (mkdir .ssh). Make sure you change its permissions to be only accessible by owner (chmod 700 .ssh).

Create your keys by running ssh-keygen -t dsa. When you're asked for a passphrase, if you are the only one using the computer, I suggest leaving it blank, so you don't have to retype every time you connect. You can leave the key name to be default (id_dsa).

This will create id_dsa (your private key) and id_dsa.pub (your public key) inside .ssh. Take id_dsa.pub and email it to yourself or put it on a thumb drive, since you'll have to add it to the list of authorized keys on your CS account.

While you're still inside .ssh, create config file with the following contents:

Host ssh.cs.brown.edu
User your_user_name

Now, go to any CS machine and retrieve your id_dsa.pub key from email or thumb drive. The entire contents of that key file need to be appended to .ssh/authorized_keys file (or, if .ssh/authorized_keys doesn't exist, create .ssh directory, copy id_dsa.pub into it and rename id_dsa.pub to authorized_keys. Of course, you should make sure you're not erasing the existing keys inside the file. Make sure the permissions for both the file and the directory are set to 700.

You should now be able to ssh from your laptop to the department. Open cygwin and type ssh -l your_user_name ssh.cs.brown.edu.

Creating a new $G tree

First, you need to setup your account to work with $G. Follow these instructions depending on which shell you're using.

After you modify your shell profile, start the new shell or restart cygwin and make sure $G is actually configured now by running cd $G.

You need to get the following files from the department: /map/gfx0/tools/WIN32/bin/gfxtree-init and /map/gfx0/tools/WIN32/bin/gfxtree-init.bat. Save them anywhere on your hard drive.

Create C:\gfx directory. This is where your tree will be located. Now run gfxtree-init.bat that you saved in the previous step. This will call gfxtree-init script that will run cygwin, connect to the department via ssh and pull the $G tree structure to your laptop.

Installing our stuff

You should now have all the necessary structure and files required to compile and install anything in local $G. It's now time to get some code that we require to run our apps. The basic sequence of steps for these libraries is:

1. Checkout the sources by running cvs update -d project_name inside $G/src
2. cd project_name
3. Make sources (make)
4. Install libraries and headers (make install)

For example, here's what you need to get VRG3D-ready:
> cvs update -d SDL
> cd SDL
> make
> make install
> cd ..
> cvs update -d G3D
> cd G3D
> make
> make install
> cd VRG3D
> make
> make install

Now test it by getting a VRG3D app from $G (e.g. VRG3D-UI), compiling and running it.




Home