I had conceived an idea to automatically login and lock the screen. A Google later and I found that I wasn’t the only one.
An advantage of this set up is it allows you to login and start up all the programs like IM, G15 manager, Email Client, etc and lock the screen so people can’t get into your account.
I also had a problem with MythTV backend service which starts but the front end could never connect to it. However starting it manually using the command mythbackend
starts fine and the front end is happy. In the end I added the command as a start up item when I log in. The problem is if Ubuntu restarts and not logged into my account then MythTV is not running and won’t record anything let alone watch / schedule programs.
Type this command (Alt+F2) in Gnome to bring up the Gnome Login Manager:
gksu /usr/sbin/gdmsetup
Go to “Security” tab and tick “Enable Automatic Login” and select the user account in the drop down box below it. Click OK to save the settings.
Run the command:
gnome-session-properties
Or System > Preferences > Sessions from the menu
In “Startup Programs” Tab click “Add” button.
Enter a name and optionally a description. The command is:
gnome-screensaver-command --lock
Click OK to save the start up item.
The auto login still works for those interested.
Start User Accounts settings:
Start Menu > Run
Enter control userpasswords2
and press O.K
Un-tick “Users must enter a user name and password to use this computer.” and press OK button. It should ask you for a user name and password of the account you want to automatically log into.
Start Task Scheduler:
Control Panel > Administrative Tools > Task Scheduler
Click “Create Task” and enter the program / script as rundll32.exe
with the arguments user32.dll,LockWorkStation
The trigger is “At startup” You can optionally add a start up delay. This might be a good idea because it allows the system to login and load some stuff before starting another process to lock the computer. The downside to this method is that it leaves your system vulnerable for few seconds / however long you set it to.
lock screen – command? Ubuntu Forum Post
Create quick launch shortcuts to lock, restart, and shutdown computer Article