For those you running mac os or linux, the following little script may be useful. It lets your print most files (like pdfs) from your mac, even over red rover, even when you're not connected to VPN, simply by typing, at the command line:
$ camprint file/to/print.pdf
I tried to make the configuration instructions verbose, but feel free to contact me if you have any questions.
Step 1) Save the following script to a file somewhere. I suggest
having a ~/bin/ directory on your mac's home folder, and saving it to
"~/bin/camprint". Make sure to put in your_user_name where
appropriate.
- - - cut - - -
#!/bin/bash
scp $1 your_user_name@blake.cam.cornell.edu:~/tmp/print.pdf;
ssh your_user_name@blake.cam.cornell.edu 'lpr -P dell-5130-color-duplex ~/tmp/print.pdf;rm ~/tmp/print.pdf;'
- - - cut - - -
Step 2) Change the permissions (chmod) so it's executable:
$ chmod 744 ~/bin/camprint
Step 3) make sure that "~/bin" is in your PATH by editing your .bashrc file
(located at ~/.bashrc) to add the line "export PATH=$PATH:~/bin/"
Step 4) Close your terminal and open it up again (this will make sure
your new .bashrc settings are enabled).
Step 5) On the cam machines, make sure you have a directory called ~/tmp/
$ ssh your_user_name@blake.cam.cornell.edu
jugander@blake:~> mkdir tmp
jugander@blake:~> exit
$
Printing with the command "camprint /file/to/print.pdf" from your machine should now work. Unfortunately it will prompt you for your password twice (once for the scp command, once for the ssh command). I didn't have a good way to get this down to only one. At this point you'll want to configure ssh agent forwarding so that you don't need to enter your password from your machine when ssh/scp'ing into CAM, but this makes it super-strongly recommended that you have good security on your machine (password protection, anti-virus, etc.), since key forwarding essentially makes your security the only barrier between an attacker and full access to CAM's system. Because of this, I would not advise that all people have it ssh agent forwarding configured. The upside of key forwarding is that it encourages strong passwords. Feel free to ask me (Johan) about it if you have more questions about it.
Follow-up) You can repeat step 1 for the different printers, creating a different script ~/bin/camprintbw that prints to the
dell-5130-bw-duplex printer in the same way, and that way you can choose which printer to send things to.