Home

mozilla

Amico Desktop

firefox

Contents

Please submit any questions, comments or bugs to: [email protected]

Introduction
Getting the Software
Screenshots
Configuring
Contributors

Introduction

"Amico Desktop" add a Context Menu which allows the user to use an external program to handle links. It downloads the selected link in a temporary file, with the same name of the original one, and pass the path of this file to the handler program. Moreover, it is possible to specify the temporary files directory and the handler program through its preferences.

Back to Contents


Getting the Software

Currently "Amico Desktop" works on Linux with Mozilla and Firefox, I never tried it on Windows.

Amico Desktop - current version 0.5

RELEASE HISTORY

0.5
FireFox 1.5/2.0 Compatible
0.4
FireFox 0.9x and 1.0 Compatible
0.3
New feature: Don't download Protocols
0.2
Public Release
0.1
Personal Release ;-)

Back to Contents


Screenshots

In action

Preferences


Back to Contents


Configuring

By default, "Amico Desktop" use:

DefaultLinuxWindows
Temporary Direcory/tmpC:\windows\temp
Command Handle/usr/bin/mtpmimeC:\windows\mtpmime

In the "Don't download Protocols" line, you can insert the name of protocols that you don't want to be downloaded. In this case the original link is given to the program handler.

The handler program must be an executable. Two examples:

TCLPerl

#!/usr/bin/wish
set filename [lindex $argv 0]
set type [file extension $filename]
set action {
	/usr/bin/soffice {
		.sx. .pp. .do. .xl. .rtf .csv .htm
		.jp. .gif
		.dbf .ric
	}
	/usr/bin/kfax {
		.tif .tiff
	}
}
foreach { bin suffix } $action {
	foreach suf $suffix {
		if ![regexp ^$suf $type] { continue }
		if ![file exist $bin] { continue }
		exec $bin $filename &
		after 10000
		exit 0
	}
}
tk_messageBox -message "Cannot handler $filename"
exit 0


#!/usr/bin/perl

use Tk;

sub report_error {
	my $arg = shift;
	my $mw = MainWindow->new;
        $mw->Button(    -text => "OK",
                        -command => sub{exit}
                ) -> pack(-side => "bottom");
 	$mw->Label(    -text => $arg,
                ) -> pack(-side=>"top", -expand=> 1);
	$mw->geometry("200x100+100+100");
	MainLoop;
}

my $arg = shift;
$arg =~ /\.(.*?)$/;
my $ext = $1;
print $ext . "\n";
my %extensions= (
	"/usr/local/bin/gmplayer" => ["mov", "mpg", "avi", "mpeg"],
	"/usr/bin/oowriter" => ["doc", "rtf"]
);
while ( ($prog, $exts) = each %extensions ) {
	foreach my $i ( @$exts ) {
		if ($ext eq $i) {
			exec $prog, $arg;
			report_error ("Unable to run $prog $arg");
			exit;
		}
	}
}

report_error ("No handler for $ext");


Back to Contents


Contributors

I'd like to thank all those who have sent in comments, requests, patches, etc.
Piera "Vampiera" Poggio
Richard Heck -- Perl script
Franco Violi -- the original idea
Gianluca "Kosta" Costantini -- translations

Back to Contents


Home