Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-05-27 08:03:04

Jakob77
Member
Registered: 2022-11-03
Posts: 58

[SOLVED] Difference between logout and switch user?

I have not been able to find any important differences between these two commands:


xfce4-session-logout --switch-user

xfce4-session-logout --logout --fast


If any, what can they be.? :-)

Last edited by Jakob77 (2023-05-27 22:07:42)

Offline

#2 2023-05-27 10:39:02

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: [SOLVED] Difference between logout and switch user?

$ xfce4-session-logout --help
Usage:
  xfce4-session-logout [OPTION…]

Help Options:
  -?, --help               Show help options
  --help-all               Show all help options
  --help-gtk               Show GTK+ Options

Application Options:
  -l, --logout             Log out without displaying the logout dialog
  -h, --halt               Halt without displaying the logout dialog
  -r, --reboot             Reboot without displaying the logout dialog
  -s, --suspend            Suspend without displaying the logout dialog
  -i, --hibernate          Hibernate without displaying the logout dialog
  -b, --hybrid-sleep       Hybrid Sleep without displaying the logout dialog
  -u, --switch-user        Switch user without displaying the logout dialog
  -f, --fast               Log out quickly; don't save the session
  -V, --version            Print version information and exit
  --display=DISPLAY        X display to use

"--logout --fast" means to logout the user, no dialog, without saving the session.

"--switch-user" suspends the current user session and brings up the login screen so you can login as a second simultaneous user. Note that your display manager must support user switching for this to work.

So the basic difference is if the first account is still active or not.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2023-05-27 17:59:07

Jakob77
Member
Registered: 2022-11-03
Posts: 58

Re: [SOLVED] Difference between logout and switch user?

ToZ wrote:
$ xfce4-session-logout --help
Usage:
  xfce4-session-logout [OPTION…]

Help Options:
  -?, --help               Show help options
  --help-all               Show all help options
  --help-gtk               Show GTK+ Options

Application Options:
  -l, --logout             Log out without displaying the logout dialog
  -h, --halt               Halt without displaying the logout dialog
  -r, --reboot             Reboot without displaying the logout dialog
  -s, --suspend            Suspend without displaying the logout dialog
  -i, --hibernate          Hibernate without displaying the logout dialog
  -b, --hybrid-sleep       Hybrid Sleep without displaying the logout dialog
  -u, --switch-user        Switch user without displaying the logout dialog
  -f, --fast               Log out quickly; don't save the session
  -V, --version            Print version information and exit
  --display=DISPLAY        X display to use

"--logout --fast" means to logout the user, no dialog, without saving the session.

"--switch-user" suspends the current user session and brings up the login screen so you can login as a second simultaneous user. Note that your display manager must support user switching for this to work.

So the basic difference is if the first account is still active or not.


Thank you. :-)
I have been wondering about why a former user remained active.
I suppose then "--switch-user" is for situations where you have a process you want to keep going on after you left the profile.
Maybe that actually can be very interesting for home control for instance.
But if you don't have any of that going on and you just want the user closed down ready for halt, then it is actually more appropriate to use "--logout --fast" for switching. That way I am also getting the login screen (maybe only because it is MX-Linux).
Does it look like I am getting some of the point.?

Offline

#4 2023-05-27 18:07:01

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: [SOLVED] Difference between logout and switch user?

Yes. Logout if you want to end the session of the current user. If you logout, you will get the login screen again. To halt the system, you need to use "--halt" - this will shutdown the computer.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 535.4 KiB (Peak: 536.24 KiB) ]