LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-12-2004, 05:41 PM   #1
cb9fl
Member
 
Registered: Oct 2003
Posts: 64

Rep: Reputation: 15
Mozilla to firefox


I'm running slack9.1 and fluxbox. Sometimes boot into dropline to let it update packages.

Right now I'm on mozilla 1.6 and can open mozilla from the cmd line. If I try to open another instance of mozilla from the cmd line not in a tabbed window it works fine. However if I try to do the same with firefox I get an error about my profile already being in use.

How can I find out exactly what file is being called from the cmd line when I type "mozilla &"? I would like to find out how I can make firefox do the same thing where I can open it multiple times from the console without getting a profile in use error.

Also can I integrate thunderbird into firefox so I have an icon for it to check my mail?
 
Old 03-12-2004, 05:58 PM   #2
Kovacs
Member
 
Registered: Jul 2003
Distribution: FreeBSD 8.2 RELEASE
Posts: 607

Rep: Reputation: 32
As far as the profile thing is concerned, firefox won't let you load two separate instances of firefox with the same profile. To get around it, use this shell script to start firefox, instead of starting the executable directly:

Code:
#! /bin/sh

# find pid of running moz, if any, for current user
PID=`ps -ef | grep $USER | grep firefox-bin |\
grep -v "grep" | awk '{print $2}'`

# if moz is not running, start normally
if [ $PID="" ]; then
/path/to/firefox/executable $1;

# otherwise, open url in a new window
else
/path/to/firefox/executable -remote "openurl($1,new-tab)";
fi
This checks your process list to see if firefox is already running, and if it is then it opens a new tab in the already running window. You can make it open a new window instead by changing the "new-tab" part to "new-window", personally I like to keep everything in the one window though. You'll need to change your path to the firefox executable as well. In your firefox directory there is both a firefox and a firefox-bin executable, point the script to the plain firefox one. When you are configuring other apps to open a browser window, point them at this script rather than directly at your firefox executable.

Last edited by Kovacs; 03-12-2004 at 06:00 PM.
 
Old 03-12-2004, 06:02 PM   #3
cb9fl
Member
 
Registered: Oct 2003
Posts: 64

Original Poster
Rep: Reputation: 15
So copy that and save it as firefox.sh or something?

Also how do I find out what file is opened when I type "mozilla &" at the console?
 
Old 03-12-2004, 06:07 PM   #4
Kovacs
Member
 
Registered: Jul 2003
Distribution: FreeBSD 8.2 RELEASE
Posts: 607

Rep: Reputation: 32
I save mine as run-firefox.sh and chmod 755 it.

For the mozilla thing, try:

ps -aux | grep mozilla

to get the running mozilla processes, or probably just

which mozilla

to get the location of the mozilla executable that starts when you type in "mozilla."

You'll probably get a couple of different lines for the processes, I don't know about Mozilla but Firefox seems to use it's own wrapper script to start itself.
 
Old 03-14-2004, 10:59 AM   #5
sleet
LQ Newbie
 
Registered: Nov 2003
Posts: 1

Rep: Reputation: 0
Thanks for this script, it's really useful ! Yet, i get this message when i run it :

line 8: [: 2383: unary operator expected

Though it works fine, i wonder what this error is ?
 
Old 03-15-2004, 08:31 PM   #6
warren1715
LQ Newbie
 
Registered: Mar 2004
Location: Alabama
Distribution: OpenSuse 15.4
Posts: 9

Rep: Reputation: 3
firefox - new window

I wrote this to solve that problem. I start firefox-agent instead of firefox for all browser applications. You may need to make slight changes to match your system

--UPDATED for version 0.9.1--

#!/bin/sh
#
# Script name: /usr/bin/firefox-agent
# Launches firefox in a new window (or tab)
# Written by *****. License 'GPL'
#
# Tested on firefox 0.9.1 using mandrake 10.0
#
PIDOF='/sbin/pidof' # Location of 'pidof' program
DIST_BIN='/usr/local/firefox' # where firefox is installed
WINDOWTYPE='new-window' # Use 'new-window' or 'new-tab', your preference
#
# You should not need to change below.
#
PREFS="${HOME}/.mozilla/firefox/`ls ${HOME}/.mozilla/firefox | grep default | sed -e 's/\///g'`/prefs.js"
MOZ_CLIENT_PROGRAM=$DIST_BIN/mozilla-xremote-client
BROWSER='firefox-bin'
HOMEURL=`cat $PREFS | grep -e \"browser.startup.homepage\" | sed -e 's/\(.*\,\ \"\)\(.*\)\(\".*\)/\2/g'`
#
if test "`$PIDOF $BROWSER`" = "" ; then
exec $DIST_BIN/firefox "$1"
else
if test "$1" = "" ; then
exec $MOZ_CLIENT_PROGRAM -a firefox "openURL("$HOMEURL",$WINDOWTYPE)"
else
exec $MOZ_CLIENT_PROGRAM -a firefox "openURL("$1",$WINDOWTYPE)"
fi
fi

Last edited by warren1715; 07-07-2004 at 06:06 PM.
 
  


Reply



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
Mozilla flaws could allow attacks, data access into Firefox & Mozilla web browsers! t3gah Linux - Security 6 04-09-2006 04:00 AM
Mozilla Firefox HELP!!! webwally Linux - Newbie 7 03-24-2005 03:27 PM
Mozilla Firefox and Mozilla Thunderbird FireInTheDark Linux - Software 3 08-14-2004 11:52 AM
Mozilla and Firefox XPediTioN Mandriva 1 03-06-2004 03:55 PM
Why should i use firefox instead of mozilla? Braveheart1980 Linux - Software 8 02-24-2004 11:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:29 AM.

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
Open Source Consulting | Domain Registration