Command to change user KDE

Hello community.
I’m looking for a command for KDE where I can start a session in parallel with a different user … ie, do what makes USER CHANGE menu Option K but from a command.
Does anyone have any idea how can I do?

Using Opensuse 13.1 32 bits with KDE.

Thanks in advance

PD: Sorry for my English … I’m using the google translator. my native language is Spanish

You want to do the same as “Switch User” in the K-Menu’s “Leave” tab?

qdbus org.kde.krunner /App switchUser

This is exactly the same as that K-Menu item does, i.e. show KRunner.

There is no simple command to really switch to a different user though AFAIK.

If you just want to run single programs as different user, you can use “kdesu -u user *command”
*See also “kdesu --help”.

This solution is a step ahead of where I was but not definitive.
When I run this command opens a dialog box like the one I show below:

http://i61.tinypic.com/2civpv.png

What I need is to run the command takes me to this screen:

http://i60.tinypic.com/2wpne6r.jpg

That would be the next instance to press the new session option in the previous dialog box.

Of course I thank any help you can give me about it. Greetings.

Yes, as I wrote.
This is exactly the same that the entry in K-menu does.

What I need is to run the command takes me to this screen:

That would be the next instance to press the new session option in the previous dialog box.

Again, there is no command to do that, AFAIK.
You would have to write your own.

Here’s the documentation of the KDisplayManager class:
http://api.kde.org/4.x-api/kde-workspace-apidocs/libs/kworkspace/html/classKDisplayManager.html
This is what the KRunner uses to actually start the new session.
See here for the runner’s source code: https://projects.kde.org/projects/kde/kde-workspace/repository/entry/plasma/generic/runners/sessions/sessionrunner.cpp?rev=KDE%2F4.11

Or maybe have a look at that: http://flavio.castelli.name/2010/07/15/fast-user-switch-plasmoid/

IIANM you would have to call KDisplayManager::switchVT() or KDisplayManager::lockSwitchVT().

Hi,

Try this one:

kdmctl reserve

You may want to lock the screen to prevent other users to use your session:

qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock && kdmctl reserve

Yes, that works.

I did look at kdmctl myself, but didn’t spot this command…

Thanks!

My pleasure :wink: