Announcement

Collapse
No announcement yet.

Shutdown delay x number of seconds

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Code:
    [COLOR=#555555][FONT=monospace]qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 0 2 2[/FONT][/COLOR]
    Add that as the command on shortcut and give it a keyboard command, and you have a (mostly) safe instantaneous system shutdown.

    It will kill any open browser windows, but will prompt to save unsaved work, per Kate.

    For anyone who wants to dig deeper the API docs for ksmserver are here

    Comment


      #17
      Originally posted by TwoFistedJustice View Post
      Code:
      [COLOR=#555555][FONT=monospace]qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 0 2 2[/FONT][/COLOR]
      The dbus calls to ksmserver are also what jlittle (and I) tried to tell you to use instead of shutdown on page 1 of this thread
      You could have also configured the default keyboard shortcuts to the ones you would prefer in systemsettings: KeyboardShortcuts>GlobalShortcuts>ksmserver>Shutdo wnWithoutConfirmation

      Doesn't solve your short timeout wishes, though, if you still need that?
      Last edited by kubicle; Sep 25, 2019, 11:13 PM.

      Comment


        #18
        Originally posted by kubicle View Post
        The dbus calls to ksmserver are also what jlittle (and I) tried to tell you to use instead of shutdown on page 1 of this thread
        You could have also configured the default keyboard shortcuts to the ones you would prefer in systemsettings: KeyboardShortcuts>GlobalShortcuts>ksmserver>Shutdo wnWithoutConfirmation

        Doesn't solve your short timeout wishes, though, if you still need that?
        Sorry. I didn't understand any of that at the time. Before I actually did it ferrealsy I read that entire blog post, then followed the various links and read more stuff, then I fiddled with qdbus in Konsole. THEN I tried shutting down the system and was pleased when it worked.

        I don't NEED the timeout. I've functioned for decades without it in Windows, mostly because there's no cancel (that I know of) for Windows shutdown. Maybe there is, but it never occurred to me till I saw it in man shutdown. But it would be nice to have to have the timeout.

        About the only time I ever need the cancel is when I hit my shutdown or reboot shortcut and then realize as my fingers come up off the keyboard that there was just onnnne more thing I forgot to do.

        Comment


          #19
          And life is hard

          So think first, then use the tools you have.

          If you never use a GUI, then the
          Code:
          shutdown
          command is going work just fine. It's the GUI that makes a rational close and turn off a bit more complicated - it's more stuff being affected. And you are right in your assumption that (mostly) an icon or menu selection in a GUI application consists of some combination of commands, scripts, and compiled code.
          The next brick house on the left
          Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.24.7 | Kubuntu 22.04.4 | 6.5.0-28-generic


          Comment

          Working...
          X