Sunday, November 28, 2010

Installing the shell_sink client application


Installing the sink client should be a snap. There are only 2 steps:
  1. Install the shellsink-client application
  2. Configure a couple environment variables
The client is a python application that you can call from the command line to asynchronously upload a command and relevant tags to the shellsink server. When properly configured it will run behind the scenes every time a command is issued. It can also be easily disabled or enabled for times you don't want to log commands. Here are detailed instructions for installation:

Debian Based Distributions
If you have a Debian based distribution you can install shellsink-client by adding the shellsink repository to your apt sources. Go to this page for instructions and follow the instructions under the link that says "Technical details about this PPA." Once you have added the shellsink repository you can update your package lists and install the client with
sudo apt-get update
sudo apt-get install shellsink
Finally, you must append this file to your ~/.bashrc to enable the client. Be sure to replace the default tags with your own meaningful tags and most importantly set the default id to whatever you see here.

Other Types of Unix
For other flavors of unix you can download the shellsink-client executable here and put it in your path. Once the client is installed you must set a few environment variables. Append the contents of this file to your .bashrc or .bash_profile. If you use zsh see this how-to. Be sure to change the id variable to be the one that was assigned to you by the shellsink server on the preferences page. Also change the tags. I always start with the name of the host machine as my base tag so I know which computer logged which command.

Finally, just close your terminal and reopen it. Type a command and go see if it has been logged to the shell_sink server.

2 comments:

snot said...

http://bazaar.launchpad.net/~joshuacronemeyer/shellsink/trunk/annotate/head%3A/bash_profile

the above url gives me internal server error

Sr. Urso said...

The bash_profile URL is not working