Follow us on...
Follow us on Twitter Follow us on Facebook
Register
Page 1 of 2 12 LastLast
Results 1 to 8 of 12
  1. #1
    minimalistic is offline Registered User
    Join Date
    Mar 2008
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Multiple instances of an application

    Dudes,

    I have a generic issue here... I recently switched from xp to leopard and almost got used to all the most significant differences. However, I think I just realized it's quite impossible to spawn multiple instances of an application (let's say finder) under mac os.

    Please someone tell me I'm stupid, because I don't know what to think of this os now....

    Some background information - I'm trying to configure shorcuts in quicksilver so that I get a more win-ish shortcut experience (I'm really used to win's ones ). That's how I actually discovered this thing

    Please someone say what's going on here

    Cheers

  2. #2
    DeltaMac is offline Tech
    Join Date
    Jun 2001
    Location
    Dover, DE
    Posts
    8,005
    Thanks
    3
    Thanked 658 Times in 648 Posts
    I know that you used the Finder just as an example. The Finder is not really an app that you just launch when you need it. It runs all the time, and is a basic part of the functionality of OS X (for good and bad, I suppose).
    Most apps will be one instance, but may offer multiple independent windows depending on the use. If you need another window for that app, then just open another window (as in a web browser). Open a new document in Word, or another word processor-type app, and you add a window to the display. Some apps operate with only a single window, such as iTunes.

    You may get other answers if you explain (with as much detail as you like) exactly what you want to do...
    Serendipity is a lucky guess !

  3. #3
    minimalistic is offline Registered User
    Join Date
    Mar 2008
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I understand the thing with the multiple windows.... It kinda provides the same user experience as spawning multiple instances.

    However, I guess those are all sharing the same process and (hence) memory. So it's much less isolated and a potential crash in one of the windows would result in losing all of them...

    Otherwise, besides being a bad architectural decision/implementation, I don't find it really as a problem - as I said, the user experience isn't hurt by that (so far).

    cheers

  4. #4
    Mikuro's Avatar
    Mikuro is offline Crotchety UI Nitpicker
    Join Date
    Mar 2005
    Posts
    2,832
    Thanks
    10
    Thanked 74 Times in 64 Posts
    Yes, all of an app's windows are subject to a crash. On the other hand, it also allows for vastly more efficient use of memory.

    I wouldn't call it bad design, but I see where you're coming from. This is one of the fundamental differences between Windows and the Mac OS. You CAN launch multiple instances of an app in OS X, but doing so is not usually a good idea. Mac OS is application-centric, not window-centric.

    Having said that, in those cases where you really do need to load a second instance, there are two approaches you can take:

    1. Duplicate the application in the Finder, then launch the duplicate.
    2. Launch it from Terminal. Here you need to know where to find the actual executable file of an application. Mac OS X apps are usually actually folders. So for example, if you wanted a second instance of Preview, you could do it like this:
    Code:
    /Applications/Preview.app/Contents/MacOS/Preview &
    The "&" at the end tells Terminal to run the process in the background, so you can enter other commands in the Terminal window. You'll still need to keep the window open as long as you want to use Preview, but you won't need 1 Terminal window for every app like you would without the "&".
    Mac mini — 1.25GHz G4, 1GB RAM — OS 10.5.8
    MacBook Pro — 2.26GHz C2D, 8GB RAM — OS 10.6.8

    Useful programs: Privoxy, Butler, ffmpegX, VLC, Perian, Tofu, Wcalc

  5. #5
    fryke's Avatar
    fryke is offline Super Moderator
    Join Date
    Sep 2000
    Location
    macosx.com
    Posts
    14,294
    Thanks
    15
    Thanked 120 Times in 109 Posts
    Just to mention it again: It's not really a good idea to copy the Finder and start multiple instances of it. There is A) not really a reason for it and B) problems down the road, since the Finder's automatically updated with software updates, whereas the copies wouldn't be.
    Mac user since 1987. Running Mac OS X 10.9 "Mavericks" on a MacBook Pro Retina 13" & an iMac 27" and whatever's newest for my iPhone 5s, iPad Air and AppleTV 3.

  6. #6
    minimalistic is offline Registered User
    Join Date
    Mar 2008
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks for the advice

    btw - could you forward me to some online documentation/articles on the kernel architecture, process model, etc. of mac os (or free bsd, as it seems it's more or less the same).

    and yes, I'm coming from a win developer background and want to grasp the core concepts of this os

  7. #7
    lurk's Avatar
    lurk is offline Mitä?
    Join Date
    Mar 2002
    Location
    Land o' skeeterz
    Posts
    2,087
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Your best bet is to just go to http://developer.apple.com/ and go crazy. There is documentation 'o plenty there.
    Wenn ist das Nunstruck git und Slotermeyer? Ja!...
    Beiherhund das Oder die Flipperwaldt gersput!

  8. #8
    Giaguara's Avatar
    Giaguara is offline Chmod 760
    Join Date
    Nov 2002
    Location
    ~
    Posts
    9,586
    Thanks
    22
    Thanked 193 Times in 188 Posts
    There are usually very few instances when the applications in OS X make sense to run in multiple instances. The only ones I've found a business need (for anyone) to use would be debugging the applications you have written for OS X, or other debug, bug testing, or the process of localization of applications. Developer documentation contains more on how you can get multiple instances open but for a non-developer use of applications there probably isn't much need.

    I would love to be able to reverse what you want to Windows.. I mean, instead of having 10 processes open for a browser that has 10 browser windows open (each window = 1 instance = wasting memory) just keep one process per application and let that process manage it memory use more effectively.
    Mac Mini Server | MacBook Pro | iPhone | Other Macs + a bunch of iPods, Newtons and other toys
    Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do.
    ~ Samuel Clemens | G's corner | Photos | @ Plus+ and Game Center

 

 
Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •