Hi,
I am running alpine-2.00-1.fc10.x86_64 on an F10 box. If I get a message with an html or file attachment and I try to open it, I get an error that "Firefox can't find the file at /tmp/img--46112.htm" The correct program opens up but I always get the can't find file errors. If the message contains a URL then it comes up and displays properly.
Does anyone know how to troubleshoot this problem?
Regards,
Tom Diehl wrote:
Does anyone know how to troubleshoot this problem?
I haven't used Alpine, but it sounds like it's deleting the attachment when Firefox "exits". The problem is, the Firefox launcher exits immediately if Firefox is already running. That means Alpine is probably deleting the file before Firefox can open it.
For troubleshooting, try exiting Firefox before telling Alpine to open the file.
Matt Flaschen
On Mon, 2 Mar 2009, Matthew Flaschen wrote:
Tom Diehl wrote:
Does anyone know how to troubleshoot this problem?
I haven't used Alpine, but it sounds like it's deleting the attachment when Firefox "exits". The problem is, the Firefox launcher exits immediately if Firefox is already running. That means Alpine is probably deleting the file before Firefox can open it.
For troubleshooting, try exiting Firefox before telling Alpine to open the file.
Well except that I went stupid and left out some important details. If I open up a link in the message it opens firefox and displays the link. If I try to open any attachment it opens the correct program be it firefox, evince or whatever and then gives the error message similar to "Unable to open document Error opening file: No such file or directory" The above error is from evince. The message in my previous message was from FF. Just to be sure, I tried your suggestion but no joy.
Thanks for trying.
Regards,
Tom Diehl wrote:
Well except that I went stupid and left out some important details. If I open up a link in the message it opens firefox and displays the link.
Well, that's different. There wouldn't be any attachment to save into the fs in that case, and thus no tmp file for alpine to prematurely delete.
If I try to open any attachment it opens the correct program be it firefox, evince or whatever and then gives the error message similar to "Unable to open document Error opening file: No such file or directory"
And when you look for the file manually, it is in fact gone, right? I still think alpine is prematurely deleting it though the fact that it happens with all programs is strange.
Matt Flaschen
On Mon, 2 Mar 2009, Matthew Flaschen wrote:
Tom Diehl wrote:
Well except that I went stupid and left out some important details. If I open up a link in the message it opens firefox and displays the link.
Well, that's different. There wouldn't be any attachment to save into the fs in that case, and thus no tmp file for alpine to prematurely delete.
If I try to open any attachment it opens the correct program be it firefox, evince or whatever and then gives the error message similar to "Unable to open document Error opening file: No such file or directory"
And when you look for the file manually, it is in fact gone, right? I still think alpine is prematurely deleting it though the fact that it happens with all programs is strange.
I do not think it ever gets created. I never see a tmp file. It could be that it gets created and immediately deleted, I cannot be sure. What I do know is that this used to work and somewhere in between upgrading from pine to alpine it stopped working.
Regards,
On Mon, 2009-03-02 at 14:17 -0500, Tom Diehl wrote:
I do not think it ever gets created. I never see a tmp file. It could be that it gets created and immediately deleted, I cannot be sure.
Can you monitor the /tmp directory while you play with Alpine? It might help to delete all the other old stuff in there, so there's less to look through.
Are other programs still able to create temporary files? Are the /tmp directory still "drwxrwxrwt"?
[tim@suspishus ~]$ ls -ld /tmp drwxrwxrwt 53 root root 4096 2009-03-03 14:33 /tmp
On Mon, 02 Mar 2009 12:59:34 -0500, Tom Diehl wrote:
I am running alpine-2.00-1.fc10.x86_64 on an F10 box. If I get a message with an html or file attachment and I try to open it, I get an error that "Firefox can't find the file at /tmp/img--46112.htm" The correct program opens up but I always get the can't find file errors. If the message contains a URL then it comes up and displays properly.
Does anyone know how to troubleshoot this problem?
First, go into M[ain Menu] > S[etup] > C[onfigure] ; type W [hereis], then URL. Make sure the first hit says viewing is enabled. Then W till you get to URL-viewer, and post what it's set to; you may also want to hit the question mark and read the help -- Pine/Alpine help is generally well written.
My viewer is unset, and it uses the default; since I run Gnome, my preferences are set in Fedora's Preferences (to Dillo -- it's fastest, and I can always c&p the URL to something else if Dillo can't handle it).
When viewing the message, you should see at least one line among the headers specifying the attachment(s). Hit '>' [right angle-bracket]; that gives you just the list of what you can view. With the cursor, highlight what you want, then hit Enter or the angle bracket again.
When it asks, tell it Yes. If that fails, tell it Save, and notice the name it offers (or change it, if you like). Then go into your home directory and find it; this time you have all of Fedora to open it with, and will usually succeed.
Finally, if it's some cockamamie Windows app, you may have to go looking for what in linux handles that. For specifically html, right- clicking on the saved file will normally let you choose any browser you have to open it with. (I recommend Epiphany; it's the least well- defended, and I keep it around as an expendable to try things that my strong browsers won't handle, when I don't want to stop and figure out which defense I have to relax for something I may only ever look at once.)
On Mon, 2 Mar 2009, Beartooth wrote:
On Mon, 02 Mar 2009 12:59:34 -0500, Tom Diehl wrote:
I am running alpine-2.00-1.fc10.x86_64 on an F10 box. If I get a message with an html or file attachment and I try to open it, I get an error that "Firefox can't find the file at /tmp/img--46112.htm" The correct program opens up but I always get the can't find file errors. If the message contains a URL then it comes up and displays properly.
Does anyone know how to troubleshoot this problem?
First, go into M[ain Menu] > S[etup] > C[onfigure] ; type W [hereis], then URL. Make sure the first hit says viewing is enabled. Then W till you get to URL-viewer, and post what it's set to; you may also want to hit the question mark and read the help -- Pine/Alpine help is generally well written.
This looks right to me:
_TEST("test -n '${DISPLAY}'")_ /usr/bin/firefox "/usr/bin/mozilla _URL_" "/usr/bin/links _URL_"
and if I click on a link in the message firefox opens up and goes to the site selected.
My viewer is unset, and it uses the default; since I run Gnome, my preferences are set in Fedora's Preferences (to Dillo -- it's fastest, and I can always c&p the URL to something else if Dillo can't handle it).
When viewing the message, you should see at least one line among the headers specifying the attachment(s). Hit '>' [right angle-bracket]; that gives you just the list of what you can view. With the cursor, highlight what you want, then hit Enter or the angle bracket again.
Well now here is the problem that I am trying to solve. when I do this I see the following:
1 2 lines Text/PLAIN (charset: ISO-8859-1 "Latin 1 (Western Europe)") 2 87 KB Message/RFC822, "Fwd: Fw: The Plan" 2.1.1.1 168 lines Text/PLAIN 2.1.1.2 ~621 lines Text/HTML 2.1.2 29 KB Image/JPEG (Name: "ThePlan.jpg")
If I select the first 2 entries I get to see the attachments. If I select the Text/HTML or Image/JPEG (Name: "ThePlan.jpg") entries I get the appropriate viewer but a file not found error. That is the problem I am trying to describe and solve.
When it asks, tell it Yes. If that fails, tell it Save, and notice the name it offers (or change it, if you like). Then go into your home directory and find it; this time you have all of Fedora to open it with, and will usually succeed.o
Yes and that works although it is cumbersome if all I want to do is see the html version of an email. Back in my pine days this worked. I would like to be able to figure out what changed in Alpine. What I am not sure about is if this feature broke when I upgraded from pine to alpine or if there was a new version of alpine that broke it. This has been broken for me for a long time. I just have not had the time to trouble shoot this. Recently it is becoming a large PITA.
Finally, if it's some cockamamie Windows app, you may have to go looking for what in Linux handles that. For specifically html, right- clicking on the saved file will normally let you choose any browser you have to open it with. (I recommend Epiphany; it's the least well- defended, and I keep it around as an expendable to try things that my strong browsers won't handle, when I don't want to stop and figure out which defense I have to relax for something I may only ever look at once.)
Thanks for the help,
Regards,
On Mon, 02 Mar 2009 16:08:51 -0500, Tom Diehl wrote: [....]
When it asks, tell it Yes. If that fails, tell it Save, and notice the name it offers (or change it, if you like). Then go into your home directory and find it; this time you have all of Fedora to open it with, and will usually succeed.o
Yes and that works although it is cumbersome if all I want to do is see the html version of an email.
Oho! A great light dawns. I've been misunderstanding what you want; I took it to be something external. Pine had a setting with which to choose whether you wanted to see the html code; I set mine as firmly as I could to "NO!" and it has stayed that way. My guess is that the default has reversed.
I tried M > S > C > W for html, and got two hits, neither of which looked *to me* to be that choice. You may want to check them.
Back in my pine days this worked. I would like to be able to figure out what changed in Alpine. What I am not sure about is if this feature broke when I upgraded from pine to alpine or if there was a new version of alpine that broke it. This has been broken for me for a long time. I just have not had the time to trouble shoot this. Recently it is becoming a large PITA.
OK, here I can only refer you to one of the other sources; all I know of html is one thing, that I detest it and all its works *in* *email*. Your mileage obviously varies from mine. I haven't seen -- or maybe just haven't recognized this question on the forums. You could try comp.mail.pine on usenet; or set your newsservers to include news.gmane.net, and try gmain.mail.alpine. info or gmane.mail.pine. general. (Both the latter, I believe, are actually lists at UW; you might prefer to get to them that way.)
Having hit my limits on the specifics, I'll nevertheless guess that the choice is still there, and easy when you know where; there's almost surely also a way to reverse the general choice in particular instances, without having to go into setup. I'll bet you a sixpack to a beer on the first, and two beers to one on the second, FOB Blacksburg, VA.
Dear fellow users,
I found an old message by Tom Diehl in 2009 while stumbling on exactly the same problem:
I am running alpine-2.00-1.fc10.x86_64 on an F10 box. If I get a message with an html or file attachment and I try to open it, I get an error that "Firefox can't find the file at /tmp/img--46112.htm" The correct program opens up but I always get the can't find file errors. If the message contains a URL then it comes up and displays properly.
Does anyone know how to troubleshoot this problem?
The problem is still present with a F14 default installation (no private .pinerc settings) using Gnome:
HTML delegation works correctly with Firefox (defined as default browser in Fedora preferences). But attachments are not found. Read the original thread for more details.
Here is my analysis.
* alpine uses mime/mailcap to find the correct delegate application and launches it.
* /etc/mailcap defines "/usr/bin/xdg-open" as delegate application for effectively every filetype.
* on an attachment opening attempt by the user, xdg-open is called by alpine, after having saved the attachment in a temporary file alike /tmp/img-something.filetype. xdg-open delegates again and calls exit(). This early exit seems trigger removal of the tempfile by alpine.
* In fact xdg-open delegates to gvfs-open or gnome-open, if it detects a Gnome DE. These applications also exit after calling the final delegate. The basic problem (no wait(2) call on final delegate possible) remains the same.
My solution:
I added one line in /usr/bin/xdg-open::exit_success() to delay the exit:
exit_success() { if [ $# -gt 0 ]; then echo "$@" echo fi
#=DH, April 2011 sleep 3
exit 0 }
This delays the exit call sufficiently, until the final delegate has opened the file. It is then still erased by alpine. But in all tests I made the delegate application had loaded the file in memory and could handle (or save-as) it correctly. It is also possible (I am just guessing.) that ext2/3/4 FS, alike NFS, keep an intact copy of an unlink(2)ed file, as long as an open file descriptor exists on the file.
Anyway, this is a quick-and-dirty workaround. (Hope it helps though.) And the default installation should provide a similar effect by a clean implementation of a delegate that can be wait(2)ed correctly rather than being detached from the calling process.
Cheers Dirk