[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] Still Cannot Play mp3s from LYNX?

From: Bela Lubkin
Subject: Re: [Lynx-dev] Still Cannot Play mp3s from LYNX?
Date: Wed, 30 May 2018 21:36:28 -0700

Chime Hart wrote:

> Well, Jude, your request certainly changed from trying to play in alsaplayer 
> to
> now, says
> "no space left on device"
> And I certainly have room. Thanks again

I've seen a bunch of discussion since this, which I think might be going
in the wrong direction:

Chime, please *show us* commands and outputs.  Don't describe them.

I *think* you are saying that, after changing the permissions on
~/.mailcap, *trying to play audio in Lynx* reports "no space left on
device"; *show* us this as:

   $ lynx foo.mp3
   no space left on device

(except I'm sure there's more output -- show us the actual output).

Others are interpreting it as if the `chmod` command itself failed:

   $ chmod 600 ~/.mailcap
   chmod: changing permissions of '/home/chime/.mailcap': No space left on 

Maybe they're right, but I think you meant the former.


IF you are getting "no space left on device" when trying to play audio
in Lynx, that means progress!  It means you've successfully gotten
Lynx's attention and changed what it does when trying to play an audio
file.  Now you need to understand why it fails that way.

What happens if you manually run:

   $ mpv foo.mp3

?  By way of example, here's what happens to me:

   $ mpv foo.mp3
   The program 'mpv' is currently not installed. You can install it by typing:
   sudo apt-get install mpv

-- as expected :)

I might have described that as 'it said mpv wasn't installed'.  Then the
person helping me wouldn't have learned that I was running some sort of
Debian or at least apt-based distro, and have the package
'command-not-found' installed; and perhaps more importantly (for the
security-minded observer), the account I'm running from has `sudo`
privileges.  Not that these details are important here; but in general,
this problem is going to get solved in the details.  So please provide


I ran `lynx foo.mp3` and it started `vlc` for me.  So I searched found
the corresponding entry in /etc/mailcap, which was:

   audio/mpeg; vlc '%s'; description="MPEG Audio"; nametemplate=%s.mpg; 
test=test -n "$DISPLAY"

and copied it into ~/.mailcap (a file which previously didn't exist).
And edited it to read:

   audio/mpeg; echo vlc '%s'; description="MPEG Audio"; nametemplate=%s.mpg; 
test=test -n "$DISPLAY"

-- i.e. added the word 'echo' in front of 'vlc'.  Now, sure enough, when
I `lynx foo.mp3` it displays what it would have run, instead of running
it.  Specifically:

   $ lynx foo.mp3
   vlc /tmp/lynxXXXXxweDNR/L6695-5750TMP.m4a

   echo vlc '/tmp/lynxXXXXxweDNR/L6695-5750TMP.m4a'

   lynx: Start file could not be found or is not text/html or text/plain

I can see that Lynx copied the file to a different name (and extension),
then ran the command I specified.  Now I have total control!  I can
change what Lynx(*) will run for a .mp3 file to anything I want.  (*) Of
course, *many* programs pay attention to .mailcap, so if I wanted to
specifically change only what Lynx would use, I'd have to get fancier.
And if I had a different audio file type I'd need to change a different
entry; or possibly make a wildcard entry for 'audio/*'.

How did I figure out that 'audio/mpeg' was the entry I needed to change?
I ran `lynx -trace foo.mp3` and found this in the resulting Lynx.trace:

   StreamStack: found exact match: audio/mpeg -> www/present


reply via email to

[Prev in Thread] Current Thread [Next in Thread]