Is loading your desktop before login safe? I came across an article explaining how to load your desktop before you login.


Does anyone know if this works in Lion?
Is there any reason I should avoid attempting it?


Load your desktop before login


Go to System Preferences &#x2192; Users&amp;Groups &#x2192; Login Options to enable automatic login.
Then, copy and paste the following code into TextEdit.app:




&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
        &lt;key&gt;AbandonProcessGroup&lt;/key&gt;
        &lt;true/&gt;
        &lt;key&gt;Label&lt;/key&gt;
        &lt;string&gt;com.luomat.loginhook&lt;/string&gt;
        &lt;key&gt;ProgramArguments&lt;/key&gt;
        &lt;array&gt;
                &lt;string&gt;/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession&lt;/string&gt;
                &lt;string&gt;-suspend&lt;/string&gt;
        &lt;/array&gt;
        &lt;key&gt;RunAtLoad&lt;/key&gt;
        &lt;true/&gt;
&lt;/dict&gt;
&lt;/plist&gt;


3. Go to Format &#x2192; Make Plain Text and save the file as

    com.luomat.loginhook-2.plist


and put it in

    ~/Library/LaunchAgents



After rebooting your computer, you'll notice the login screen shows up, but when you log in, your desktop and all your startup apps will be loaded and ready to go.
As @eyemyth said above, the script above is the equivalent of choosing "Login Window..." from menu bar when you have user switching enabled.

The only security 'issue' I can see with doing this is that momentarily your desktop will be shown until the computer calls the script - depending on how many scripts you have or how busy your login is that may not be instantly.

Also, someone (correct me if I'm wrong) could boot into single user mode, delete the plist file and then reboot - though this is an extreme.