I start my firefox with a fixed profile from terminal using:

/Applications/Firefox.app/Contents/MacOS/firefox-bin -no-remote -P UserName

It works nicely, but the focus is on Terminal and not on firefox.

Is there a way to change this?

link|improve this question

40% accept rate
feedback

2 Answers

up vote 4 down vote accepted

You can use the following instead:

open -n /Applications/Firefox.app --args -no-remote -P UserName

-n means a new instance of the application is launched, even if there's already one open. Everything after --args is being passed on as arguments to the application.

link|improve this answer
feedback

A kludgy hack would be to add the following after the command:

& osascript -e 'tell application "Firefox"' -e 'activate' -e 'end tell'

Or alternatively you could use open /Applications/Firefox.app if you don't need to specify the profile you want to use.

link|improve this answer
Thanks very much for your answer. I like the first hint. The problem is that I often already have firefox on when I run that command, and sometimes (I am not sure exactly when) it would focus on the running Firefox. Do you know a solution for this? Thanks again – Mr Woody Aug 7 '10 at 19:47
@Mr Woody: I'm not sure. Sorry. Maybe using the pid with AppleScript but it's something I'm not familiar with. – Chealion Aug 7 '10 at 23:59
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.