Re: mailcap aggravation

2001-07-31 Thread Andrey R. Urazov

On Mon, Jul 30, 2001 at 08:07:25PM +0200, Thomas Huemmler wrote:
 thomas@hogwarts:~$ locate Running
 thomas@hogwarts:~$ su
 Password:
 hogwarts:/home/thomas# updatedb
 hogwarts:/home/thomas# exit
 exit
 thomas@hogwarts:~$ locate Running
 thomas@hogwarts:~$
 
 But, on the other side, my .mailcap-entries for text/html MIME-type 
 work pretty well with test=RunningX:
 
 ###
 ## text/html
 ###
 ## X
 text/html; konqueror %s; nametemplate=%s.html; test=RunningX
 ## Konsole
 text/html; lynx %s; nametemplate=%s.html
 ## im Pager [im = german for: in the]
 text/html; lynx -localhost -underscore -force_html -dump %s; \
 copiousoutput
I can't guess why can this work without any executable named RunningX since:
  grep Running -r /usr/src/mutt-1.3.19/
results in nothing but manual files
  

Yours sincerely, Andrey Urazov
-- 
Writing free verse is like playing tennis with the net down.
--
Tuesday, July 31, 2001, 13:34:48 +0700 - Andrey R. Urazov (mailto:[EMAIL PROTECTED])




Re: mailcap aggravation

2001-07-31 Thread David

On Mon, 30 Jul 2001, Dale Morris wrote:
  
  text/html; /usr/bin/links '%s'; needsterminal; description=HTML
  Text; nametemplate=%s.html
  
 
 I have given up on trying to get netscape to open, too. So I hand
 edited the /etc/mailcap file as you indicated above.  I'm not real
 pleased with the debian mailcap setup now, here's how it works for
 me..  

Okay how about trying this:

# - User Section Begins - #
text/html; /path-to-netscape/netscape '%s'; description=HTML
# -  User Section Ends  - #

Just ran it then.. seems to work for me. Only thing problem is that mutt
just waits till  netscape is closed before you can use it again. Someone
out there might be able to find a way around that, also the above thing
doesn't check to see if you're in X before trying to run netscape, which
isn't all that nice. Just noticed that someone posted a message to this
thread with RunningX in it.  Probably better to grab that file compile
it and then add something like ; test=RunningX to the end of what I
mentioned above or just do what they say.


-- 
Don't tell me I'm burning the candle at both ends -- tell me where to
get more wax!!
-
David Clarke [EMAIL PROTECTED] | David Clarke s3353950
GPG Fingerprint :  869B 53DD 5E80 E1F0 93F6  9871 0508 0296 5957 F723

 PGP signature


Re: mailcap aggravation

2001-07-30 Thread Dale Morris

On Mon, 30 Jul 2001, Dale Morris wrote:

 I'm running debian woody and can't get mutt to open netscape for
 text/html mime types. Instead it opens the gnome help browser. I've
 tried editing my /etc/mailcap file, my ~/.mailcap file and nothing
 helps. I've even read the manual. I know this is a simple solution,
 but could someone give me a pointer? I'll attach my mailcap files..
 
duh...forgot to attach the files. sorry.. it's late and I've been at
this too long..

dale


###
#
#  MIME types and programs that process those types
#
#  Much of this file is generated automatically by the program update-mime.
#  Please see the update-mime man page for more information.
#
###


###
#
#  User section follows:  Any entries included in this section will take
#  precedence over those created by update-mime.  DO NOT CHANGE the
#  User Section Begins and User Section Ends lines, or anything outside
#  of this section!
#

# - User Section Begins - #

text/html; netscape -remote openURL(%s) || netscape %s; test=RunningX

# -  User Section Ends  - #

###

application/x-debian-package; /usr/lib/mime/debian-view '%s'; needsterminal; 
description=Debian GNU/Linux Package; nametemplate=%s.deb
audio/basic; /usr/lib/mime/playaudio '%s'; description=Basic uLaw Audio; 
nametemplate=%s.au
text/plain; less '%s'; needsterminal
audio/midi; /usr/bin/timidity -im '%s'; test=test -n $DISPLAY; description=A MIDI 
file; nametemplate=%s.mid
audio/x-midi; /usr/bin/timidity -im '%s'; test=test -n $DISPLAY; description=A MIDI 
file; nametemplate=%s.mid
text/plain; cat '%s'; print=/usr/bin/a2ps '%s'; copiousoutput
application/pdf; /usr/bin/acroread '%s'; test=test -n $DISPLAY; description=Portable 
Document Format; nametemplate=%s.pdf
text/html; gnome-help-browser '%s'; nametemplate=%s.html; test=test -n $DISPLAY
application/x-troff-man; /usr/bin/nroff -mandoc -Tlatin1; copiousoutput; 
print=/usr/bin/nroff -mandoc -Tlatin1 | print text/plain:-
application/postscript; /usr/bin/X11/gv '%s'; test=test -n $DISPLAY; 
description=postscript
application/ghostview; /usr/bin/X11/gv '%s'; test=test -n $DISPLAY
application/pdf; /usr/bin/X11/gv '%s'; test=test -n $DISPLAY
text/html; /usr/bin/html2text '%s'; copiousoutput; description=HTML Text
image/avs; display '%s'; test=test -n $DISPLAY
image/bie; display '%s'; test=test -n $DISPLAY
image/x-ms-bmp; display '%s'; test=test -n $DISPLAY
image/cmyk; display '%s'; test=test -n $DISPLAY
image/dcx; display '%s'; test=test -n $DISPLAY
image/eps; display '%s'; test=test -n $DISPLAY
image/fax; display '%s'; test=test -n $DISPLAY
image/fits; display '%s'; test=test -n $DISPLAY
image/gif; display '%s'; test=test -n $DISPLAY
image/gray; display '%s'; test=test -n $DISPLAY
image/gradation; display '%s'; test=test -n $DISPLAY
image/hdf; display '%s'; test=test -n $DISPLAY
image/jpeg; display '%s'; test=test -n $DISPLAY
image/pjpeg; display '%s'; test=test -n $DISPLAY
image/map; display '%s'; test=test -n $DISPLAY
image/miff; display '%s'; test=test -n $DISPLAY
image/mono; display '%s'; test=test -n $DISPLAY
image/mtv; display '%s'; test=test -n $DISPLAY
image/x-portable-bitmap; display '%s'; test=test -n $DISPLAY
image/pcd; display '%s'; test=test -n $DISPLAY
image/pcx; display '%s'; test=test -n $DISPLAY
image/pdf; display '%s'; test=test -n $DISPLAY
image/x-portable-graymap; display '%s'; test=test -n $DISPLAY
image/pict; display '%s'; test=test -n $DISPLAY
image/png; display '%s'; test=test -n $DISPLAY
image/x-portable-anymap; display '%s'; test=test -n $DISPLAY
image/x-portable-pixmap; display '%s'; test=test -n $DISPLAY
image/ps; display '%s'; test=test -n $DISPLAY
image/rad; display '%s'; test=test -n $DISPLAY
image/x-rgb; display '%s'; test=test -n $DISPLAY
image/rgba; display '%s'; test=test -n $DISPLAY
image/rla; display '%s'; test=test -n $DISPLAY
image/rle; display '%s'; test=test -n $DISPLAY
image/sgi; display '%s'; test=test -n $DISPLAY
image/sun-raster; display '%s'; test=test -n $DISPLAY
image/targa; display '%s'; test=test -n $DISPLAY
image/tiff; display '%s'; test=test -n $DISPLAY
image/uyvu; display '%s'; test=test -n $DISPLAY
image/vid; display '%s'; test=test -n $DISPLAY
image/viff; display '%s'; test=test -n $DISPLAY
image/x-xbitmap; display '%s'; test=test -n $DISPLAY
image/x-xpixmap; display '%s'; test=test -n $DISPLAY
image/x-xwindowdump; display '%s'; test=test -n $DISPLAY
image/yuv; display '%s'; test=test -n $DISPLAY
audio/mpeg; mpg123 -q '%s'
audio/x-pn-realaudio; realplayer '%s'; test=test $DISPLAY != 
audio/vnd.rn-realaudio; realplayer '%s'; test=test $DISPLAY != 
application/smil; realplayer '%s'; test=test $DISPLAY != 
audio/x-pn-mp3; realplayer '%s'; test=test 

Re: mailcap aggravation

2001-07-30 Thread David

On Mon, 30 Jul 2001, Dale Morris wrote:
 I'm running debian woody and can't get mutt to open netscape for
 text/html mime types. Instead it opens the gnome help browser. I've

I've been getting the same thing(debian/sid, I finally got fed up with
it and edited /etc/mailcap by hand.  It should use /etc/mailcap.order
but for me it doesn't seem to work.  I just added a line in /etc/mailcap
between

# - User Section Begins - #

and

# -  User Section Ends  - #


I added :

text/html; /usr/bin/links '%s'; needsterminal; description=HTML Text;
nametemplate=%s.html

The above is meant to be on one line.  I would have a look for a line
for netscape in your mailcap and copy the line and put it between the
two aforementioned markers.  If you dont have one, you'll have to write
one, just put it between the markers.

-- 
Don't tell me I'm burning the candle at both ends -- tell me where to
get more wax!!
-
David Clarke [EMAIL PROTECTED] | David Clarke s3353950
GPG Fingerprint :  869B 53DD 5E80 E1F0 93F6  9871 0508 0296 5957 F723

 PGP signature


Re: mailcap aggravation

2001-07-30 Thread Thomas Huemmler

Hi Dale,

* Dale Morris [EMAIL PROTECTED] [010730 10:23]:
 On Mon, 30 Jul 2001, Dale Morris wrote:
 
  I'm running debian woody and can't get mutt to open netscape for
  text/html mime types. Instead it opens the gnome help browser. I've
[...]
 text/html; netscape -remote openURL(%s) || netscape %s; test=RunningX

the problem seems to be in the above line, because the next (correct?)
entry for text/html invokes the gnome help browser.

I don´t use netscape, but would -- first of all -- ask myself the 
following questions:
Are the double-quotes allowed?
Does netscape need a 'nametemplate=%s.html'?
Is netscape already installed (dpkg -l | grep ii)?
Is it allowed to use '||' in a mailcap-entry? Or is it better the way,
the Mutt manual says on Page 5 (here the translated german version):
# Einen laufenden Netscape-Browser fernsteuern
text/html; netscape -remote 'openURL(%s)'; test=RunningNetscape
# Wenn Netscape nicht läuft, aber X läuft, starte Netscape, um das
# Objekt anzuzeigen
text/html; netscape %s; test=RunningX

HTH
Thomas

-- 
Thomas Hümmler * mailto:[EMAIL PROTECTED] * http://www.huemmler.de
REDAKTIONSBÜRO T.O.M. * Gsprait 1 * D-85560 Ebersberg
Phone: +49 (0 80 92) 8 38 33 Fax: +49 (0 80 92) 8 38 34
* am Kiosk: CHIP Linux-Spezial: KDE 2.1.1 für SuSE, Red HAT, Debian *



Re: mailcap aggravation

2001-07-30 Thread Jim Toth

On Mon, Jul 30, 2001 at 12:52:52AM -0700, Dale Morris ([EMAIL PROTECTED]) said:
 On Mon, 30 Jul 2001, Dale Morris wrote:
 
  I'm running debian woody and can't get mutt to open netscape for
  text/html mime types. Instead it opens the gnome help browser. I've
  tried editing my /etc/mailcap file, my ~/.mailcap file and nothing
  helps. I've even read the manual. I know this is a simple solution,
  but could someone give me a pointer? I'll attach my mailcap files..
  
 duh...forgot to attach the files. sorry.. it's late and I've been at
 this too long..

