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

  1. Go to System Preferences → Users&Groups → Login Options to enable automatic login.
  2. Then, copy and paste the following code into TextEdit.app:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>AbandonProcessGroup</key>
        <true/>
        <key>Label</key>
        <string>com.luomat.loginhook</string>
        <key>ProgramArguments</key>
        <array>
                <string>/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession</string>
                <string>-suspend</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
</dict>
</plist>

3. Go to Format → Make Plain Text and save the file as

    com.luomat.loginhook-2.plist

and put it in

    ~/Library/LaunchAgents
  1. 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.