Mozex

The "mozex" plugin for Mozilla and Firefox allows the use of external programs for several services like FTP, IRC, mail and news, and for editing the text within text areas.

The author of mozex is Tomas Styblo tripie(at)cpan.org.


Preferences

Mozilla: adjust the preferences via Mozilla:Edit:Preferences:mozex:TextAreas

FireFox: adjust the preferences via chrome://mozex/content/mozexPrefDialog.xul

The following preferences are added to the setup:

user_pref("mozex.command.aim", "");
user_pref("mozex.command.download", "");
user_pref("mozex.command.ed2k", "");
user_pref("mozex.command.ftp", "");
user_pref("mozex.command.irc", "");
user_pref("mozex.command.mailer", "");
user_pref("mozex.command.news", "");
user_pref("mozex.command.source", "");
user_pref("mozex.command.telnet", "");
user_pref("mozex.command.textarea", "");
user_pref("mozex.general.tmpdir", "");
user_pref("mozex.intercept.ftp", false);
user_pref("mozex.intercept.irc", false);
user_pref("mozex.intercept.mailto", false);
user_pref("mozex.intercept.news", false);
user_pref("mozex.intercept.telnet", false);
user_pref("mozex.universal.command", "");
user_pref("mozex.universal.schemes", "");

so the default values are empty strings and intercepting clicks on URLs with (ftp irc mailto news telnet) protocols are "false" respectively.

This is how it looks like on screen:

[mozex preferenzes in mozilla]


Examples

i use mozex simply to edit text in textareas - with vim (of course). i don't want to use gvim, however, so vim is started in an xterm:

user_pref("mozex.command.textarea", "/usr/bin/X11/xterm -e vim %t");

the full path to xterm is required (i think. gotta check that again). xterm executes the vim command (option "-e") and vim operates on the temporary file (option "%t").

i use the "-geometry" option to both give it a number of lines and columns (90 columns, 50 lines), as well as to place its window to the top left corner ("+0+0").

user_pref("mozex.command.textarea", "/usr/bin/X11/xterm -geometry 90x50+0+0 -e vim %t")

as i often need to look something up from another shell or access a text browser i'll start a "screen" session within the xterm before starting vim inside:

user_pref("mozex.command.textarea", "/usr/bin/X11/xterm -geometry 90x50+0+0 -e screen vim %t")

the resulting command becomes a bit lengthy - but it definitely worth it! :-)


Links


Thoughts

just, why, oh why, do GUIs have to have an answer to everything inside of them? why is there no command to "edit this text with an external editor"? why can you do all these nifty things only when the GUI becomes a place for plugins? it really is hard to understand.