Jump to content

Mozilla multiple windows


aze
 Share

Recommended Posts

Hi all!

There's a way to to open various mozilla windows?

Everytime I try to open new mozilla windows it ask for a new profile if another instance of mozilla is already open. I know If I press ctrl+N in navigator it will open another window. But it is unconfortable and sometimes there's just a downloading window active (not the browser) so I need to wait the download finishes to can open navigate. It really boring me! :x

Someone here know a trick to disable the new profile dialog and just open the navigator?

Thank you guys!

Link to comment
Share on other sites

i think what he's saying is he doesn't want to have to be in mozilla when he opens up another occurence. he wants to be able to do it from an icon or whatever else, but everytime he does that he gets the profile box. (so, the file->new window option is the same as the ctrl+n he mentioned-which is not what he wants).

 

basically, he wants to get rid of the "profile" thing...

 

however, i don't know the answer, just attempting to clarify his request :)

Link to comment
Share on other sites

This problem is taken care of, in Mandrake version of Mozilla, at least in Mandrake8.1.

So I assume you downloaded mozilla and installed it yourself. I did that also, and indeed, "standard" mozilla does not handle the re-use of an already-running process.

 

Here's what I did to my Mozilla1.0, so that it behaves nicely.

 

/usr/local/bin/mozilla actually is a script that calls /usr/local/lib/mozilla-1.0.0/run-mozilla.sh (adapt to your situation). In this "run-mozilla.sh" file, find the line which says

$prog ${1+"$@"}

in the moz_run_program() function.

Replace this line with:

	# ADDED BY YVES GABLIN

# try using an existing process, if mozilla-bin is called

# try being intelligent if last parameter is a path or url

mozillabin=`basename $MOZ_APPRUNNER_NAME`

if [ ! -z `echo $prog | grep -E "/${mozillabin}$"` ]; then

  # - get previous parameters

  params=""

  paramsnoremote=""

  while [ $# -gt 1 ]; do

    params="$params "$1""

    paramsnoremote="$paramsnoremote "$1""

    shift

  done

  if [ $# -gt 0 ]; then

    # transform last parameter, if applicable

    if [ ! -z "`echo $1 | grep -E '^[[:alpha:]]+:' | grep -v -E '^mailto:'`" ]; then

      # URL (ftp: http: ...)

      params="$params -remote "openurl($1,new-window)""

      paramsnoremote="$paramsnoremote "$1""

    elif [ ! -z "`echo $1 | grep -E '^[^@[:space:]]+@[^@[:space:]]+$'`" ]; then

      # e-mail address, make sure it's a URL

      params="$params -remote "mailto(`echo $1 | sed 's/^mailto://'`)""

      # switch bellow should be -compose, but some versions seem to only accept -mail...

             paramsnoremote="$paramsnoremote -mail "mailto:`echo $1 | sed 's/^mailto://'`""

    elif [ -e $1 ]; then

      # path, make sure it's a URL

      abspath=`echo $1 | sed "s|^([^/])|$PWD/1|"`

      params="$params -remote "openurl(file:$abspath,new-window)""

      paramsnoremote="$paramsnoremote "file:$abspath""

    else

      params="$params "$1""

      paramsnoremote="$paramsnoremote "$1""

    fi

    shift

  else

    #old but works:# params="-remote "openurl(about:blank,new-window)""

    params="-remote "xfeDoCommand(openBrowser)""

  fi

  if [ ! -z "`ps -u $USER | grep ${mozillabin}`" ]; then

    eval "set -- $params"

    #echo remote: "$@"

    $prog ${1+"$@"}

    if [ "$?" -ne "0" ]; then

      set --

      eval "set -- $paramsnoremote"

      #echo no remote: "$@"

      $prog ${1+"$@"}

    fi

  else

    eval "set -- $paramsnoremote"

    #echo no remote: "$@"

    $prog ${1+"$@"}

  fi

	 else

# END ADDED BY Y.GABLIN

$prog ${1+"$@"}

# ADDED BY YVES GABLIN

fi

# END ADDED BY Y.GABLIN

 

I hope this helps.

 

Yves.

 

[note:]edited for a bug correction, and some improvement.

Link to comment
Share on other sites

i think what he's saying is he doesn't want to have to be in mozilla when he opens up another occurence

oh, ok. if that's the case, then try this: create a new icon, launcher, whatever and put this as the command:

mozilla -remote "openURL(about:blank, new-window)"

replace about:blank with a url if you want something specific to open up.

 

edit: you could also do:

mozilla -remote "xfeDoCommand(openBrowser)"

Link to comment
Share on other sites

so you are running a different mozilla browser to 1.1 yes?

 

In usr/bin/ you will find a script called mozilla

 

You need to change the file paths in this script to the new ones for the newer mozilla you installed(quite a few of them).

 

What the script does is it checks to see if mozilla browser/mail/composer is open and if it is it just opens a new browser window or for mail it makes the mail window active etc..

If nothing is already open it fires up mozilla.

 

OR you could take a copy of this file and modify it and save it in a different location, then create a link to it on you desktop/taskbar so you could have both versions working like this.

Link to comment
Share on other sites

OK. I edited my first post. Now it works perfectly. You can enter:

mozilla http://someurl

mozilla ftp://someurl (and so on)

mozilla /some/hard/disk/location

mozilla file:/some/hard/disk/location

mozilla mailto:someone@somewhere

mozilla someone@somewhere

 

If mozilla is not already running, then the process starts.

If mosilla is already running, then the existing process is used, and a new window is opened.

The last parameter is analysed, to see if a URL, or e-mail, or path is recognized.

 

Yves.

Link to comment
Share on other sites

  • 5 months later...

This is the function that contains that. Its at the end, but part of something else. when I replace this, I get errors:

 

# If you are not using ddd, gdb and know of a way to convey the arguments 

# over to the prog then add that here- Gagan Saksena 03/15/00

       case `basename $debugger` in

           gdb) echo "$debugger $prog -x /tmp/mozargs$$"

               $debugger "$prog" -x /tmp/mozargs$$

 exitcode=$?

              ;;

           ddd) echo "$debugger --debugger "gdb -x /tmp/mozargs$$" $prog"

               $debugger --debugger "gdb -x /tmp/mozargs$$" "$prog"

 exitcode=$?

              ;;

           *) echo "$debugger $prog ${1+"$@"}"

               $debugger "$prog" ${1+"$@"}

 exitcode=$?

              ;;

       esac

       /bin/rm /tmp/mozargs$$

   else

       echo "Could not find a debugger on your system." 

   fi

}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...