Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a personal and work account on my machine. I'd like the automatic login to use the following logic (if you'll pardon my Python)... is this possible?

if (time < 5pm) and (day in workdays):
    log in to work account
    log in to personal account
share|improve this question

Which user is automatically logged in is stored in the /etc/gdm/custom.conf file. You'd have to write a script to update that file and use cron to call it at the appropriate time.

share|improve this answer
would it be possible to do that as part of the boot-up process? – d3vid Aug 25 '11 at 11:26
Sure. Put it in your /etc/rc.local script. – Karl Bielefeldt Aug 25 '11 at 13:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.