I am using Ubuntu 12.04 64-bit, with all updates installed.
I made a simple shell script that starts a SOCKS5 tunnel and launches Firefox (with correct network proxy settings) to use the tunnel. How do I recognize when Firefox has ended (when I close it) so that I can close the tunnel? Also, it would be awesome if I could run this in the background, but not necessary.
ssh -fCN -D 10000 server.com
firefox //To lauch firefox using Ubuntu
? Code to determine when firefox has quit
Code that kills the tunnel