LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-20-2003, 11:19 AM   #1
JordanH
Member
 
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360

Rep: Reputation: 30
Question Mozilla 1.5 launcher & profiles isn't working as I expect.


Hi All,

I installed mozilla 1.5 last week, however, it isn't working as I expected. Can someone please point out where I have misconfigured my mozilla 1.5?? I doubt this is a bug, it must be something on my end. Any help is appreciated.

(RH9 w/ Gnome and Mozilla 1.5)

Expected behaviour
1. Click the launcher to open a mozilla window (in a default profile, no questions asked)
2. Click the launcher again to open a second mozilla window (in the SAME default profile, no questions asked)

Actual behaviour
1. Click the launcher --> One mozilla window opens in a default profile, no questions asked.
2. Click the launcher again --> "Select user profile" dialog opens asking for me to pick a profile
3. Select the default profile --> Alert "Mozilla cannot use the profile "default" because it is in use. Please choose another profile or create a new one." OK
4. Click OK, create a new profile.
5. Create Profile --> No errors.
6. At Select User Profile dialog, choose new profile --> opens newly created profile.
7. Repeat from step 2 for every new mozilla session

Apparently I need a new profile for every launcher click... that is so not cool because I can't even link to mozilla from other applications if I already have a mozilla session open! Arg. What have I misconfigured?

Oh yes, one more note; If I <ctrl>-N from an existing mozilla session, a new window is created as expected.
_________________
 
Old 10-21-2003, 03:30 AM   #2
Thewyzewun
Member
 
Registered: Sep 2003
Location: London, UK
Distribution: Mandrake 9.1
Posts: 83

Rep: Reputation: 15
This is because every time you open Mozilla you open a duplicate of the whole program into your RAM, rather than just pressing Ctrl-N and opening a new window (much more efficient). If you are having problems linking from other programs you might want to get Netscape instead (www.netscape.com probably) since it is much better supported.
 
Old 10-21-2003, 05:38 PM   #3
JordanH
Member
 
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360

Original Poster
Rep: Reputation: 30
Wyze, almost but not quite.

When I ran my last version of mozilla (errr, 1.4.?) with the exact same command, re-launching the application just opened up a new session (not another new instance of the whole program). However, in 1.5, it appears that it *IS* trying to open up a whole new program instance.

Yes, because I am more keyboard adept than mouse apt, I usually use ctrl-n... however, when I'm browsing and I'm all like clikkityclikkity-wwdotw.com I like to use just the mouse... My middle button opens tabs, but I want a one-click option to open a separate window.. the launcer SHOULD do it like in v1.4.?

I appreciate your reply but using another application is not an answer I'll accept. Any other suggestions about why the behaviour changed? I suspect it's something *I* did.
 
Old 10-22-2003, 06:13 AM   #4
Thewyzewun
Member
 
Registered: Sep 2003
Location: London, UK
Distribution: Mandrake 9.1
Posts: 83

Rep: Reputation: 15
You could always amend the launcher to open a new window rather than new session. I'm not sure how to tho, since I'm at college and thus at a Windows terminal at the moment
 
Old 10-22-2003, 05:47 PM   #5
JordanH
Member
 
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360

Original Poster
Rep: Reputation: 30
That's exactly what I want to do but don't know how.

Furthermore... I just installed Firebird and it appears to have the same behaviour as v1.5! oohh NO!

Last edited by JordanH; 10-22-2003 at 06:35 PM.
 
Old 10-22-2003, 08:35 PM   #6
JordanH
Member
 
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360

Original Poster
Rep: Reputation: 30
I love the smell of napalm in the morning, it smells like... Victory.

[edit: added note]
[edit 2: Change script to allow other programs to pass Args.]

Ok, here is what I had to do to get this thing working the way I wanted. I had to use two mozilla command line options to get this going.
In general form they are:
mozilla -remote "OpenURL(<url>, new-window)"
mozilla -remote ping
* note: Mozilla and MozillaFirebird handle the -remote "OpenU ... w)" command differently if <url> is left blank. Mozilla uses the homepage and FireBird leaves you in a blank screen.


