MacOS – How to open an app on login on secondary screen

displaymacos

Several apps I use are set to "Open at Login". However, they are always opened on the primary screen, instead of the last position, which is the secondary one.
I those apps exclusively on the secondary display and it's pretty annoying to always move them there and resize because of extra space (no dock there).

How can I configure where apps will open by default?
How can I force them to keep the same size as last time they were used?

Best Answer

Assign to Space

  1. Go to the space you want the app to open in (in your case the second space)
  2. Right click your application's dock icon
  3. Move your cursor to "Options" Under "Assign to" select "This Desktop"

Window position and size control

I Googled and found a solution for the resizing issue. (Source)

Make your application launch via an Apple Script!

  1. Make a script similar to this:

    tell application "YOUR APPLICATION NAME"
        launch
    end tell
    tell application "YOUR APPLICATION NAME"
        set the bounds of the front window to {0, 22, 800, 1024}
    end tell
    
  2. Save it as "Application"

  3. Put the saved application in your Launch Items instead of the program itself

  4. Additionally you may undock it with Dock Dodger to make this script run silently.