How can I safely shut down Xfce from the terminal?

Michael Hoffmann

I'm not looking for shutdown or reboot or the like. I want to know how to shut down Xubuntu from the terminal, by executing a command that would have the same effect as clicking the "Shutdown" button in a menu.

Similar to this question, but for Xubuntu/XFCE.

Byte Commander

I think what you want is xfce4-session-logout (online manpage).

Excerpt from the manpage (reformatted, filtered):

   The  xfce4-session-logout command allows you to programmatically logout
   from your Xfce session. It requests the session manager to display  the
   logout  confirmation  screen,  or,  if  given  one  of the command-line
   options below, causes the session manager to take the requested  action
   immediately.

OPTIONS:
   --logout     Log out without displaying the logout dialog.
   --halt       Halt without displaing the logout dialog.
   --reboot     Reboot without displaying the logout dialog.
   --suspend    Suspend without displaying the logout dialog.
   --hibernate  Hibernate without displaying the logout dialog.
   --fast       Do  a  fast shutdown.  This instructs the session manager not to
                save the session, but instead to quit everything quickly.

So to shut down, use

xfce4-session-logout --halt

and to reboot, use

xfce4-session-logout --reboot

If you just want to get the dialogue where you can pick an action manually, run it without arguments:

xfce4-session-logout 

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

How to shut down the computer safely by pressing the power button?

분류에서Dev

When I quit xmonad, how can I make it shut down applications nicely?

분류에서Dev

How can I safely remove timeout from a script?

분류에서Dev

How can I safely remove timeout from a script?

분류에서Dev

How I can safely run async code, when handling messages from Messenger?

분류에서Dev

How can I list last updated packages from terminal?

분류에서Dev

How can I stop terminal and firefox from launching on startup?

분류에서Dev

How can I print output whilst detached from controlling terminal?

분류에서Dev

How do I shut down a Linux server after running for 60 minutes?

분류에서Dev

How can I add items to Xfce root menu?

분류에서Dev

How can I change the prompt of the terminal permanently

분류에서Dev

How can I delete files in terminal fluently?

분류에서Dev

How can I delete files in terminal fluently?

분류에서Dev

How can I open a terminal window on OSX?

분류에서Dev

How I can remove more than 1 items from drop down list?

분류에서Dev

How to shut down the computer without the update on Windows 7?

분류에서Dev

How to do remote shut down based on ping return value?

분류에서Dev

How to force application using localhost:9000 to shut down

분류에서Dev

How can i download youtube videos one after another automatically from terminal

분류에서Dev

How can I read a text file from the terminal and save the output to another file in java?

분류에서Dev

How can I display text from a file automatically after powering up my computer, in text editor or terminal?

분류에서Dev

How do I lock the terminal screen from the terminal?

분류에서Dev

Can I safely delete "VirtualBox Dropped Files"?

분류에서Dev

Can I safely cancel in the middle of a system install?

분류에서Dev

Change xfce4-power-manager option from terminal

분류에서Dev

How can safely I test a UPS that doesn't have a working battery?

분류에서Dev

How many pages can I print at once on my HP OfficeJet safely?

분류에서Dev

Can I mount and run an iso from my terminal?

분류에서Dev

I can't rename a file using the terminal if it came from a parameter

Related 관련 기사

  1. 1

    How to shut down the computer safely by pressing the power button?

  2. 2

    When I quit xmonad, how can I make it shut down applications nicely?

  3. 3

    How can I safely remove timeout from a script?

  4. 4

    How can I safely remove timeout from a script?

  5. 5

    How I can safely run async code, when handling messages from Messenger?

  6. 6

    How can I list last updated packages from terminal?

  7. 7

    How can I stop terminal and firefox from launching on startup?

  8. 8

    How can I print output whilst detached from controlling terminal?

  9. 9

    How do I shut down a Linux server after running for 60 minutes?

  10. 10

    How can I add items to Xfce root menu?

  11. 11

    How can I change the prompt of the terminal permanently

  12. 12

    How can I delete files in terminal fluently?

  13. 13

    How can I delete files in terminal fluently?

  14. 14

    How can I open a terminal window on OSX?

  15. 15

    How I can remove more than 1 items from drop down list?

  16. 16

    How to shut down the computer without the update on Windows 7?

  17. 17

    How to do remote shut down based on ping return value?

  18. 18

    How to force application using localhost:9000 to shut down

  19. 19

    How can i download youtube videos one after another automatically from terminal

  20. 20

    How can I read a text file from the terminal and save the output to another file in java?

  21. 21

    How can I display text from a file automatically after powering up my computer, in text editor or terminal?

  22. 22

    How do I lock the terminal screen from the terminal?

  23. 23

    Can I safely delete "VirtualBox Dropped Files"?

  24. 24

    Can I safely cancel in the middle of a system install?

  25. 25

    Change xfce4-power-manager option from terminal

  26. 26

    How can safely I test a UPS that doesn't have a working battery?

  27. 27

    How many pages can I print at once on my HP OfficeJet safely?

  28. 28

    Can I mount and run an iso from my terminal?

  29. 29

    I can't rename a file using the terminal if it came from a parameter

뜨겁다태그

보관