UberStudent Forums

How To Automatically Log In to UberStudent
Page 1 of 1

Author:  Stephen Ewen [ Wed Aug 20, 2014 8:54 pm ]
Post subject:  How To Automatically Log In to UberStudent


UPDATE: You no longer need to take the manual steps below. UberStudent users can simply install the package, mdm-autologin-config from the UberStudent repository to configure autologin on their system.

To install the mdm-autologin-config package, open the Synaptic Package Manager, click "Update," and then search for and install mdm-autologin-config. As you install it, follow the prompt where it will ask you to input your username, the one you wish to have automatically logged in. Some additional notes are below, several posts down.


Some users, such as those with a BIOs password, may wish to automatically log in to their UberStudent system.

To do this and have it persist across updates, you'll need to set a script to run very early during the boot process so as to override the affect of any updates.

The following how-to explains the steps you need to take. It should take about 10 minutes or so to complete, starting right now.

Please read these directions all the way through before attempting them. You first need an overview of them. If you make even one mistake, the desired result will not work. You don't need to understand everything written, although I have explained what is happening in each step in italicized blue text. Just carefully follow these directions exactly as written and you should be just fine!

NOTE: Auto-login will only work on an installation that has only one user account. If your installation has more than one user account, auto-login will not work; so, please stop here and do not proceed, in that case.

Please take the following steps:

1. Open a terminal and run:

# Remove a file we'll no longer need. Auto-login is already set up in UberStudent. That's why you don't have to log in to the Live Disc. We have to remove the file that provides for that one-time event. We will be overwriting it with a file containing your personal log in info.
sudo rm /etc/uberstudent/adjustments/150-mdm-conf.overwrite

# Makes a directory
sudo mkdir /etc/mdm/my-mdm-conf

# Makes a copy of mdm.conf, which you will edit and use to overwrite the file upon boot
sudo cp /etc/mdm/mdm.conf /etc/mdm/my-mdm-conf/

2. Hit Alt+F2 on your keyboard and run:

gksu leafpad /etc/mdm/my-mdm-conf/mdm.conf

3. In the file that opens, on line 59, you will see the following line:

Where it says uberstudent, replace it with your user name. So, for example, if my user name is ewens, you would edit line 59 to read as

Now save mdm.conf in leafpad, exit leafpad, and run the following in the terminal:

# Overwrites mdm.conf for the first time. The file will be overwritten upon each boot with the file you are making in leafpad, so as to avoid changes from any future update of the file that would otherwise break your auto-login setup.
sudo cp -f /etc/mdm/my-mdm-conf/mdm.conf /etc/mdm/mdm.conf

4. In the terminal run the following:

# Creates an empty file
sudo touch /etc/uberstudent/adjustments/160-mdm-conf.execute

5. Hit Alt+F2 on your keyboard and run:
gksu leafpad /etc/uberstudent/adjustments/160-mdm-conf.execute

6. Add the following text to the file, making sure you hit Enter once on your keyboard so that your cursor's caret is just below the last line (you should have eight lines in total including the last empty trailing line):

# Creates the overwrite file
if [ -f /etc/uberstudent/adjustments/150-mdm-conf.overwrite ]; then
   rm /etc/uberstudent/adjustments/150-mdm-conf.overwrite
if [ -f /etc/mdm/my-mdm-conf/mdm.conf ]; then
   cp -f /etc/mdm/my-mdm-conf/mdm.conf /etc/mdm/mdm.conf

Now save the file and exit leafpad.

7. In the terminal run the following:

# Makes the file you just made executable
sudo chmod +x /etc/uberstudent/adjustments/160-mdm-conf.execute

Now reboot and you should be automatically logged in. :geek:

Author:  Berker Pekoz [ Sat Sep 27, 2014 12:42 pm ]
Post subject:  Re: How To Automatically Log In to UberStudent

Ever considered making this a complete single script and uploading it in the repo :)

Author:  Stephen Ewen [ Sun Sep 28, 2014 7:09 am ]
Post subject:  Re: How To Automatically Log In to UberStudent

Yes, very good idea, thanks for suggesting it. It's done. :)

A new package, mdm-autologin-config, is in the UberStudent repository. I feel very satisfied after making this package, because it means that UberStudent is the only Linux distro where configuring autologin for a user is as simple as installing a package. It took a couple of hours to get it right, but this package does it flawlessly. It accomplishes what the manual steps above achieve but with some different methods; and, it allows reversions and changes to the specific autologin user. :ugeek:

A couple of notes about the package:

1. When installing it, a prompt will ask you to input your username, which the script then takes and uses to configure your autologin info in to the system. You MUST input your desired autologin username in the prompt for autologin to work. If you mistype, your system will not break but autologin will not work and you'll need to re-install the package to get it right the second time.

2. The package can be re-installed any number of times--you can change your autologin username just by installing the package again. For instance, if you make a new account and want to use that as your main one, just re-install this package and follow the prompt for your new main username to make it autologin.

3. Only one autologin user may be configured per system. This is a limitation of mdm. (Actually there's a way to get it to work for all users but its too hackish for my taste, and probably not adequately safe, so no).

4. Removing the mdm-autologin-config package of course removes the autologin and reverts the system to default.

5. Anyone who has already taken the manual steps in the above post can and should install the mdm-autologin-config package, although it is not necessary. In this way, the package and not manual edits will govern autologin.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group