Gnus development mailing list
 help / color / mirror / Atom feed
* using gnome-open with mailcap data
@ 2011-06-08 19:01 Eric Abrahamsen
  2011-06-08 19:05 ` Eric Abrahamsen
  2011-06-08 20:36 ` Dan Christensen
  0 siblings, 2 replies; 7+ messages in thread
From: Eric Abrahamsen @ 2011-06-08 19:01 UTC (permalink / raw)
  To: ding

So far as I understand it, the best way to get gnus to open images
externally using a different viewer is a ~/.mailcap file with something
like this in it:

image/jpeg; /usr/bin/eog %s

(eog is the default Ubuntu image viewer)

I have two questions about this (apart from the obvious, "is this the
right thing to do"):

1. Why don't wildcards word in the mimetype? Neither image/* nor
   image/.* works, gnus goes back to the default of "display". I need to
   specify image/jpeg.
2. Can I use gnome-open for this sort of thing? It's basically its own
   little mime parser, and knows all the system defaults, and if I'm
   going to pass a file to something outside of gnus/emacs, gnome-open
   knows best what to do with it. Setting gnome-open in my .mailcap file
   just gives me "Displaying /usr/bin/gnome-open
   /tmp/emm.5971frN/IMG_3368.JPG...done" in the minibuffer, and then
   nothing happens.

Any hints welcome!

Thanks,
Eric




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: using gnome-open with mailcap data
  2011-06-08 19:01 using gnome-open with mailcap data Eric Abrahamsen
@ 2011-06-08 19:05 ` Eric Abrahamsen
  2011-06-08 20:36 ` Dan Christensen
  1 sibling, 0 replies; 7+ messages in thread
From: Eric Abrahamsen @ 2011-06-08 19:05 UTC (permalink / raw)
  To: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

[...]

> 2. Can I use gnome-open for this sort of thing? It's basically its own
>    little mime parser, and knows all the system defaults, and if I'm
>    going to pass a file to something outside of gnus/emacs, gnome-open
>    knows best what to do with it. Setting gnome-open in my .mailcap file
>    just gives me "Displaying /usr/bin/gnome-open
>    /tmp/emm.5971frN/IMG_3368.JPG...done" in the minibuffer, and then
>    nothing happens.

In fact, what I'd really like to do is short-circuit all the "view
externally" commands so they go straight to gnome-open…




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: using gnome-open with mailcap data
  2011-06-08 19:01 using gnome-open with mailcap data Eric Abrahamsen
  2011-06-08 19:05 ` Eric Abrahamsen
@ 2011-06-08 20:36 ` Dan Christensen
  2011-06-10  1:39   ` Eric Abrahamsen
  2011-06-10  1:40   ` Eric Abrahamsen
  1 sibling, 2 replies; 7+ messages in thread
From: Dan Christensen @ 2011-06-08 20:36 UTC (permalink / raw)
  To: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> 2. Can I use gnome-open for this sort of thing? It's basically its own
>    little mime parser, and knows all the system defaults, and if I'm
>    going to pass a file to something outside of gnus/emacs, gnome-open
>    knows best what to do with it. Setting gnome-open in my .mailcap file
>    just gives me "Displaying /usr/bin/gnome-open
>    /tmp/emm.5971frN/IMG_3368.JPG...done" in the minibuffer, and then
>    nothing happens.

I think gnome-open returns too quickly and then Gnus deletes the
temporary file.  My hack to work around this is a script:

#!/bin/sh
gnome-open "$@"
sleep 5

I named this script "o", so it's very easy to call this on any random
file and it usually does something reasonable.

Dan




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: using gnome-open with mailcap data
  2011-06-08 20:36 ` Dan Christensen
@ 2011-06-10  1:39   ` Eric Abrahamsen
  2011-06-10  8:17     ` Tassilo Horn
  2011-06-10  1:40   ` Eric Abrahamsen
  1 sibling, 1 reply; 7+ messages in thread
From: Eric Abrahamsen @ 2011-06-10  1:39 UTC (permalink / raw)
  To: ding

Dan Christensen <jdc@uwo.ca> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> 2. Can I use gnome-open for this sort of thing? It's basically its own
>>    little mime parser, and knows all the system defaults, and if I'm
>>    going to pass a file to something outside of gnus/emacs, gnome-open
>>    knows best what to do with it. Setting gnome-open in my .mailcap file
>>    just gives me "Displaying /usr/bin/gnome-open
>>    /tmp/emm.5971frN/IMG_3368.JPG...done" in the minibuffer, and then
>>    nothing happens.
>
> I think gnome-open returns too quickly and then Gnus deletes the
> temporary file.  My hack to work around this is a script:
>
> #!/bin/sh
> gnome-open "$@"
> sleep 5

Thanks! I'll give this a shot.

Eri




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: using gnome-open with mailcap data
  2011-06-08 20:36 ` Dan Christensen
  2011-06-10  1:39   ` Eric Abrahamsen
@ 2011-06-10  1:40   ` Eric Abrahamsen
  1 sibling, 0 replies; 7+ messages in thread
From: Eric Abrahamsen @ 2011-06-10  1:40 UTC (permalink / raw)
  To: ding

Dan Christensen <jdc@uwo.ca> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> 2. Can I use gnome-open for this sort of thing? It's basically its own
>>    little mime parser, and knows all the system defaults, and if I'm
>>    going to pass a file to something outside of gnus/emacs, gnome-open
>>    knows best what to do with it. Setting gnome-open in my .mailcap file
>>    just gives me "Displaying /usr/bin/gnome-open
>>    /tmp/emm.5971frN/IMG_3368.JPG...done" in the minibuffer, and then
>>    nothing happens.
>
> I think gnome-open returns too quickly and then Gnus deletes the
> temporary file.  My hack to work around this is a script:
>
> #!/bin/sh
> gnome-open "$@"
> sleep 5

Thanks! I'll give this a shot.

Eric




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: using gnome-open with mailcap data
  2011-06-10  1:39   ` Eric Abrahamsen
@ 2011-06-10  8:17     ` Tassilo Horn
  2011-06-13 16:39       ` Ted Zlatanov
  0 siblings, 1 reply; 7+ messages in thread
From: Tassilo Horn @ 2011-06-10  8:17 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

Hi Eric,

>>> 2. Can I use gnome-open for this sort of thing? It's basically its
>>> own little mime parser, and knows all the system defaults, and if
>>> I'm going to pass a file to something outside of gnus/emacs,
>>> gnome-open knows best what to do with it. Setting gnome-open in my
>>> .mailcap file just gives me "Displaying /usr/bin/gnome-open
>>> /tmp/emm.5971frN/IMG_3368.JPG...done" in the minibuffer, and then
>>> nothing happens.
>>
>> I think gnome-open returns too quickly and then Gnus deletes the
>> temporary file.  My hack to work around this is a script:
>>
>> #!/bin/sh
>> gnome-open "$@"
>> sleep 5
>
> Thanks! I'll give this a shot.

I gave it a try.  First interesting point is that even "sleep 2" is not
enough, i.e., Gnus says "Displaying o /tmp/..." (where o is the script),
but nothing actually starts.

But if I use "sleep 5", then for example when viewing a PDF attachment
Evince starts and shows it.  But after one or two seconds, it closes
again, most probably because the script returns.

Hm, there's a redhat bug report about this behavior:

  https://bugzilla.redhat.com/show_bug.cgi?id=472402

And this bug report indicates that gnome-open is deprecated in favour of
gvfs-open:

  https://bugzilla.gnome.org/show_bug.cgi?id=556305

But sadly, that has the same behavior...

I've filed a new bug report at

  https://bugzilla.gnome.org/show_bug.cgi?id=652262

Bye,
Tassilo
-- 
Sent from my Emacs



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: using gnome-open with mailcap data
  2011-06-10  8:17     ` Tassilo Horn
@ 2011-06-13 16:39       ` Ted Zlatanov
  0 siblings, 0 replies; 7+ messages in thread
From: Ted Zlatanov @ 2011-06-13 16:39 UTC (permalink / raw)
  To: ding

On Fri, 10 Jun 2011 10:17:20 +0200 Tassilo Horn <tassilo@member.fsf.org> wrote: 

TH> And this bug report indicates that gnome-open is deprecated in favour of
TH> gvfs-open:

TH>   https://bugzilla.gnome.org/show_bug.cgi?id=556305

TH> But sadly, that has the same behavior...

TH> I've filed a new bug report at

TH>   https://bugzilla.gnome.org/show_bug.cgi?id=652262

Thanks for that.

On Wed, 08 Jun 2011 12:05:18 -0700 Eric Abrahamsen <eric@ericabrahamsen.net> wrote: 

EA> Eric Abrahamsen <eric@ericabrahamsen.net> writes:

EA> [...]

>> 2. Can I use gnome-open for this sort of thing? It's basically its own
>> little mime parser, and knows all the system defaults, and if I'm
>> going to pass a file to something outside of gnus/emacs, gnome-open
>> knows best what to do with it. Setting gnome-open in my .mailcap file
>> just gives me "Displaying /usr/bin/gnome-open
>> /tmp/emm.5971frN/IMG_3368.JPG...done" in the minibuffer, and then
>> nothing happens.

EA> In fact, what I'd really like to do is short-circuit all the "view
EA> externally" commands so they go straight to gnome-open…

Agreed, that would make it less important to fix the sync bug above.  I
don't know all the Gnus magic around handling attachments, but IMO this
would be very nice.

Ted




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-06-13 16:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-08 19:01 using gnome-open with mailcap data Eric Abrahamsen
2011-06-08 19:05 ` Eric Abrahamsen
2011-06-08 20:36 ` Dan Christensen
2011-06-10  1:39   ` Eric Abrahamsen
2011-06-10  8:17     ` Tassilo Horn
2011-06-13 16:39       ` Ted Zlatanov
2011-06-10  1:40   ` Eric Abrahamsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).