{"id":4472,"date":"2017-03-23T22:56:57","date_gmt":"2017-03-23T21:56:57","guid":{"rendered":"http:\/\/michlstechblog.info\/blog\/?p=4472"},"modified":"2017-03-24T13:18:42","modified_gmt":"2017-03-24T12:18:42","slug":"debian-shutdown-when-pressing-power-button","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/debian-shutdown-when-pressing-power-button\/","title":{"rendered":"Debian: Shutdown when pressing power button"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_4472 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_4472')){$('.twoclick_social_bookmarks_post_4472').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Debian%3A%20Shutdown%20when%20pressing%20power%20button\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Awhen%20you%20install%20Debian%20with%20just%20the%20Standard%20minium%20System%20utilities%20a%20power%20off%20by%20pressing%20the%20power%20button%20is%20not%20possible.%0D%0A%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/debian-shutdown-when-pressing-power-button\\\/\",\"post_id\":4472,\"post_title_referrer_track\":\"Debian%3A+Shutdown+when+pressing+power+button\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>when you install Debian with just the Standard minium System utilities a power off by pressing the power button is not possible.<\/p>\n<p><!--more--><\/p>\n<p>To enable the power button installed the acpi daemon. The acpi daemon handles the acpi events(which a powerbutton raises).<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nroot@debdev ~# apt-get -y install acpid\r\n<\/pre>\n<p>Then you have to tell systemd to shutdown the PC. Edit \/etc\/systemd\/logind.conf and uncomment<br \/>\n<code><br \/>\nHandlePowerKey=poweroff<br \/>\n<\/code><br \/>\nPossible other actions are &#8220;ignore&#8221;, &#8220;reboot&#8221;, &#8220;halt&#8221;, &#8220;kexec&#8221;, &#8220;suspend&#8221;, &#8220;hibernate&#8221;, &#8220;hybrid-sleep&#8221;, and &#8220;lock&#8221;. See <a href=\"https:\/\/www.freedesktop.org\/software\/systemd\/man\/logind.conf.html\" target=\"_blank\">systemd logind<\/a> help page for further details.<\/p>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, when you install Debian with just the Standard minium System utilities a power off by pressing the power button is not possible.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[870],"tags":[994,335,224,992,993,818],"class_list":["post-4472","post","type-post","status-publish","format-standard","hentry","category-debian","tag-acpid","tag-debian","tag-linux-2","tag-powerbutton","tag-shutdown","tag-systemd"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/4472","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=4472"}],"version-history":[{"count":2,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/4472\/revisions"}],"predecessor-version":[{"id":4474,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/4472\/revisions\/4474"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=4472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=4472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=4472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}