Find the answer to your Linux question:
Results 1 to 9 of 9
hi all, I'm unhappy with the choice of application made by Opera's M2 email client when opening PDF attachments to my mail -- I was told Opera falls back on ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Sep 2007
    Posts
    164

    MIME-type handling in GNOME


    hi all,

    I'm unhappy with the choice of application made by Opera's M2 email client when opening PDF attachments to my mail -- I was told Opera falls back on the systems default application based on its MIME type.

    This is on a Debian Etch system running GNOME 2.14.3, and I don't quite understand where MIME types and default apps are specified. I know I can right-click on a specific document, bring up the properties dialog and pick a default app on the "Open With" tab. After this, GNOME will use a different default, but Opera doesn't seem to know about it.

    Are there other places to control GNOME's default apps?

    cheers, kai

  2. #2
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    877
    Opera is not a Gnome application. You may have better luck setting it in Opera preferences.

  3. #3
    Linux Newbie
    Join Date
    Sep 2007
    Posts
    164
    thanks, Segfault!

    I actually started out in an Opera forum where I found out that, apparently, Opera checks the system settings for MIME types. Anyway, it doesn't seem to be the case for GNOME.

    Is there a different way of accessing the MIME type handling in GNOME than the way I described?

    cheers, kai

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    877
    OK, let's make it clear. You went to

    Tools > Preferences > Advanced > Downloads

    there you set your preferred application for pdf and it didn't work?

  6. #5
    Linux Newbie
    Join Date
    Sep 2007
    Posts
    164
    Right. That's where I went - and my choice there is "Open with other application" which I specified to be "/usr/bin/acroread". Also, there is only one entry for pdf in the list of MIME types which is "application/pdf".

    And it actually works fine for Opera "the browser" - if I click links to PDFs they are opened using acrobat reader. This setting matters, too: when I changed it from acroread to evince, that's just what happened. But it doesn't work for email attachment, which get opened using ghostview by Opera M2.

    kai

  7. #6
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    877
    Hmhh ...
    There is a bunch of configuration files in ~/.opera - this setting is stored somewhere there. I don't use M2 myself, sorry, can't help further.

  8. #7
    Linux Newbie
    Join Date
    Sep 2007
    Posts
    164
    ok, thanks segfault, for following up to this point.

    I just "grep"ped for '\<gv\>' in .opera to see if this was specified verbatim in one of the config files and got nothing in return.

    Maybe someone else has ideas?

    cheers, kai

  9. #8
    Linux Newbie
    Join Date
    Sep 2004
    Location
    UK
    Posts
    161
    Try

    /etc/mailcap
    /etc/mime.types

    might help?
    In a world without walls and fences, who needs Windows and Gates?

  10. #9
    Linux Newbie
    Join Date
    Sep 2007
    Posts
    164
    Quote Originally Posted by blinky View Post
    Try

    /etc/mailcap
    /etc/mime.types

    might help?
    great, thanks!

    /etc/mailcap had several entries for application/pdf, the last of which specified ghostview to open .pdf
    it also contained the useful line of advise:
    Code:
    #  Users can add their own rules if they wish by creating a ".mailcap"
    #  file in their home directory.  Entries included there will take
    #  precedence over those listed here.
    adding
    Code:
    application/pdf; /usr/bin/acroread '%s'; test=test -n "$DISPLAY"; description=Portable Document Format; nametemplate=%s.pdf
    which I copied from /etc/mailcap to ~/.mailcap at its end did the trick.

    thanks very much, this was most helpful!

    now I'm just wondering when/how lines are added to /etc/mailcap ...

    cheers, kai

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •