Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8952615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:54:49+00:00 2026-06-15T13:54:49+00:00

How do I programatically trigger a system shutdown or reboot in Linux? Preferably without

  • 0

How do I programatically trigger a system shutdown or reboot in Linux? Preferably without requiring elevated privileges.

On older releases (e.g. Ubuntu 10.04) I could call HAL’s org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown or Reboot methods using D-Bus. See: http://people.freedesktop.org/~dkukawka/hal-spec-git/hal-spec.html#interface-device-systempower.

However HAL appears to be obsolete, and is not present in Ubuntu 12.10. What is the current best-practice for doing this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:54:50+00:00Added an answer on June 15, 2026 at 1:54 pm

    You can use ConsoleKit. Send a org.freedesktop.ConsoleKit.Manager.Stop DBus message to org.freedesktop.ConsoleKit. From the command line, that would be something like:

    dbus-send \
        --system \
        --dest=org.freedesktop.ConsoleKit \
        --type=method_call \
        --print-reply \
        --reply-timeout=2000 \
        /org/freedesktop/ConsoleKit/Manager \
        org.freedesktop.ConsoleKit.Manager.Stop
    

    If the current user is authorized to perform shutdown, then no root privileges are needed.

    You can also take a look at the KShutdown utility. It contains source code for different shutdown methods, ranging from ConsoleKit to Gnome and KDE APIs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I programatically trigger the tab key functionality in a VB.Net windows application?
Is there any way to programatically trigger global mediakeys in Windows using Java? I
I need to trigger the hover state of a Flex button programatically, so that
I have a TextListener I want to change programatically without triggering its TextListener .
How could I programmatically trigger a left-click event on the mouse? Thanks. edit: the
I need to programatically trigger text selection mode in a WebView, but the code
i'm trying to collapse programatically a collapsible with a simple JavaScript: $( ".nuovoPaziente" ).trigger(
Is there any way to trigger a reboot of the iPhone programmatically from within
I'd like to know if it is possible to trigger programmatically the installation of
I programatically create an NSToolbar in my application. I just added a new button

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.