The first opens a new window with the specificed URL and the second writes a message to std-err to notify the user if there is an existing open window. We need the latter because the -remote option just craps out if there isn't a browser window open to begin with.

To use the script, copy the text below into a file called /usr/local/bin/moz and make sure you modify the moz variable to point to your mozilla script. You can then use the moz command in your launchers.

#!/bin/sh
# Mozilla startup script
# I had issues with the way Mozilla spawned new windows. Fortunately,
# they gave us the ability to ping remote windows to see if any were open.
# They also let us spawn a new window from the existing session. yay.
# It's unfortunate that they didn't build this in automatically...
#
# Author: jordan_harkness@hotmail.com
# Files : /usr/local/bin/moz
# Usage : moz &

# Point this to your REAL script that runs mozilla
moz="/usr/lib/mozilla/mozilla"

isRunning=`2>&1 $moz -remote ping`
case $isRunning in
# Start a new mozilla session
"No running window found." )
$moz "$*"
;;

# Spawn a new mozilla window from the existing session
"Failed to send command." )
$moz -remote "OpenURL ( "$*" , new-window)"
;;

# Dude, something's wrong.
* )
echo "This was the return value: $isRunning"
echo "d'oh"
;;
esac

Last edited by JordanH; 10-22-2003 at 08:52 PM.
 
Old 12-09-2003, 07:53 AM   #7
costasm
Member
 
Registered: Dec 2002
Posts: 71

Rep: Reputation: 15
Jordan,

I am using your script and it works. The defaults web page does not come up. I was wondering if you had any idea how to fix it.

I tried finding where MozillaFB stores its configurations.

They are ~/.phoenix/default/*/lock /prefs.js (of all the weird places. What was wrong with .firebird). Anyhow the .js file is javascript. I guess you would have to execute the .js file.

Costas
 
Old 12-09-2003, 09:20 AM   #8
JordanH
Member
 
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360

Original Poster
Rep: Reputation: 30
My observation from my previous post was this,
Quote:
* note: Mozilla and MozillaFirebird handle the -remote "OpenU ... w)" command differently if <url> is left blank. Mozilla uses the homepage and FireBird leaves you in a blank screen.
The default web page seems to only open up on first load. Why did they choose this behaviour? I don't know.
The home page is stored in prefs.js but you aren't supposed to edit that file by hand... check out this link for more info,http://www.mozilla.org/unix/customizing.html#prefs

The other option (kludge) is to adjust my script so that if there is no parameter specified, then it would fill in a default value. That is not a good solution for a multi-user system but if you are the only user then it might keep you satisfied until you find a real fix.

Please keep us posted on your progress because I am interested in the result as well.
J.
 
Old 12-09-2003, 10:46 AM   #9
costasm
Member
 
Registered: Dec 2002
Posts: 71

Rep: Reputation: 15
I looked at their page.

Are you talking about changing this line?

$moz -remote "OpenURL ( "$*" , new-window)"

Actually I thought maybe we can change the $* to be an optional parameter passed to the script

Just for my Bash understanding:
What does the following mean?

isRunning=`2>&1 $moz -remote ping`

I know your are pinging FB to find out if loaded but
specifically what does 2>&1 do?

Thanks
 
Old 12-09-2003, 11:45 AM   #10
JordanH
Member
 
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360

Original Poster
Rep: Reputation: 30
2>&1 redirects the output from std-err to std-out.

Now why did I do that? Well, when I did -remote ping, the response returned on std-err but for me to capture it, I needed it on std-out. So.... I redirected std-err to std-out and voila, I now had my value for my isRunning flag.
 
  


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
Launcher for mozilla Ascis Linux - Newbie 3 08-03-2004 04:54 PM
Mozilla Addressbook Launcher Cr4wford Linux - Software 6 10-30-2003 10:12 PM
Mozilla/Netscape Profiles Twiggy794 Linux - Software 1 09-27-2003 10:54 PM
Mozilla Profiles Tenover Linux - Newbie 4 09-04-2003 04:29 PM
Mozilla update, now launcher = no function! jabbermacy Linux - Newbie 3 05-21-2003 06:46 PM


All times are GMT -5. The time now is 02:23 AM.

Main Menu
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