dm-tool switch to already logged user.

Asked by lesebas on 2014-04-12


In the man page of dm-tool it's write that switch-to-user will switch directly to the already opened sessions, excepted if the password is required. I'm trying to switch to already logged user but dm-tool always bring me to the greeter. How can I specify to lightdm which sessions do not required password if there are already logged?

Question information

English Edit question
Light Display Manager Edit question
No assignee Edit question
Solved by:
Robert Ancell
Last query:
Last reply:
Robert Ancell (robert-ancell) said : #1

You can't specify this. What LightDM does is try and authenticate the user you are switching to (using PAM) and if it is prompted for something then shows the greeter. So in this case your account requires some sort of prompt. You can't find out if this will occur until the authentication is attempted.

lesebas (sebdeligny) said : #2

OK, many thanks for this answer. So do you think I can configure PAM not to prompt for anything if the session is already opened. I remember that old versions of ubuntu (2009 or 2010) were able to switch between opened graphical session without any prompt. I'm no longer using ubuntu but I would like to make this thing possible with my current system (archlinux with XFCE).

Best Robert Ancell (robert-ancell) said : #3

In short, no because each PAM session doesn't know about existing sessions.

lesebas (sebdeligny) said : #4

OK... so I'd suggest to modify the man page to clear this point... Many thanks for your answer.

Yes, so it seems the man page does not explain the difference between switch-to-greeter and switch-to-user very well?

switch-to-greeter: switches to greeter, starts new session

switch-to-user: switches to greeter (unless - rare case - user has no password?), continues session or starts new session

The man page says that the greeter will be started if authentication is required, but it does not make clear when authentication is required.

Also confusing that "switch-to-user username" will bring up the greeter, which asks for the username again.

In our case we wanted to be able to switch between X sessions without typing a password.

So I opened a question on AskUbuntu and provided an answer. Here it is:

The current answer there is a working proof-of-concept which basically weakens security similar to .

In our case it is what we need and it seems it is what is discussed here.

The answer there also suggest improvement like defining groups of users that allow session switching between them. This would restore security because only users selected by administrator would get the new behavior.

Feedback welcome.

Thank you for your attention.