• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Firefox öffnet sich zweimal?!?

Hallo
Wenn ich z.B. im Kopete einen Link gesendet bekomme, und diesen anklicke, öffnen sich 2 Versionen vom Firefox...wobei eine sofort die Seite anzeigt und die andere nach einiger Zeit einfach wieder zu geht...
Woran liegt daS?

Und wie kann ich Firefox dauerhaft maximiert starten lassen?

THX
 
dasselbe Problem hab ich auch, es tritt bei mir immer dann auf, wenn bereits ein firefox geöffnet ist und ich, z.B. in der Kontrollleiste einen zweiten Firefox Fenster öffne. Das Prob besteht bei mir erst seit meinem Update von 9.1 auf 9.2. Das nervige daran ist, dass in der Zeit, in der das zuviel geöffnete Fenster arbeitet, der browser hängt für einige sec
 
OP
H

Hannibal19xx

Member
Naja, ich sehs eben schon, und das nachladen dauert leider sehr lange...in der zeit habe ich ganz locker den text bis hierhin getippt...
 

flieger28

Newbie
und ich habe auch eine Lösung gefunden!!!
Also es gibt für den Firefox eine Knowledge Base und da ist genau beschrieben wie es geht.
Man kann eine Zeile in der firefox.sh ändern und dann sollte es ohne Probleme gehen.
Ich würde ja gerne die Beschreibung posten, aber im moment ist das nicht möglich da die Seite sich weigert!

Also hier der Link:
http://kb.mozillazine.org/index.phtml?title=Mozilla_Firefox
Wie gesagt, bei mir ging die Seite vor 5 Minuten noch, aber im moment nicht mehr. .....Jetzt geht es wieder genauer Link
http://kb.mozillazine.org/Setting_Your_Default_Browser
Ein wenig englisch können ist von vorteil.
Und unter Misc.... steht dann wie man unter anderem unter Linux den Browser zum Standard macht.
Als erstes soll man die Datei firefox.sh mittels editor ändern. Und zwar die Zeile
Code:
_remote_cmd="openURL(${_optLast})"
durch
Code:
_remote_cmd="openURL(${_optLast},new-tab)"

Und danach noch
Code:
#  Open kcontrol (KDE configuration center)
# Select components -> components chooser
# Open the "web browser" component
# Check "the following browser" and type in "firefox" (or the name of your firefox startup command)

Nach dem ich in KDE unter Komponenten firefox angegeben hatte (siehe "select components") und zusätzlich das start-script geändert hatte, wurden bei mir externe Links in einem neuen Tab geöffnet. Ohne das lästige 2. Fenster.

Hoffe das hilft!!!

Gruss
 
OP
H

Hannibal19xx

Member
THX für die Hilfe, aber das hier: _remote_cmd="openURL(${_optLast})" kann er bei mir leider in der Datei nicht finden :(
 

oc2pus

Ultimate Guru
Code:
#!/bin/sh
 
# firefox
# A script to make firefox do what its supposed to do by default and doesn't
#
 
FOX_HOME=/opt/MozillaFirefox
 
#Is firefox running?
$FOX_HOME/firefox -a firefox -remote 'ping()'
 
if [ $? -eq 0 ]; then   # Yep.. Open a new tab / window
#	$FOX_HOME/firefox -a firefox -remote "openurl($1,new-window)"&
	$FOX_HOME/firefox -a firefox -remote "openurl($1,new-tab)"&
else # Nope.. Open new firefox
	$FOX_HOME/firefox $1 &
fi

das script nach /usr/bin/firefox speichern
evtl den Pfad $FOX_HOME anpassen (da wo firefox installiert ist!)
mit chmod +x /usr/bin/firefox ausführbar machen
und dann mit firefox aufrufen.
 
OP
H

Hannibal19xx

Member
Leider habe ich von Scripts absolut keine Ahnung...welchen Namen und welche Endung soll das ganze denn bekommen?

Und muss ich es dann nur einmal aufrufen und Firefox ist "geheilt"?
 
OP
H

Hannibal19xx

Member
kann mir wirklich niemand mehr helfen :(

Edit:

Code:
#!/bin/sh
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation.  Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): 
#    Wolfgang Rosenauer <wolfgang.rosenauer@suse.com>
#

## 
## Usage:
##
## $ mozilla
##
## This script is meant to run a mozilla program from the mozilla
## rpm installation.
##
## The script will setup all the environment voodoo needed to make
## mozilla work.

cmdname=`basename $0`

## don't leave any core files around
ulimit -c 0

##
## Variables
##
MOZ_DIST_BIN="/opt/MozillaFirefox"
MOZ_DIST_LIB="/opt/MozillaFirefox/lib"
MOZ_APPNAME="firefox"
MOZ_PROFILE=".mozilla/firefox"
MOZ_PROGRAM="$MOZ_DIST_LIB/$MOZ_APPNAME-bin"
MOZ_CLIENT_PROGRAM="$MOZ_DIST_LIB/mozilla-xremote-client -a $MOZ_APPNAME"

# workaround for bug #246313
if [ "$MOZ_APPNAME" = "firefox" ]; then
  if [ ! -d $HOME/.mozilla/firefox ]; then
    export XRE_IMPORT_PROFILES=1
  fi
fi

# enigmail should honor env
export ENIGMAIL_PASS_ENV=http_proxy

# MOZ_NEWURL can be 
#  overwrite   for loading new URLs in active windows
#  new-window  for opening new windows (default)
#  new-tab     for opening URL in a new tab
if [ -z "$MOZ_NEWURL" ]; then
  MOZ_NEWURL="new-window"
fi

if [ -z "$MOZ_DEBUG" ]; then
  DEBUG=0
else
  DEBUG=$MOZ_DEBUG
fi 


##
## Set MOZILLA_FIVE_HOME
##
MOZILLA_FIVE_HOME="$MOZ_DIST_LIB"
export MOZILLA_FIVE_HOME

##
## Set LD_LIBRARY_PATH
##
if [ "$LD_LIBRARY_PATH" ]
then
  LD_LIBRARY_PATH=$MOZ_DIST_LIB/plugins:$MOZ_DIST_LIB:$LD_LIBRARY_PATH
else
  LD_LIBRARY_PATH=$MOZ_DIST_LIB/plugins:$MOZ_DIST_LIB
fi
export LD_LIBRARY_PATH

## Make sure that we set the plugin path for backwards compatibility
## Set MOZ_PLUGIN_PATH to $HOME/.mozilla/plugins if not set
##
if [ -z "$MOZ_PLUGIN_PATH" ]; then
  export MOZ_PLUGIN_PATH=$MOZILLA_FIVE_HOME/plugins
  if [ "$HOME" ] ; then
    export MOZ_PLUGIN_PATH=$HOME/$MOZ_PROFILE/plugins:$MOZ_PLUGIN_PATH
  fi
fi

## 
## Autodetect UI language
##
grep -q $HOME/$MOZ_PROFILE $HOME/$MOZ_PROFILE/appreg > /dev/null 2>/dev/null
SET_LANG=$?
if [ "$HOME" -a "$LANG" -a "$SET_LANG" != "0" -a -r "$MOZILLA_FIVE_HOME/chrome/locale.alias" ]; then
    MOZ_LANG=`grep -E "^$LANG[[:space:]]" $MOZILLA_FIVE_HOME/chrome/locale.alias | tr -s "[:blank:]" | cut -f 2`
    for i in "$@";do
        [ "$i" = "-UILocale" ] && MOZ_LANG=""
    done
    if [ "$MOZ_LANG" -a -r "$MOZILLA_FIVE_HOME/chrome/$MOZ_LANG.jar" ]; then
       MOZ_LANG="-UILocale $MOZ_LANG"
    else
       unset MOZ_LANG
    fi
fi

function check_running() {
    $MOZ_CLIENT_PROGRAM 'ping()' 2>/dev/null >/dev/null
    RETURN_VAL=$?
    
    if [ $RETURN_VAL -eq 2 ]; then
      # not running
      echo 0
      return 0
    elif [ $RETURN_VAL -eq 1 ]; then
      # DISPLAY unusable
      echo 2
      return 2
    else
      # running
      echo 1
      return 1
    fi
}

function open_mail() {
    if [ ${ALREADY_RUNNING} -eq 1 ]; then
      exec $MOZ_CLIENT_PROGRAM 'xfeDoCommand(openInbox)'
    else
      exec $MOZ_PROGRAM "$@"
    fi
}

function open_compose() {
    if [ ${ALREADY_RUNNING} -eq 1 ]; then
      MAILTO=`echo $2 | awk 'BEGIN{FS=":"} $1 ~ /mailto/ {print $2}'`
      exec $MOZ_CLIENT_PROGRAM "mailto($MAILTO)"
    else
      exec $MOZ_PROGRAM "$@"
    fi
}


# check to see if there's an already running instance or not
ALREADY_RUNNING=`check_running`

if [ ${ALREADY_RUNNING} -eq 2 ]; then
  echo "DISPLAY empty or unusable"
  echo "DISPLAY=$DISPLAY"
  exit 1
fi

# debugging output
if [ $DEBUG -ne 0 ]; then
  echo "DEBUG:"
  echo "      MOZ_APPNAME=$MOZ_APPNAME"
  echo "      MOZ_PROFILE=$MOZ_PROFILE"
  echo "MOZILLA_FIVE_HOME=$MOZILLA_FIVE_HOME"
  echo "  LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
  echo "          DISPLAY=$DISPLAY"
  echo "  FONTCONFIG_PATH=$FONTCONFIG_PATH"
  echo "         MOZ_LANG=$MOZ_LANG"
  [ ${ALREADY_RUNNING} -eq 1 ] && \
    echo "using an already running Mozilla"
fi


# If there is no command line argument at all then try to open a new
# window in an already running instance.
if [ ${ALREADY_RUNNING} -eq 1 ] && [ -z "$1" ]; then
  exec $MOZ_CLIENT_PROGRAM "xfeDoCommand(openBrowser)"
fi

# if there's no command line argument and there's not a running
# instance then just fire up a new copy of the browser
if [ -z "$1" ]; then
  exec $MOZ_PROGRAM $MOZ_LANG
fi

unset RETURN_VAL

# If there's a command line argument but it doesn't begin with a -
# it's probably a url.  Try to send it to a running instance.

USE_EXIST=0
opt="$1"
case "$opt" in
  -mail)
      open_mail ${1+"$@"}
      ;;
  -compose)
      open_compose ${1+"$@"}
      ;;
  -*) ;;
  *) USE_EXIST=1 ;;
esac

if [ ${USE_EXIST} -eq 1 ] && [ ${ALREADY_RUNNING} -eq 1 ]; then
  # check to make sure that the command contains at least a :/ in it.
  echo $opt | grep -e ':/' 2>/dev/null > /dev/null
  RETURN_VAL=$?
  if [ $RETURN_VAL -eq 1 ]; then
    # if it doesn't begin with a '/' and it exists when the pwd is
    # prepended to it then append the full path
    echo $opt | grep -e '^/' 2>/dev/null > /dev/null
    RETURN_VAL=$?
    if [ ${RETURN_VAL} -ne 0 ] && [ -e "`pwd`/$opt" ]; then
      opt="`pwd`/$opt"
    fi
  fi
  if [ "$MOZ_NEWURL" = "new-window" -o "$MOZ_NEWURL" = "new-tab" ]; then 
    $MOZ_CLIENT_PROGRAM "openurl($opt,$MOZ_NEWURL)" || \
       exec $MOZ_PROGRAM $MOZ_LANG "$opt"
    exit 0
  else
    $MOZ_CLIENT_PROGRAM "openurl($opt)" || \
       exec $MOZ_PROGRAM $MOZ_LANG "$opt"
    exit 0
  fi
fi

if [ ${USE_EXIST} -eq 1 ]; then
  echo $opt | grep -e ':/' 2>/dev/null > /dev/null
  RETURN_VAL=$?
  if [ $RETURN_VAL -eq 1 ]; then
    echo $opt | grep -e '^/' 2>/dev/null > /dev/null
    RETURN_VAL=$?
    if [ $RETURN_VAL -ne 0 ] && [ -e "`pwd`/$opt" ]; then
      opt="`pwd`/$opt"
    fi
  fi
  exec $MOZ_PROGRAM $MOZ_LANG "$opt"
else
  exec $MOZ_PROGRAM $MOZ_LANG ${1+"$@"}
fi
Habe ich das ganze etwa irgendwo übersehen?
 

Maingano

Newbie
Hallo !!

Du kannst versuchen unter "Eigenschaften" der Desktopverknüpfung im TAB "Programme" unter "Erweiterte Optionen" die "Startrückmeldung" zu deaktivieren.

Gruß

Maingano
 

Leon1A

Newbie
Code:
 MOZ_NEWURL="new-window"

änder mal die Zeile mit

Code:
 MOZ_NEWURL="new-tab"

das habe ich gemacht.
und es funzt

sonst brauchst du nix machen.

Hier war wieder mal Suse am Werk, und hat das Script geändert.
Deswegen passt die Anleitung von mozilla.org nicht.
 
Oben