Funny action on "opening" a pdf document

Piotr Ozarowski ozarow at gmail.com
Sat Jan 19 00:13:04 UTC 2013


[Theodore Kilgore, 2013-01-18]
> On Fri, 18 Jan 2013, Piotr Ozarowski wrote:
> 
> > [Theodore Kilgore, 2013-01-18]
> > > "xdg-open opens a file or URL in the user's preferred application" 
> > > explicitly mentioning "a file or a url" and then it says 
> > > "If a file is provided the file will be opened in the preferred 
> > > application for files of that type." These words would indicate that it is 
> > > going to open a file by doing something to the file, not by doing the 
> > > extraneous act of starting a web browser. 
> > 
> > do you have something like:
> > 
> > application/pdf;        xpdf '%s';      prioryty=1;     test=test -n "$DISPLAY"
> > 
> > in ~/.mailcap or /etc/mailcap? 
> 
> No I did not.
> 
> > If not, can you add it to ~/.mailcap and check
> > xdg-open again?
> > 
> > You can also add to ~/.mime.types:
> 
> I have no such file

create it then

> > application/pdf		pdf
> 
> (didn't try adding any .mime.types file. Are you sure it isn't "xpdf" at 
> the end?)

yes, I'm sure (it will let xdg-open know that *.pdf files have
application/pdf mime type and later it will choose the right app from
~/.mailcap)

> > if /etc/mime.types doesn't have it.
> 
> No such file in /etc, either.

so that's why xdg-open tries to open this file in a browser

> The man page says it has something to do 
> with cups.

nothing to do with CUPS, see http://en.wikipedia.org/wiki/Mailcap

> No help from adding the line to .mailcap.

echo 'application/pdf pdf' >> ~/.mime.types
-- 
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645



More information about the mc mailing list