[much snippage]
 # - User Section Begins - #
 
 text/html; netscape -remote openURL(%s) || netscape %s; test=RunningX
 
 # -  User Section Ends  - #
[more snippage]
 text/html; gnome-help-browser '%s'; nametemplate=%s.html; test=test -n $DISPLAY

Perhaps mutt uses the last one found within that file, which would be
the one immediately above.  Try commenting out that line, or adding
yours at the end, instead of the begining.

 application/x-troff-man; /usr/bin/nroff -mandoc -Tlatin1; copiousoutput; 
print=/usr/bin/nroff -mandoc -Tlatin1 | print text/plain:-
 application/postscript; /usr/bin/X11/gv '%s'; test=test -n $DISPLAY; 
description=postscript
 application/ghostview; /usr/bin/X11/gv '%s'; test=test -n $DISPLAY
 application/pdf; /usr/bin/X11/gv '%s'; test=test -n $DISPLAY
 text/html; /usr/bin/html2text '%s'; copiousoutput; description=HTML Text

Well, maybe not.

I'd try commenting out that gnome-help-browser line, anyway.


-- 
Jim Toth
[EMAIL PROTECTED]



Re: mailcap aggravation

2001-07-30 Thread Jim Toth

Ok, ignore my last post... :-) 

On Mon, Jul 30, 2001 at 11:53:32AM +0200, Thomas Huemmler
([EMAIL PROTECTED]) said:
 * Dale Morris [EMAIL PROTECTED] [010730 10:23]:
[...]
  text/html; netscape -remote openURL(%s) || netscape %s; test=RunningX
 
 the problem seems to be in the above line, because the next (correct?)
 entry for text/html invokes the gnome help browser.
 
 I don´t use netscape, but would -- first of all -- ask myself the 
 following questions:
 Are the double-quotes allowed?
 Does netscape need a 'nametemplate=%s.html'?
 Is netscape already installed (dpkg -l | grep ii)?

My next question (after those good questions) would be Do you have a
script named 'RunningX' that tests whether X is running, or did you
just copy this out of someone's sample .mailcap without adding it?

Actually, I think that would have been my first question.

 Is it allowed to use '||' in a mailcap-entry? Or is it better the way,
 the Mutt manual says on Page 5 (here the translated german version):
 # Einen laufenden Netscape-Browser fernsteuern
 text/html; netscape -remote 'openURL(%s)'; test=RunningNetscape
 # Wenn Netscape nicht läuft, aber X läuft, starte Netscape, um das
 # Objekt anzuzeigen
 text/html; netscape %s; test=RunningX

-- 
Jim Toth
[EMAIL PROTECTED]



Re: mailcap aggravation

2001-07-30 Thread Dale Morris

On Mon, 30 Jul 2001, David wrote:

 On Mon, 30 Jul 2001, Dale Morris wrote:
  I'm running debian woody and can't get mutt to open netscape for
  text/html mime types. Instead it opens the gnome help browser. I've
 
 I've been getting the same thing(debian/sid, I finally got fed up with
 it and edited /etc/mailcap by hand.  It should use /etc/mailcap.order
 but for me it doesn't seem to work.  I just added a line in /etc/mailcap
 between
 
 # - User Section Begins - #
 
 and
 
 # -  User Section Ends  - #
 
 
 I added :
 
 text/html; /usr/bin/links '%s'; needsterminal; description=HTML Text;
 nametemplate=%s.html
 

I have given up on trying to get netscape to open, too. So I hand
edited the /etc/mailcap file as you indicated above.  I'm not real
pleased with the debian mailcap setup now, here's how it works for
me..  
I open mutt and select mail from index, if it's an html mail html2text
program is executed, from there I can use urlview to get a netscape
window or else
view attachment-opens links-use links browser to do whatever? (now I
have yet another program to learn..)

