Results 1 to 7 of 7

Thread: Command to change user KDE

  1. #1

    Question 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

  2. #2

    Default Re: Command to change user KDE

    Quote Originally Posted by achiaramello View Post
    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?
    You want to do the same as "Switch User" in the K-Menu's "Leave" tab?
    Code:
    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".
    Last edited by wolfi323; 18-Mar-2014 at 08:07.

  3. #3

    Question Re: Command to change user KDE

    Quote Originally Posted by wolfi323 View Post
    You want to do the same as "Switch User" in the K-Menu's "Leave" tab?
    Code:
    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:




    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.

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

  4. #4

    Default Re: Command to change user KDE

    Quote Originally Posted by achiaramello View Post
    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:
    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-works...ayManager.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/kd...rev=KDE%2F4.11

    Or maybe have a look at that: http://flavio.castelli.name/2010/07/...itch-plasmoid/

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

  5. #5

    Default Re : Command to change user KDE

    Hi,

    Try this one:

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

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

  6. #6

    Default Re: Command to change user KDE

    Quote Originally Posted by 1Antoine1 View Post
    Try this one:

    Code:
    kdmctl reserve
    Yes, that works.

    I did look at kdmctl myself, but didn't spot this command...

    Thanks!

  7. #7

    Default Re : Command to change user KDE

    My pleasure

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •