如果在打开mozilla的时候没有那个什么profile的问
如果打开了一个mozilla的窗口,然后在终端中输入mozilla回车,或者在qterm中点击链接以后都会弹出提示,说配置文件在使用等等。有没有什么办法解决这个问题啊? 写个脚本:
mozilla -remote "openurl(${@:+"$@"}, new-window)" >& /dev/null || mozilla ${@:+"$@"} 在已经打开的mozilla中用新标签浏览:
mozilla -remote "openurl(${@:+"$@"}, new-tab)" >& /dev/null || mozilla ${@:+"$@"}
firfox同样适用:
firefox -remote "openurl(${@:+"$@"}, new-tab)" >& /dev/null || firefox ${@:+"$@"} 我在水木的精华去看到过一个脚本,和这个很类似,不知道怎么用?写这个脚本,然后用这个启动mozilla? if Mozilla -remote "ping()"; then
Mozilla -remote "OpenURL($1,new-tab)"
else
Mozilla -remote "OpenURL($1,new-window)"
fi
如果没有Mozilla在运行就启动一个,如果有一个Mozilla在运行就新建一个tab页并打开指定的URL 我的也是!我开始用FC1自带的mozilla1.4时没这毛病,就在第二次打开时有,以后无论怎么打开都没有,我从网上下了mozilla1.7后想把原来的删了,用rpm -qa|grep mozilla 有mozilla1.4,但是我用rpm -e mozilla1.4删不调,找不到,然后我就直接在目录里把那个mozilla删了!在装的mozilla1.7,可每次第二次启动mozilla时总是有那个框框!为什么我在之前没这毛病而现在有了呢!?给我讲讲吧!谢谢了!
还有,麻烦 isun 换个头像吧!那个真的很吓人! :cry: 我试过,还是不行!还有那个框框!
再发一贴
搞定了mozilla的问题了,呵呵,用的是水木上一个牛牛写的shell#!/bin/sh
#
### Modified by mozaiti@smth
#
### Why modified?
### Disable the bothering select user profile.
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL.You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation.Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation.All Rights
# Reserved.
#
cmdname=`basename $0`
## don't leave any core files around
ulimit -c 0
##
## Variables
##
MOZ_DIST_BIN="/usr/local/mozilla"
MOZ_PROGRAM="/usr/local/mozilla/mozilla-bin"
MOZ_CLIENT_PROGRAM="/usr/local/mozilla/mozilla-xremote-client"
##
## Set MOZILLA_FIVE_HOME
##
MOZILLA_FIVE_HOME="/usr/local/mozilla"
export MOZILLA_FIVE_HOME
LD_LIBRARY_PATH=/usr/local/mozilla:/usr/local/mozilla/plugins:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
MOZ_PLUGIN_PATH=$MOZ_PLUGIN_PATH:/usr/local/mozilla/plugins:/usr/local/mozilla/plugins
export MOZ_PLUGIN_PATH
##
## Set FONTCONFIG_PATH for Xft/fontconfig
##
FONTCONFIG_PATH="/etc/fonts:${MOZILLA_FIVE_HOME}/res/Xft"
export FONTCONFIG_PATH
function check_running() {
$MOZ_CLIENT_PROGRAM 'ping()' 2>/dev/null >/dev/null
RETURN_VAL=$?
if [ "$RETURN_VAL" -eq "2" ]; then
echo 0
return 0
else
echo 1
return 1
fi
}
function open_mail() {
if [ "${ALREADY_RUNNING}" -eq "1" ]; then
exec $MOZ_CLIENT_PROGRAM 'xfeDoCommand(openInbox)' \
2>/dev/null >/dev/null
else
exec $MOZ_PROGRAM $*
fi
}
function open_compose() {
if [ "${ALREADY_RUNNING}" -eq "1" ]; then
exec $MOZ_CLIENT_PROGRAM 'xfeDoCommand(composeMessage)' \
2>/dev/null >/dev/null
else
exec $MOZ_PROGRAM $*
fi
}
# OK, here's where all the real work gets done
# check to see if there's an already running instance or not
ALREADY_RUNNING=`check_running`
# 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)" 2>/dev/null >/dev/null
fi
# check system locale
MOZARGS=
MOZLOCALE=`echo $LANG | sed "s|_\([^.]*\).*|-\1|g"`
[ -f $MOZILLA_FIVE_HOME/chrome/$MOZLOCALE.jar ] && MOZARGS="-UILocale $MOZLOCALE"
# 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 $MOZARGS 2>/dev/null >/dev/null
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
if [ "${RETURN_VAL}" -ne "0" ] && [ -e `pwd`/$opt ]; then
opt="`pwd`/$opt"
fi
exec $MOZ_CLIENT_PROGRAM "openurl($opt)" 2>/dev/null >/dev/null
fi
# just pass it off if it looks like a url
exec $MOZ_CLIENT_PROGRAM "openurl($opt,new-window)" 2>/dev/null >/dev/null
fi
exec $MOZ_PROGRAM $MOZARGS ${1+"$@"} 累不累啊?你在选中mozilla窗口的情况下按 Ctrl+N 新建一个。 这个脚本系统里有 上面的启动脚本先查找mozilla是否运行, 如果是,就执行
$MOZ_CLIENT_PROGRAM "openurl($opt)"
也就是在已经打开的窗口的里打开, $MOZ_CLIENT_PROGRAM 就是安装目录下的mozilla-xremote-client, $opt就是传递的url ( 如果改成$MOZ_CLIENT_PROGRAM "openurl($opt,new-tab)" 就是新建标签打开,如果后面是new-window的话就是新建窗口打开 )
后来看回firefox( 是binary包安装的) ,原来他check running之后没有这部分内容:) 哈哈
终于找到了~~~~~~~
大家看看我的问题:
[求教]+++ 关于Mozilla的配置文件的问题
--------------------------------------------------------------------------------
我使用的是RH Linux 7.3 原来自带的Mozilla是0.9.9版,可执行文件mozilla位于/usr/bin内
今天我下了一个1.7版的压缩包并解压安装,此时新的可执行文件位于/usr/local/mozilla内
为了从launcher(启动器,也就是类似于Windows中的QuickLaunch的东西)的Mozilla按钮启动1.7版的Mozilla,我将该按钮的属性中的命令改为了/usr/local/mozilla/mozilla,这个时候可以用此按钮启动新版的Mozilla 了,可是我发现当我已经打开了 一个新版Mozilla浏览器窗口后再去用此按钮开启一个新的Mozilla窗口就会弹出一个关于创建Mozilla配置文件的对话框,而且每次都是如此. 好像一个配置文件已经被一个浏览器进程独占了一样.
如果使用Ctr+N的方法开启新浏览器窗口则没有此问题.
各位朋友,如果要像原来使用0.9.9版的Mozilla那样可以用启动器的Mozilla按钮顺利打开多个Mozilla窗口应该怎么做? 配置文件到底是怎么回事?
多谢您的指教!
[email protected] 那个脚本似乎只对mozilla有效,我换了firefox就不行了,把脚本里目录都改成firefox后启动第二个firefox还是会弹出配置profile窗口 这是因为firefox目录里的也有mozilla-xremote-client, 替换配置文件中的"mozilla" 时不要把这个也替换了:) 当然没换,如果换掉连启动都启动不了
页:
[1]
2