Home > article > MacでFirefoxのプロファイルの使い分けと別バージョンの同時起動をする

MacでFirefoxのプロファイルの使い分けと別バージョンの同時起動をする

Firefoxのプロファイルの使い分け(普段用/開発用)と別バージョン(2.0と3.1)の同時起動がしたかったのでちょっと設定してみた。

プロファイルの作成

まずは使い分けるためのプロファイルを作成する。今回作成したのは以下の3つ。

  • Firefox3.1
  • Firefox3.1_development
  • Firefox2.0

プロファイルの作成の仕方はTerminalから-Pオプションを付けて、Firefoxを起動させればいい。

$ /Applications/Firefox.app/Contents/MacOS/firefox -P

プロファイルマネージャーが開くのでそこで「新しいプロファイルを作成」を選び、わかりやすいように名前をつける。

起動コマンドの作成

プロファイルを指定して起動させるには-P “プロファイル名”のオプションを付ける必要がある。毎回Terminalで指定して起動させるのも手間なので、起動コマンド用に3つ程ファイルを作成する。(後でapp化する)

ちなみにこんなことしなくても、複数のプロファイルがあれば起動時に使用するプロファイルを聞かれるので必要ない人は別にしなくても大丈夫。

Firefox3.1普段用

#!/bin/sh

/Applications/Shiretoko.app/Contents/MacOS/firefox -P Firefox3.1 &
exit 0

Firefox3.1開発用

#!/bin/sh

/Applications/Shiretoko.app/Contents/MacOS/firefox -P Firefox3.1_development &
exit 0

Firefox2.0

#!/bin/sh

/Applications/Firefox.app/Contents/MacOS/firefox -P Firefox2.0 -no-remote &
exit 0

Firefox2.0のにだけ、-no-remoteオプションが付いているのは、同時起動を想定している為。別のバージョンを同時に起動する場合は、大抵は最初に起動しておく方は-no-remoteオプションは無し、後から起動する方に-no-remoteオプションを付けるようにしておけばいい。

app化

起動コマンドを作ったところで、せっかくなのでそれをapp化する。

app化に関しては[Mac OS X] シェルスクリプトとかの CUI アプリケーションを Mac OS X 方式の .app にする方法 [簡単 5 ステップ]を参照。

上記エントリのcore.shの部分をさっき作った起動コマンドスクリプトに置き換えればOK。Firefoxのアイコンは/Applications/Firefox.app/Contents/Resources/firefox.icnsを使用。Shiretokoのアイコンを使いたければ、/Applications/Shiretoko.app/(ry から取ってくればいい。

あとはapp化したのを直接クリックするなり、QuickSilverから呼びだすようにしておけばいい。

Firefox 3 Hacks Mozillaテクノロジ徹底活用テクニック
Firefox 3 Hacks Mozillaテクノロジ徹底活用テクニック 江村 秀之

オライリージャパン 2008-08-27
売り上げランキング : 11045

Amazonで詳しく見る by G-Tools

Comments:7

Gary Branco 11-10-25 (Tue) 14:00

Brilliant content and actually can assist with understanding the article better.

Adalberto Loughman 11-10-29 (Sat) 23:38

Hmm is anyone else experiencing problems with the pictures on this blog loading? I’m trying to determine if its a problem on my end or if it’s the blog. Any feedback would be greatly appreciated. Cheers!

Nathanial Clerk 11-10-30 (Sun) 16:12

Does your blog have a contact page? I’m having a tough time locating it but, I’d like to send you an e-mail. I’ve got some ideas for your blog you might be interested in hearing. Either way, great blog and I look forward to seeing it expand over time. Regards!

German Falck 11-10-31 (Mon) 1:14

Great blog you have here but I was curious if you knew of any forums that cover the same topics talked about in this article? I’d really like to be a part of group where I can get opinions from other knowledgeable people that share the same interest. If you have any recommendations, please let me know. Kudos!

Shaunta Mcfarlin 11-10-31 (Mon) 3:11

Hi there! Do you use Twitter? I’d like to follow you if that would be okay. I’m absolutely enjoying your blog and look forward to new updates. Kudos!

submit press release 11-11-01 (Tue) 1:06

I have some videos that say “includes third party content” and others that say “blocked in some countries” (due to copyright).. Is it still possible for me to become a partner (considering I have all of the other requirements filled).

Chang Sunderland 11-11-02 (Wed) 6:44

Wonderful goods from you, man. I have understand your stuff previous to and you’re just too great. I really like what you’ve acquired here, certainly like what you are stating and the way in which you say it. You make it enjoyable and you still take care of to keep it smart. I can’t wait to read much more from you. This is really a tremendous website.

Comment Form
Remember personal info

Trackbacks:0

Trackback URL for this entry
http://ukstudio.jp/2008/09/18/firefox/trackback/
Listed below are links to weblogs that reference
MacでFirefoxのプロファイルの使い分けと別バージョンの同時起動をする from UKSTUDIO

Home > article > MacでFirefoxのプロファイルの使い分けと別バージョンの同時起動をする

Feeds
Meta
Others

Return to page top