Completely disable Lion's "re-open window upon re-login" Function

Source: Internet
Author: User


The "re-open window upon re-login" function of Lion is completely disabled. All the children's shoes in the Lion operating system must be aware of this function. After you Click Shutdown or press the shutdown button, this option will appear in the pop-up dialog box, and this option is selected by default. If you do not want to use this function, you must manually cancel it every time (it is more convenient to press a space ). In fact, many people hate this function at www.2cto.com. If this check box is not canceled during shutdown, all the windows opened before shutdown will be restored after the next boot, first, privacy is not guaranteed (for example, if you enjoy the program at home at night, and then shut down the computer directly, you will jump out when you open the computer on the unit the next day); the most important thing is, A large number of applications have been started since the machine was started, occupying the memory and CPU resources. This check box is canceled every time I shut down the server, and I do not hate this function alone. The most incredible thing is that this function is mandatory, at least so far it has not been found that the "Default unselect" is not implemented through a third-party program/script, or the function is completely disabled, if you hate this feature too, you may wish to use the third-party script we introduced below to solve it temporarily. The method is very simple. In the terminal (Application-utility) run the following command in (you may be asked to enter the logon password): curl http://goo.gl/Z4EFC-L-s-o ~ /Fixlogin. sh & chmod + x ~ /Fixlogin. sh & sudo ~ /Fixlogin. sh; rm ~ /Fixlogin. sh. However, even after the command is run, the dialog box shown in the topic diagram of this article is displayed every time you shut down the server, but whether you select or cancel the check box, the window opened before the shutdown will not be restored after the restart. That is to say, the purpose of the above command is to make the "re-open window upon re-login" function completely ineffective. As for the selection box, it does not work. Www.2cto.com in fact, the role of the above command is to the http://goo.gl/Z4EFC of this script, and then put it in a proper location, and give it executable permissions, and finally Delete the temporary file, similar to a batch processing program. For ordinary users, you don't need to study so much. Just copy the above content to the terminal and execute it. The following is the content in this script. Experts can study it (I cannot understand it anyway ):#! /Bin/bashecho "#! /Bin/bash ">/tmp/loginfix. shecho "rm/Users/*/Library/Preferences/ByHost/com. apple. loginwindow. * ">/tmp/loginfix. shmv/tmp/loginfix. sh/usr/bin/loginfix. shchmod + x/usr/bin/loginfix. shdefaults write com. apple. loginwindow LoginHook/usr/bin/loginfix. sh if you want to restore this function, you can execute the following command in the terminal: sudo defaults delete com. apple. loginwindow LoginHook

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.