As a Computer AMC service provider in New Delhi, Noida and Gurgaon – the question that is repeatedly asked by our various clients is – how to Run Application or Script while opening the lid of their MacBook.

As all of us know that “Open at Login” feature could easily be located in system preferences to disable any application to load. This helps in saving memory and lead-time of the machine.

If your MacBook is flooded with those auto-run apps. These are the apps that sneaked in silently while installing or utilising the services or application. They are annoying and you can stop them from consuming your system memory as below :

Click Apple menu at the top left corner of your mac to open System Preferences.

system preferences in MacBook

Amongst various options look for second to last row for Users & Groups.

Where to find Users and Groups in Mac OS

Once you click on Users & Groups, you will be on Password tab, switch to Login Items.


Click upon the lock icon to enable the changes in this section. You might be prompted to put your login password after which you can click on minus button to delete the entries. Once done, you may apply the lock to save your changes.

Run Application or Script while opening the lid of your MacBook

Sleepwatcher is the utility that helps you to automate various procedures. There are various triggers like trigger on opening the lid of your MacBook. Trigger also tracks monitor wakeup or idleness of Mac. Sleepwatcher can effectively execute any predefined Unix command. There are events to execute the commands. The events could even be – when the Mac or the display of the Mac goes to sleep mode or wakes up. If you want to run a command on periodic basis without any user intervention or even when a user resumes activity. Various possible triggers are available in Sleepwatcher. You might need to have basic Unix command line skills to avail the advantages of utility.