Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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.

share|improve this answer

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.

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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