Speed up login+startup on a machine with 1 user
If you are the sole user of your computer, you may want to just enable autologin without asking for password. But most often this is not an option. So when you turn on your computer, you wait for the login screen to appear, then enter the password, then wait for the auto-start programs to complete loading (or cope with the slowness).
Instead, you can have your system automatically log into your account and let the startup process take place, but also lock the screen, so the password still needs to be entered. The difference is, you can turn on your computer, then walk away somewhere, and be sure that it's 100% ready for work when you come back. Even without walking away, the time you take to enter your password is used for startup, so it's still quicker.
I realize that suspending may be an even better solution, but it's not always an option.
- Click Start, type netplwiz, and then press Enter.
- In the User Accounts dialog box, click the account you want to automatically log on to.If it is available, clear the Users Must Enter A User Name And Password To Use This Computer check box.
- Click OK.
- In the Automatically Log On dialog box, enter the user’s password twice and click OK.
Run the screen locker on startup¶
Make a shortcut that runs the following:
and add/move this to Startup (which can be found in the Start menu).
If you're using KDM as your login manager, you can just go to its settings and enable auto-login and lock the screen on login.
Otherwise, just add to startup the command to lock the screen. Before adding it, find which one of the following actually works, because there are a lot of variants.
# KDE, possibly others qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock
# GNOME gnome-screensaver-command --lock
# GNOME dbus-send --type=method_call --dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.Lock
# KDE 4 /usr/lib/kde4/libexec/kscreenlocker_greet --immediateLock
# XFCE xflock4
To make sure this triggers as fast as possible, I recommend managing the startup sequence yourself. By this I mean you should remove everything from startup and add a Bash script to it instead with everything you want to start, in the sequence of priority (most commands should end with
sleeps in between as appropriate).