Suspend Classic and launching from the command line

rsteed

Registered
This is a two parter:

1. You can launch Cocoa applications from the command line, although only partially, by navigating into the package and launching the binary in the MacOS folder. Unfortunately, the menu's don't appear and the application does not register as launched in the Dock.

If anyone has figured out a way to launch an application fully from the command line, I would be very interested in hearing how.

2. That all said, Classic.app does not have a menu bar, so go ahead and launch it by typing

/Applications/Classic.app/Contents/MacOS/Classic

Once launched, you can launch all your Classic MacOS applications normally. The great thing is, if you return to the command line where you launched Classic, you can suspend it by typing Control-Z. When you want to go back to your classic application, just resume Classic by typing "fg" at the command line.

There is probably a more elegant way to background an existing process at the command line. So if you know one, let me know. What I am really interested in here is controlling apps from the command line. Particularly, how to launch Cocoa apps completely, and how to lauch Carbon or Classic apps at all.


 

rholmes

Registered
to background your app, put & at the end. So to launch classic as a background app, just type blah/blah/blah/classic &

You can see if it's running by typing jobs at the command line.
 

Tom Hackett

Registered
open "/Applications/Classic.app/"

will open the app in the gui, as well as any other Cocoa or Carbon app but for carbon apps you should leave off the .app/ of course.

It's not that cool to make login shell scripts with this feature because the applications open everytime you create a new terminal window. Use the login panel from System Preferences for OS X stuff and the terminal for Command Line stuff.
 
Top