7

I have problem with lightdm setting autologin session type (using my config tool). Lightdm logs into previously selected session. I see that autologin-session is UNIMPLEMENTED in version 1.2.1. Maybe I can somehow cheat lightdm? but it seems program writes actual state when stopping and overwrites my changes to /home/user/.dmrc and /var/cache/lightdm/user.dmrc.

At the current I have two sessions: default and kiosk. in /etc/lightdm/lightdm.conf I have line: user-session=desktop

but after I logged into kiosk session it starts all the time. Changing .dmrc and /var/cache/lightdm/dmrc/user.dmrc doesn't work.

I think I will try nodm display manager because what I really want to achieve is run GUI session choosen by admin in gui config tool. Another lower-level tool is rungetty - but I don't know this program (I found some tutorials).

Resolved!

Finnaly, after 2 days of trying nodm, lxdm, rungetty, etc. I've found (not so)simple solution for lightdm:

dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.Accounts /org/freedesktop/Accounts/User1000 org.freedesktop.Accounts.User.SetXSession string:kiosk

this sets default xsession to kiosk for user with id 1000.

In future there probably will be option autologin-session in config file doing the same (marked as UNIMPLEMENTED now).

marcinpz
  • 483
  • You mean when you login Lightdm selects the type of the session(e.g. classic/unity2D/unity3D) used previously automatically? – Samik Jun 04 '12 at 10:02
  • 1
    yes. Lightdm selects prevously used session type when autologin is enabled. And I don't know how this info is stored on disk (.dmrc and /var/cache... doesn't work for me) . – marcinpz Jun 04 '12 at 10:29
  • See if this helps. – Samik Jun 04 '12 at 10:38
  • 1
    auto-login still always logs into the last session used, I haven't found a real solution to this, http://askubuntu.com/questions/137431/lightdm-run-desktop-for-one-session-this-session-only – Mateo Jun 04 '12 at 13:33

2 Answers2

1

In lightDM, try this.

Open (gksu gedit) the file /etc/lightdm/lightdm.conf Change the values (in # Seat configuration) from:

#default-user=bob
#default-user-timeout=5
#pam-service=lightdm

to:

default-user=username
default-user-timeout=0
pam-service=lightdm-autologin

And you can do this to: Edit /etc/gdm/custom.conf file.

[daemon]
TimedLoginEnable=false
AutomaticLoginEnable=true
TimedLogin=(your username)
AutomaticLogin=(your username)
TimedLoginDelay=0
DefaultSession=gnome

Finally reboot it, This will automatically login your username.

0

You can use lightdm-set-defaults to change sessions with a script or from the command-line if you don't want to edit the file. Use the -s option.

/usr/lib/lightdm/lightdm-set-defaults

Usage:
  lightdm-set-defaults [OPTION...] - set lightdm default values

Help Options:
  -h, --help                  Show help options

Application Options:
  -d, --debug                 Enable debugging
  -k, --keep-old              Only update if no default already set
  -r, --remove                Remove default value if it's the current one
  -s, --session               Set default session
  -g, --greeter               Set default greeter
  -a, --autologin             Set autologin user
  -i, --hide-users            Set greeter-hide-users to true or false
  -m, --show-manual-login     Set show-manual-login to true or false
  -l, --allow-guest           Set allow-guest to true or false
mfisch
  • 3,643