Techxplus

Menu
  • Apple +
    • MAC
  • Gadgets +
  • How-To
  • Tech Tips
  • Wordpress +
Home
Gadgets +
Starting items automatically at Login in Mac
Gadgets +

Starting items automatically at Login in Mac

Subhro September 6, 2019

Mac can automatically launch items and restore your work environment when you log in. There are two features in OS X, login items and resume, which exactly does this.

You tell your Mac to open applications, scripts, or documents when you log in to your computer by specifying login items. With the resume feature enabled, your Mac takes a snapshot of open applications and documents before you shut down and then automatically restores everything again when you log in. It’s like waking your Mac up from sleep mode. You can use login items and the resume feature separately or with each other.

Adding Login Items

Users can add just about anything in a login item everything from applications and documents to custom AppleScripts and Automator actions. You can even automatically mount network drives by adding them as login items.

Every user on your Mac can specify his or her unique login items.

Here’s how to add login items for an individual user:

  1. From the Apple menu, select System Preferences.
  2. Select Users & Groups
  3. From the sidebar, select a user.
  4. Click the Login Items button.
  5. Click the + button to add a login item. You can select applications, documents, AppleScripts, network drives, and Automator actions.

To hide a login item so it doesn’t appear on the screen when it starts, select the Hide checkbox next to the item. To remove a login item, select the item, and then click the – button.

Adding Login Items for all Users.

If every user on your Mac needs to have the same login items, where all users share a Mac, you can set global login items for all users on a particular Mac. To add global login items, open the Terminal application and type the following command as an administrator:

sudo defaults write /Library/Preferences/loginwindow AutoLaunchedApplicationDictionary -array-add 
'{ "Path" = "/path/to/item"; "Hide" = "0"; }'

Replace /path/to/item with the path to the login item. To hide the login item, change the hide value to 1.

Execute the command again to add another global login item.

To remove all global login items, open the Terminal application and type the following command:

sudo defaults delete /Library/Preferences/loginwindow AutoLaunchedApplicationDictionary

Performing Actions on Sleep or Wake

‘
Login items are perfect for opening files and running scripts when you log in to your Mac, but what about actions that need to be performed every time you put your Mac to sleep or wake it up? For example, you might want to mute the volume when you put the computer to sleep and then reconnect to a network drive or virtual private network (VPN) when you wake it up.

SleepWatcher (/https://www.bernhard-baehr.de/) is an open-source a command-line tool that can automatically execute Unix commands on sleep or wake.

Resuming Applications and Reopening Windows at Login

Do you want to save your work environment configuration when you restart or shut down and then restore it when you log back in? You can do so by turning on the resume feature.
Here’s how to resume applications and reopen windows at login:

  1. From the Apple menu, select System Preferences.
  2. Select General.
  3. To automatically save changes to documents when you close them, deselect the Ask to keep changes when closing documents checkbox.
  4. To automatically reopen the active windows when you quit and reopen an application, deselect the Close windows when quitting an applicationcheckbox.
  5. Now, if you select restart or shutdown from the apple menu a dialog box will appear.
  6. Select the Reopen windows when logging back in the checkbox.
  7. Click the Restart or Shut Down button.

The next time your Mac starts up, all of the applications and windows you had open when you restarted or shut down will automatically open. If you ever want to turn off the resume feature, just deselect the checkboxes.

Share
Tweet
Email
Prev Article
Next Article

Related Articles

terminal mac
The macOS default Terminal app is great, but there are …

Apps for better Terminal Experience in MacOs

raspberry pi
If you have recently bought a raspberry pi 4 and …

Raspberry Pi headless ssh setup in Mac

About The Author

Subhro

Leave a Reply

Cancel reply

Recent Posts

  • How to paste without formatting in MAC?
  • How to create free business email and forward to your Gmail?
  • Change WordPress admin email
  • Remove Bitnami Banner from WordPress on Google Cloud.
  • Homebrew for MAC: The complete guide

Recent Comments

  • Marcelo Miguel Bazan on Change WordPress admin email
  • Marcelo Miguel Bazan on Change WordPress admin email
  • Marcelo Miguel Bazan on Change WordPress admin email
  • SONGSTER2998 on Change WordPress admin email
  • porno on Homebrew for MAC: The complete guide

Archives

  • October 2020
  • April 2020
  • February 2020
  • December 2019
  • October 2019
  • September 2019
  • August 2019

Categories

  • Apple +
  • Gadgets +
  • How-To
  • MAC
  • Tech Tips
  • Wordpress +

Techxplus

Categories

  • Apple +
  • Gadgets +
  • How-To
  • MAC
  • Tech Tips
  • Wordpress +

Featured Posts

paste without formatting mac
free business email
admin email wordpress

LINKS

  • About Us
  • Privacy Policy
  • Cookie Policy
  • Disclaimer
  • Terms and conditions
  • Contact
Copyright © 2021 Techxplus

Ad Blocker Detected

Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Refresh
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Cookie settingsACCEPT
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled

Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.

Non-necessary

Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.

SAVE & ACCEPT