File associations in Linux

Chris Nestrud ccn at comp.uark.edu
Mon Apr 17 15:19:55 EDT 2000


I found that on some sites such as shoutcast.com, the file passed to
freeamp doesn't end in .pls. I made a script /usr/local/bin/lynxfreeamp
arg1 arg2 which just adds the extention arg2 to the file arg1, then runs 
freeamp with the new file, then deletes the file when finished. Script
below.

#cut here#
#!/bin/bash
mv $1 $1.$2
freeamp $1.$2
rm $1.$2
#cut here#

Then I just use '/usr/local/bin/lynxfreeamp %s extention' where
'extention' is the extention the file should have when sent to
freeamp.

Chris

On Sun, 16 Apr 2000, Jacob Schmude wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Certainly! First, look at your lynx.cfg and make sure it has
> "GLOBAL_MAILCAP" or something like that defined, and edit that file it
> refers to. On redhat and debian systems its /etc/mailcap but on
> slackware, the user needs to define this. Now, look at your mime.types
> (usually /etc/mime.types, but on slackware this needs to be created as
> well) and see if it has entries for the pls extension. If not, add a
> mime type. Your mime type and the server's mime type must match, use D
> in links and it will give you a content-type. Mine looks like this:
> audio/x-scpls pls
> Then go back to lynx.cfg and make sure it has the global mime type file
> set to /etc/mime.types. Now here comes some bad news. Some servers, ACB
> radio for example, have the pls file as text/plain. In this situation,
> you don't want to have freeamp played on the text/plain mime type, so
> you can't do anything except download the pls file and set freeamp loose
> on it. However, if it has a mime type for pls and you've added it, now
> put the following in your /etc/mailcap file (or wherever you defined it
> to be in lynx.cfg):
> audio/x-scpls; freeamp %s (substitute the mime type if necessary)
> 
> That's it. The same thing applies to other file types as well.
> 
> 
> On Sun, 16 Apr 2000, Victor Tsaran wrote:
> 
> > Hello, listers!
> > I understand that in order for, say, Lynx to recognize .pls files as those
> > to be played by FreeAmp, one needs to edit .mailcap file. However, is there
> > such a thing to have these associations to be applied accross the whole
> > operating environment?
> > thanks in advance,
> > Vic
> > 
> > 
> > 
> > _______________________________________________
> > Speakup mailing list
> > Speakup at braille.uwo.ca
> > http://speech.braille.uwo.ca/mailman/listinfo/speakup
> > 
> 
> Jacob Schmude
> mailto:jacobs at ncinter.net
> ICQ: 53401220
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.1 (GNU/Linux)
> Comment: Made with pgp4pine
> 
> iD8DBQE4+n77wQVAN6Zb5dARAiY1AJ9TZU4hk3g+k0Jz4bBYnG7RXKisUwCfUC7E
> iq0t4pXawVw37nj3cbjp6v0=
> =iAp/
> -----END PGP SIGNATURE-----
> 
> 
> 
> _______________________________________________
> Speakup mailing list
> Speakup at braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
> 





More information about the Speakup mailing list