LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 05-27-2004, 07:56 PM   #1
shellcode
Member
 
Registered: May 2003
Location: Beverly Hills
Distribution: Slackware, Gentoo
Posts: 350

Rep: Reputation: 31
dumb firefox problem


hi. i want to use firefox to view html-emails in mutt. firefox cant normally open itself more than once so here's what i tried. /opt/firefox/firefox is the actual firefox executable.

/usr/bin/firefox:
Code:
#!/bin/sh
/usr/bin/Firefox $* 1>&2 2>/dev/null
/usr/bin/Firefox:
Code:
#!/bin/sh 
/opt/firefox/firefox -remote 'ping()' 
if [ $? -eq 0 ]; then 
#open a new window 
/opt/firefox/firefox -remote "openURL(${1}, new-window)"&
else 
#open new instance 
/opt/firefox/firefox $1&
fi
this allows me to run 'firefox' in any command line and to open up a new instance of Mozilla Firefox without any pointless output. now the problem is when i want to view html mail in mutt. i added this line to my /etc/.mailcap:
text/html;firefox %s

HOWEVER
when mutt tries to load the html mail with firefox, i get a firefox error message:
"The File /tmp/muttXXXXXX cannot be found. Please check the location and try again."

if i just had this in /etc/.mailcap:
text/html;/opt/firefox/firefox %s

it works, but then i cant view html mail and browse the web at the same time.

i know this seems dumb but i've been struggling with it for some time. i just cant get mutt to tell firefox to open up the proper window.

ideas?

Last edited by shellcode; 05-27-2004 at 07:58 PM.
 
Old 05-28-2004, 02:04 AM   #2
beerwulf
LQ Newbie
 
Registered: Apr 2004
Location: Australia
Distribution: SuSE 9.0 'Technology Evaluation'
Posts: 10

Rep: Reputation: 0
Keep in mind that Firefox 0.8 is a 'Technology Preview' (beta version), and as such they "make no guarantees of its performance or stability".

If you really wanted, you could report the issue so the developers are aware of it. See http://www.mozilla.org/products/firefox/releases/ for information. (Especially the "Please read these notes and the bug filing instructions before reporting any bugs to Bugzilla" part).
 
Old 05-28-2004, 02:19 AM   #3
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480 N, 95.3690 W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 45
Since your using Mutt you may want to check out urlview. There is a section on it on this page
http://www.starnetok.net/~jallen/tutorials/exim.html
 
Old 05-28-2004, 02:37 AM   #4
shellcode
Member
 
Registered: May 2003
Location: Beverly Hills
Distribution: Slackware, Gentoo
Posts: 350

Original Poster
Rep: Reputation: 31
hmm. urlview just extracts url's though. what i need is something that will view an entire HTML email (yes, i hate them too but you just cant convince some people to not send them). my system should work though if it werent for that damn firefox error message. is something wrong with /usr/bin/firefox or /usr/bin/Firefox scripts?? im gonna wait a bit for more replies before reporting this as a bug.

thanks.
 
Old 05-28-2004, 02:42 AM   #5
hallamigo
Member
 
Registered: Feb 2004
Location: Utah, USA
Distribution: Debian
Posts: 230

Rep: Reputation: 31
It may be your script - here is what I run (although I don't use mutt nor a mail client.)

Code:
#!/bin/sh

# find pid of running firefox, if any
PID=`ps -ef | grep $UID | grep /usr/local/firefox/firefox-bin | grep -v "grep" | awk '{print $2}'`

# if firefox is not running, start normally
if [ $PID="" ]; then
    /usr/local/firefox/firefox $1
else
    /usr/local/firefox/firefox -remote "openurl( $1, new-window )"
fi
 
Old 05-29-2004, 12:01 AM   #6
shellcode
Member
 
Registered: May 2003
Location: Beverly Hills
Distribution: Slackware, Gentoo
Posts: 350

Original Poster
Rep: Reputation: 31
Quote:
Originally posted by hallamigo
It may be your script - here is what I run (although I don't use mutt nor a mail client.)

Code:
#!/bin/sh

# find pid of running firefox, if any
PID=`ps -ef | grep $UID | grep /usr/local/firefox/firefox-bin | grep -v "grep" | awk '{print $2}'`

# if firefox is not running, start normally
if [ $PID="" ]; then
    /usr/local/firefox/firefox $1
else
    /usr/local/firefox/firefox -remote "openurl( $1, new-window )"
fi
that doesn't seem to work. and even if it did, it would either way end up running the firefox executable with $1. plus it seems like bloat to have to run ps, grep, and awk everytime i want to start up a browser. thanks for the help though.

any more ideas?
 
Old 05-29-2004, 12:04 AM   #7
shellcode
Member
 
Registered: May 2003
Location: Beverly Hills
Distribution: Slackware, Gentoo
Posts: 350

Original Poster
Rep: Reputation: 31
update: i got it working by changing /usr/bin/Firefox to this:

Code:
#!/bin/sh 
/opt/firefox/firefox -remote 'ping()' 
if [ $? -eq 0 ]; then 
#open a new window 
/opt/firefox/firefox -remote "openURL(${1}, new-window)"
else 
#open new instance 
/opt/firefox/firefox $1
fi
i removed the output-supressing ampersand from the calls to /usr/bin/firefox. it works now but i get the same error when there is already a firefox window running. this is better than before when it would give an error whether or not firefox was running. working on it...

Last edited by shellcode; 05-29-2004 at 12:07 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Really dumb problem! raid517 Linux - Software 1 03-24-2005 08:17 PM
User managment problem / dumb question xedios Linux - Software 1 12-10-2004 07:52 AM
Dumb Newbie - lost linux partition + BIOS problem? BlendedRacer Linux - Newbie 2 06-28-2004 10:23 PM
Dumb newbie issue: firefox-0.8 cant run after installed... michelbehr Linux - Software 16 03-30-2004 01:08 AM
dumb linux mousewheel problem phliver Linux - General 2 04-11-2002 04:22 AM


All times are GMT -5. The time now is 03:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration