Results 1 to 2 of 2

Thread: Switch user from command line

  1. #1
    Join Date
    Jun 2014
    Location
    Moscow, Russia
    Posts
    13

    Default Switch user from command line

    I use LXDE. What I'm trying to achieve is locking a session, but not by means of xscreensaver.
    I can send a dbus message
    Code:
    dbus-send --print-reply --system --dest=org.freedesktop.login1 \
    /org/freedesktop/login1 org.freedesktop.login1.Manager.Suspend \
    boolean:true
    to achieve same effect as when I press "Sleep".
    How do I achieve "Switch user" effect? lxlock is not what I want, it calls xscreensaver and makes it ask for a password, instead of just activating it

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,293
    Blog Entries
    2

    Default Re: Switch user from command line

    Not sure what you're describing regarding the screensaver,
    But answering your subject line, the following will switch to another User account at the command line (That command option is a hyphen, letter L for "login" in lower case)
    Code:
    su -l new_user_account
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Posting Permissions

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