sigh..




Re: mailcap aggravation

2001-07-30 Thread Andrey R. Urazov

On Mon, Jul 30, 2001 at 10:03:55AM -0400, Jim Toth wrote:
  following questions:
  Are the double-quotes allowed?
  Does netscape need a 'nametemplate=%s.html'?
  Is netscape already installed (dpkg -l | grep ii)?
 
 My next question (after those good questions) would be Do you have a
 script named 'RunningX' that tests whether X is running, or did you
 just copy this out of someone's sample .mailcap without adding it?
 
 Actually, I think that would have been my first question.
Actually, it's not hard to write it. And it's what was supposed while writing mutt 
manual.
it could look something like:
  ps -e|grep -q netscape

Yours sincerely, Andrey Urazov
-- 
Do not drink coffee in early A.M.  It will keep you awake until noon.
--
Monday, July 30, 2001, 23:14:10 +0700 - Andrey R. Urazov (mailto:[EMAIL PROTECTED])




Re: mailcap aggravation

2001-07-30 Thread David Champion

On 2001.07.30, in [EMAIL PROTECTED],
Andrey R. Urazov [EMAIL PROTECTED] wrote:
 Actually, it's not hard to write it. And it's what was supposed while writing mutt 
manual.
 it could look something like:
   ps -e|grep -q netscape

Not if you left netscape running on your console when you left your
computer, and you're logged in remotely to use mutt. I do this every
day The safest check is to talk X. You can might be able to
find standard shell tools (xlsatoms, xlsclients, etc.) that return
well-defined exit statuses under known conditions on all platforms, but
I wouldn't count on it.

Since I'm not sure this is in the archive enough times, I'll include a
one here. :) It's more friendly than is necessary.

gcc -o RunningX RunningX.c -lX11

-- 
 -D.[EMAIL PROTECTED]NSITUniversity of Chicago


#include stdio.h
#include stdlib.h
#include string.h

main(int argc, char *argv[])
{
char *d;

if (argc == 2) {
if (!strcmp(argv[1], -h)) {
fprintf(stderr, usage: %s [display-name]\n, argv[0]);
exit(1);
}
d = argv[1];
} else {
d = getenv(DISPLAY);
}

if (d)
exit(!XOpenDisplay(d));

exit(2);
}



Re: mailcap aggravation

2001-07-30 Thread Thomas Huemmler

Hi Jim,

* Jim Toth [EMAIL PROTECTED] [010730 16:15]:
 My next question (after those good questions) would be Do you have a
 script named 'RunningX' that tests whether X is running, or did you
 just copy this out of someone's sample .mailcap without adding it?
 
 Actually, I think that would have been my first question.
 
Actually not for me, because on my Debian-system this script doesn´t 
exist either, as you can see here:

thomas@hogwarts:~$ locate Running
thomas@hogwarts:~$ su
Password:
hogwarts:/home/thomas# updatedb
hogwarts:/home/thomas# exit
exit
thomas@hogwarts:~$ locate Running
thomas@hogwarts:~$

But, on the other side, my .mailcap-entries for text/html MIME-type 
work pretty well with test=RunningX:

###
## text/html
###
## X
text/html; konqueror %s; nametemplate=%s.html; test=RunningX
## Konsole
text/html; lynx %s; nametemplate=%s.html
## im Pager [im = german for: in the]
text/html; lynx -localhost -underscore -force_html -dump %s; \
copiousoutput

cu
Thomas

-- 
Thomas Hümmler * [EMAIL PROTECTED] * http://www.huemmler.de
REDAKTIONSBÜRO T.O.M. * Gsprait 1 * D-85560 Ebersberg
Phone: +49 (0 80 92) 8 38 33 Fax: +49 (0 80 92) 8 38 34
* am Kiosk: CHIP Linux-Spezial: Red Hat 7.1, CD-Brennen *