史萊姆論壇

返回   史萊姆論壇 > 專業主討論區 > 網路疑難應用技術研討區
忘記密碼?
論壇說明

歡迎您來到『史萊姆論壇』 ^___^

您目前正以訪客的身份瀏覽本論壇,訪客所擁有的權限將受到限制,您可以瀏覽本論壇大部份的版區與文章,但您將無法參與任何討論或是使用私人訊息與其他會員交流。若您希望擁有完整的使用權限,請註冊成為我們的一份子,註冊的程序十分簡單、快速,而且最重要的是--註冊是完全免費的!

請點擊這裡:『註冊成為我們的一份子!』

Google 提供的廣告


 
 
主題工具 顯示模式
舊 2004-07-24, 12:56 AM   #5 (permalink)
pardai
榮譽勳章

勳章總數
UID -
在線等級:
文章: n/a
精華:
預設 Re: Redhat Fedora Core 2的小問題和架站問題

引用:
原文由 夏天的約定 所發表
1.mozilla的問題。小弟根據本篇文章http://apt.nc.hcc.edu.tw/FC2_X/05_mo...re/mozilla.htm
調整後。想再第二個瀏覽器都會出現這樣子的對話。請問這是怎麼了呢?
一直增加新的使用檔。要怎麼取消呢?
http://home.pchome.com.tw/love/5xz/45.JPG
這問題上 Google 找到的回覆是
語法:
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
然後我換湯不換藥的改為
語法:
#!/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
最粗淺的作法:
1. 開一個文字檔案命名為 firefox.sh。
2. 將上面短的那組 CODE 完整貼入。
3. 將 firefox.sh 改為可執行。
4. 將 Mozilla Firefox 的圖示指向 firefox.sh。
5. 照常使用,但不會出現要你新增 Profile 的狀況了。
ps. 其中 /usr/local/firefox/firefox 是 Mozilla Firefox 的安裝路徑和執行檔。請依個人環境調整。
 
送花文章: 0, 收花文章: 0 篇, 收花: 0 次
回覆時引用此帖
 



發表規則
不可以發文
不可以回覆主題
不可以上傳附加檔案
不可以編輯您的文章

論壇啟用 BB 語法
論壇啟用 表情符號
論壇啟用 [IMG] 語法
論壇禁用 HTML 語法
Trackbacks are 禁用
Pingbacks are 禁用
Refbacks are 禁用

相似的主題
主題 主題作者 討論區 回覆 最後發表
Fedora Core 4 公開測試版 2 飛鳥 網路疑難應用技術研討區 1 2005-04-14 10:25 PM
Fedora Core 3下載 飛鳥 網路疑難應用技術研討區 10 2005-01-30 11:20 AM
Rebhat Fedora Linux Core 1 (Red Hat 10) Released babayu 網路疑難應用技術研討區 20 2003-11-26 02:52 PM
foobar2000 new2003 一般電腦疑難討論區 0 2003-10-30 10:07 AM


所有時間均為台北時間。現在的時間是 09:58 AM


Powered by vBulletin® 版本 3.6.8
版權所有 ©2000 - 2025, Jelsoft Enterprises Ltd.


SEO by vBSEO 3.6.1