Ununtu 14.04 enabling autologin

Asked by Jerry Sanford

After upgrading from Ubuntu 13.10 LTS to Ubuntu 1404 LTS (upgrade successful) ...

I am unable to log in the GUI (UNITY) at the time and would like to enable autologin from the config file or some other command line method.

I have tried inserting the following code into file /etc/init/ligthdm.conf at various locations but my results after reboot was a TERMINAL screen or the GUI never completed its startup process and login was never an option.

It is possible to login to the TERMINAL screen.

[SeatDefaults]
  autologin-user=<my username>
  autologin-user-timeout=0
  user-session=ubuntu

Any help greatly appreciated.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Can you please provide the full lightdm.conf and I will compare it to mine. Using autologin moots encryptfs by the way so if you have used that and now want autologin you have wasted your time

Revision history for this message
Jerry Sanford (sanfordjondariver) said :
#2

FILE: /etc/init/lightdm.conf

# LightDM - light Display Manager
#
# The display manager service manages the X servers running on the
# system, providing login and auto-login services
#
# based on gdm upstart script

description "LightDM Display Manager"
author "Robert Ancell <email address hidden>"

start on ((filesystem
           and runlevel [!06]
           and started dbus
           and plymouth-ready)
          or runlevel PREVLEVEL=S)

stop on runlevel [016]

emits login-session-start
emits desktop-session-start
emits desktop-shutdown

script
    if [ -n "$UPSTART_EVENTS" ]
    then
        # Check kernel command-line for inhibitors, unless we are being called
        # manually
        for ARG in $(cat /proc/cmdline); do
            if [ "$ARG" = "text" ]; then
                plymouth quit || :
                stop
                exit 0
            fi
        done

        [ ! -f /etc/X11/default-display-manager -o "$(cat /etc/X11/default-displ ay-manager 2>/dev/null)" = "/usr/bin/lightdm" -o "$(cat /etc/X11/default-display -manager 2>/dev/null)" = "/usr/sbin/lightdm" ] || { stop; exit 0; }

        if [ "$RUNLEVEL" = S -o "$RUNLEVEL" = 1 ]
        then
            # Single-user mode
            plymouth quit || :
            exit 0
        fi
    fi

    exec lightdm
end script

post-start script
    sleep 5
    clear > /dev/tty7
end script

post-stop script
        clear > /dev/tty7
        sleep 1
        if [ "$UPSTART_STOP_EVENTS" = runlevel ]; then
                initctl emit desktop-shutdown
        fi
end script

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Run:

sudo /usr/lib/lightdm/lightdm-set-defaults --autologin $USER

Run it as give, the $USER variable will change to your username. Reboot to test. If this fails, run:

sudo gedit /etc/lightdm/lightdm.conf

(sudo is now OK for GUI apps in Trusty and gksudo is not installed by default).

and make it look like the below:

[SeatDefaults]
autologin-user=foo
autologin-user-timeout=0
user-session=ubuntu
greeter-session=unity-greeter

Change 'foo' for your actual Ubuntu username. Save the new file and reboot to test.

Revision history for this message
Jerry Sanford (sanfordjondariver) said :
#4

When I executed the command as given I received the following response:
jerry@stargate2:~$ sudo /usr/lib/lightdm/lightdm-set-defaults --autologin
$USER
sudo: /usr/lib/lightdm/lightdm-set-defaults: command not found
jerry@stargate2:~$

So, then I edited /etc/lightdm/lightdm.conf as requested, change "foo" to
my username, and rebooted. The greeter screen was displayed as before and
logins were still disabled. No change in problem status.

On Thu, May 1, 2014 at 5:16 AM, actionparsnip <
<email address hidden>> wrote:

> Your question #247611 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/247611
>
> Status: Open => Answered
>
> actionparsnip proposed the following answer:
> Run:
>
> sudo /usr/lib/lightdm/lightdm-set-defaults --autologin $USER
>
> Run it as give, the $USER variable will change to your username. Reboot
> to test. If this fails, run:
>
> sudo gedit /etc/lightdm/lightdm.conf
>
> (sudo is now OK for GUI apps in Trusty and gksudo is not installed by
> default).
>
> and make it look like the below:
>
>
> [SeatDefaults]
> autologin-user=foo
> autologin-user-timeout=0
> user-session=ubuntu
> greeter-session=unity-greeter
>
>
> Change 'foo' for your actual Ubuntu username. Save the new file and
> reboot to test.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/247611/+confirm?answer_id=2
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/247611
>
> You received this question notification because you asked the question.
>

Revision history for this message
Launchpad Janitor (janitor) said :
#5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.