Posts Tagged ‘Octave’

Taking SSH further with X

Over the last couple of weeks, I’ve been introduced to GNU Octave, a high-level interface to FORTRAN, with some audio functions built in. One of the major components of the work I’ve been set using Octave has been using it’s plotting functions – essentially displaying waveforms on the screen using the additional GNUplot package.

One of the problems that Octave presented pretty quickly was that it is very tricky to get working under Mac OS X (the Windows port, bizarrely, proved slightly easier for most people I spoke to get up and running). Running Octave itself is simple enough, however installing the essential additional packages required various different software packages, such as AquaTerm and GNUplot, to be loaded and configured correctly.

Under Linux, however, acquiring the software and its additional packages is done through apt-get or aptitude. Configuration is automatic.

Running Octave through SSH on my server works perfectly – it’s easy to install, and the lack of sound isn’t even a problem thanks to the ‘ausave’ command (akin to ‘bouncing’ the specified waveform), with Dropbox pushing the resulting file to the local machine for playback. The only problem I was having was with the plotting component – graphs are a step too far for the command line. The only option I had was to run Octave on my Ubuntu PowerBook.

However, I was introduced to a fantastic alternative, in the form of SSH and the ‘xeyes’ program. Using an ‘-X’ switch in the regular SSH command enables the forwarding of X-window data to the client machine. (You can run ‘xeyes’ at the server command line to check that the connection has been established). Now, commands are issued to GNUplot on the remote machine, and the data is displayed on the client (using a Macintosh, you will need X11 for this to work).

I’m excited for the potential of this technique, given the number of X compatible GUIs for command-line tools this could likely be a very useful tool.