|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
|
#1 |
|
Quit Terminal without quitting process? / Multiple simultaneous Firefox profiles
Hi, I'd like to know how I can start a process via command line that is not a child of the app used to invoke the command.
For example if I open Terminal and enter: Code:
/Applications/Firefox.app/Contents/MacOS/firefox -P "ProfileName" Also tried creating an app bundle in AppleScript Editor, like so: Code:
do shell script "/Applications/Firefox.app/Contents/MacOS/firefox -P \"ProfileName\"" Any ideas?
__________________
27" i7 iMac | 11" MacBook Air | Black MacBook | iPhone 5 Favorite Mac apps: Blender | Firefox | Photoshop | Reason Last edited by Let's Sekuhara!; Dec 14, 2012 at 10:07 AM. Reason: Changed thread title |
|
|
|
0
|
|
|
#2 |
|
I use nohup for stuff like that.
Code:
nohup /Applications/Firefox.app/Contents/MacOS/firefox -P "ProfileName" |
|
|
|
0
|
|
|
#3 | |
|
Quote:
I'm looking into whether I can (if I use the AppleScript approach) have the script quit itself after sending the shell script... |
||
|
|
0
|
|
|
#4 |
|
There is a command
Code:
tell me to quit But I just tried writing it into my app and it doesn't work. |
|
|
|
0
|
|
|
#5 |
|
You can also just put an ampersand (&) at the end of the line to run the process in the background. To close the terminal application you can execute killall Terminal assuming you have just one. Otherwise it's a fairly involved process -- get the process id of the bash shell, find it's parent process (a login process), and find the parent process of the login, which is the Terminal, which can then be killed.
__________________
27" i7 iMac, 15" MacBook Pro, Mac mini with SL Server, 4 other Macs and an Apple TV. |
|
|
|
0
|
|
|
#6 | |
|
Quote:
|
||
|
|
0
|
|
|
#7 |
|
Well I just realized that when you close the Terminal application it kills the login and the copy of Firefox goes away (hence the suggestion to use nohup).
However if you run Firefox from an xterm window (which doesn't do a login) or from an Automator Shell Script then using & works fine and the bash shell can exit with no problems. Also, you can run Firefox using the Open command: "open /Applications/Firefox.app &"
__________________
27" i7 iMac, 15" MacBook Pro, Mac mini with SL Server, 4 other Macs and an Apple TV. |
|
|
|
0
|
|
|
#8 |
|
Problem is, then the Automator script app has to remain open for the duration of the session. And that's almost equally annoying as having to keep Terminal open.
|
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 08:13 PM.







Hybrid Mode
