MozTW 討論區

各項 Mozilla 相關軟體與技術討論
現在的時間是 2025-08-20, 14:41

所有顯示的時間為 UTC + 8 小時





發表新文章 回覆主題  [ 2 篇文章 ] 
發表人 內容
文章發表於 : 2004-05-22, 16:22 
當有一個以上的firefox執行時,就會出現檔案管理員,且不能開啟firefox
除非我另外再新增一個個人設定檔。
在wiwodns中使用firefox並不會有這個問題,在我點選連結時,firefox會乖乖的依照我的設定,用新的tab開啟新的連結,例如我點選bbs軟體上的連結時。
我希望可以改正我的linux中的firefox的這個問題,請問我該怎麼做?
red hat 9
firefox 0.8


回頂端
  
引用回覆  
 文章主題 :
文章發表於 : 2004-06-28, 22:08 
#!/bin/sh
if /usr/local/firefox/firefox -a firefox -remote 'ping()' 2>/dev/null
then
echo "Firefox already launch"
exec /usr/local/firefox/firefox -a firefox -remote "openURL($1/, new-tab)"
else
exec /usr/local/firefox/firefox -a firefox $1
fi
exit 1


原文:
From: maxo <maxo@NOSPAMhome.se>
Subject: SOLUTION Firefox 0.9 Linux remote script (how to make default browser)
User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table)
Message-Id: <pan.2004.06.17.03.13.07.166540@NOSPAMhome.se>
Newsgroups: alt.fan.mozilla,alt.os.linux,alt.os.linux.redhat,alt.os.linux.mandrake,comp.os.linux.redhat,linux.redhat.misc
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Lines: 66
Date: Thu, 17 Jun 2004 03:14:29 GMT
NNTP-Posting-Host: 207.69.50.165
X-Complaints-To: abuse@earthlink.net
X-Trace: newsread2.news.pas.earthlink.net 1087442069 207.69.50.165 (Wed, 16 Jun 2004 20:14:29 PDT)
NNTP-Posting-Date: Wed, 16 Jun 2004 20:14:29 PDT
Organization: EarthLink Inc. -- http://www.EarthLink.net


I know this is heavily cross posted, but it seemed like a important enough
thing. ;) :D

For the not so tech savvy: this is how to tell your desktop environment to
launch Firefox when needed from another program, or if it's already
launched, to open a new tab with the requested URL.

Any other Linux users having problems with -remote, I came across a solution on the Firefox Bugs forum.

Before:

CODE
code:
firefox -remote 'ping()'
firefox -remote 'openURL(http://www.somethingawful.com/, new-tab)'



After:

CODE
code:
firefox -a firefox -remote 'ping()'
firefox -a firefox -remote 'openURL(http://www.somethingawful.com/, new-tab)'



In practice you would create a script like this and tell either KDE or
Gnome to use it as the default browser, I call mine .firefox.sh and put it
in my home directory.

this would work for Firefox 0.8 or earlier

#!/bin/sh
MOZILLA="/usr/bin/firefox"
if $MOZILLA -remote "ping()" 2>/dev/null
then
echo "Mozilla already launch"
location=",new-tab"
exec $MOZILLA -remote "openURL($1$location)"
else
exec $MOZILLA "$@"
fi
exit 1


For Firefox 0.9 you would use this

#!/bin/sh
MOZILLA="/usr/bin/firefox"
if $MOZILLA -a firefox -remote "ping()" 2>/dev/null
then
echo "Mozilla already launch"
location=",new-tab"
exec $MOZILLA -a firefox-remote "openURL($1$location)"
else
exec $MOZILLA "$@"
fi
exit 1


I hope this helps.

:D


回頂端
  
引用回覆  
顯示文章 :  排序  
發表新文章 回覆主題  [ 2 篇文章 ] 

所有顯示的時間為 UTC + 8 小時


誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 73 位訪客


不能 在這個版面發表主題
不能 在這個版面回覆主題
不能 在這個版面編輯您的文章
不能 在這個版面刪除您的文章
不能 在這個版面上傳附加檔案

搜尋:
前往 :  
Powered by phpBB® Forum Software © phpBB Group
正體中文語系由 竹貓星球 維護製作
© moztw.org, Mozilla Foundation
MozTW,Mozilla 台灣社群