So I'm a freak, and I still use Pine for reading my email. Even weirder, I like to run Pine directly on the server in question, because it's way faster than using Imap. However, this is a little annoying when I want to look at some sort of attachment like a PDF or image, because I need to view it on the machine running my gui.
I wrote this little script to enable this, and it works well:
#!/usr/bin/perl
use strict; use warnings;
use File::Temp qw(tempfile);
my ( $fh, $filename ) = tempfile();
print $fh $_ while <>;
seek $fh, 0, 0;
my $remote_host = ( split / /, $ENV{SSH_CONNECTION} )[0]; system( 'scp', $filename, $remote_host . ':' . $filename ); system( 'ssh', $remote_host, 'DISPLAY=:0.0 gnome-open ' . $filename );
zssh.
Re:Cute and disturbing
Aristotle on 2007-04-20T21:12:59
It should be possible to use the
hook
command to achieve that, though. I admit I don’t know if it can actually be done, as I’ve only ever kept zssh on file as an “if I ever need to do that” sort of thing.It’s a blast from the past, aye?