Moin liebe Leute.
Ich nutze Ubuntu Studio 16.04(Xfce).
Am Anfang hat das Drücken auf den Power Button meines Laptops eins schönes Menü erzeugt mit "Neustart", "Herunterfahren", "Schlafmodus" und "abbrechen".
Momentan geht der Laptop nur noch in den Sleepmodus. Ich hätte aber gerne das Menü wieder. Wie kann ich das hinbekommen?
Zeilen aus der "/etc/systemd/logind.conf":
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # Entries in this file show the compile time defaults. # You can change settings by editing this file. # Defaults can be restored by simply deleting this file. # # See logind.conf(5) for details. [Login] #NAutoVTs=6 #ReserveVT=6 #KillUserProcesses=no #KillOnlyUsers= #KillExcludeUsers=root #InhibitDelayMaxSec=5 #HandlePowerKey=poweroff #HandleSuspendKey=suspend #HandleHibernateKey=hibernate #HandleLidSwitch=suspend #HandleLidSwitchDocked=ignore #PowerKeyIgnoreInhibited=no #SuspendKeyIgnoreInhibited=no #HibernateKeyIgnoreInhibited=no #LidSwitchIgnoreInhibited=yes #HoldoffTimeoutSec=30s #IdleAction=ignore #IdleActionSec=30min #RuntimeDirectorySize=10% #RemoveIPC=yes #UserTasksMax=12288 |
gedit /etc/acpi/events/powerbtn
1 2 3 4 5 6 7 8 9 10 11 12 13 | # /etc/acpi/events/powerbtn # This is called when the user presses the power button and calls # /etc/acpi/powerbtn.sh for further processing. # Optionally you can specify the placeholder %e. It will pass # through the whole kernel event message to the program you've # specified. # We need to react on "button power.*" and "button/power.*" because # of kernel changes. event=button[ /]power action=/etc/acpi/powerbtn.sh |
gedit /etc/acpi/powerbtn.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | #!/bin/sh # /etc/acpi/powerbtn.sh # Initiates a shutdown when the power putton has been # pressed. [ -r /usr/share/acpi-support/power-funcs ] && . /usr/share/acpi-support/power-funcs # If logind is running, it already handles power button presses; desktop # environments put inhibitors to logind if they want to handle the key # themselves. if pidof systemd-logind >/dev/null; then exit 0 fi # getXuser gets the X user belonging to the display in $displaynum. # If you want the foreground X user, use getXconsole! getXuser() { user=`pinky -fw | awk '{ if ($2 == ":'$displaynum'" || $(NF) == ":'$displaynum'" ) { print $1; exit; } }'` if [ x"$user" = x"" ]; then startx=`pgrep -n startx` if [ x"$startx" != x"" ]; then user=`ps -o user --no-headers $startx` fi fi if [ x"$user" != x"" ]; then userhome=`getent passwd $user | cut -d: -f6` export XAUTHORITY=$userhome/.Xauthority else export XAUTHORITY="" fi export XUSER=$user } # Skip if we just in the middle of resuming. test -f /var/lock/acpisleep && exit 0 # If the current X console user is running a power management daemon that # handles suspend/resume requests, let them handle policy This is effectively # the same as 'acpi-support's '/usr/share/acpi-support/policy-funcs' file. [ -r /usr/share/acpi-support/power-funcs ] && getXconsole PMS="gnome-settings-daemon kpowersave xfce4-power-manager" PMS="$PMS guidance-power-manager.py dalston-power-applet" PMS="$PMS mate-settings-daemon" PMS="$PMS unity-settings-daemon" if pidof -x $PMS > /dev/null; then exit elif test "$XUSER" != "" && pidof dcopserver > /dev/null && test -x /usr/bin/dcop && /usr/bin/dcop --user $XUSER kded kded loadedModules | grep -q klaptopdaemon; then exit elif test "$XUSER" != "" && test -x /usr/bin/qdbus; then kded4pid=$(pgrep -n -u $XUSER kded4) if test "$kded4pid" != ""; then dbusaddr=$(su - $XUSER -c "grep -z DBUS_SESSION_BUS_ADDRESS /proc/$kded4pid/environ") if test "$dbusaddr" != "" && su - $XUSER -c "export $dbusaddr; qdbus org.kde.kded" | grep -q powerdevil; then exit fi fi fi # If all else failed, just initiate a plain shutdown. /sbin/shutdown -h now "Power button pressed" |
Interkontinental