Sori Heimsson

Q: How to set default page setup to A4 systemwide

I need to set the page setup as A4 for all users.

Preferably with an applescript I can set as a login hook as users login.

Any help would be nice.

Thank you.

Posted on Mar 9, 2012 4:32 AM

Close

Q: How to set default page setup to A4 systemwide

  • All replies
  • Helpful answers

  • by fane_j,Helpful

    fane_j fane_j Mar 9, 2012 4:53 AM in response to Sori Heimsson
    Level 4 (3,672 points)
    Mar 9, 2012 4:53 AM in response to Sori Heimsson

    Try this

     

    --script begins

    on run

              do shell script "defaults write com.apple.print.PrintingPrefs DefaultPaperID 'iso-a4'"

    end run

    --script ends

     

    I assume you know how to set it up to run at login.

  • by Sori Heimsson,

    Sori Heimsson Sori Heimsson Mar 9, 2012 6:41 AM in response to fane_j
    Level 1 (0 points)
    Mar 9, 2012 6:41 AM in response to fane_j

    Thank you very much.

    This works either as an .app or .scpt when run.

     

    My problem is however that it does not work in combination with this solution:

    http://support.apple.com/kb/HT2420?viewlocale=en_US

    on how to make it run at login for all users.

  • by fane_j,Solvedanswer

    fane_j fane_j Mar 9, 2012 7:09 AM in response to Sori Heimsson
    Level 4 (3,672 points)
    Mar 9, 2012 7:09 AM in response to Sori Heimsson

    Sori Heimsson wrote:

     

    My problem is however that it does not work in combination with this solution:

    http://support.apple.com/kb/HT2420?viewlocale=en_US

    on how to make it run at login for all users.

    (1) A login hook requires a shell script, not an AppleScript.

     

    (2) I believe that login hook has been deprecated in SL (the KB item you quoted applies to 10.5 and lower).

     

    (3) Save the script as an app and implement it as a LaunchAgent (as described in "Creating Launch Daemons and Agents" in "Daemons and Services Programming Guide" in Apple's Developer library). Save the .plist in </Library/LaunchAgents> and it will apply to all users. It's the preferred method in SL, and, IMHO, superior to the login hook.

     

    HTH