Direct shutdown, reboot suspend launchers for guest
Posted: 18 Nov 2013, 10:23
Create new choose -name.desktop file on your desktop or in /home/guest/.local/share/applications and paste:
For shutdown:
For reboot:
For suspend:
For hibernate:
Found it in Auto Shutdown NG extension for Firefox.
If you use changes=EXIT: cheatcode and want shutdown without saving changes do:
addline to '/etc/rc.d/rc.local',
create exit-no-changes.sh file in /home/guest/.local/share and pastethan create shutdown-no-changes.desktop file and paste
Tested for LXDE but should work also for XFCE and GNOME.
You can change Name, Icon and add Categories to these .dektop files.
For shutdown:
Code: Select all
Name=Shutdown
Name[pl]=Wyłącz komputer
Exec=/usr/bin/dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
Icon=system-shutdown
Terminal=false
Type=Application
Code: Select all
Name=Reboot
Name[pl]=Uruchom ponownie
Exec=/usr/bin/dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart
Icon=system-restart
Terminal=false
Type=Application
Code: Select all
Name=Suspend
Name[pl]=Uśpij system
Exec=/usr/bin/dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend
Icon=system-suspend
Terminal=false
Type=Application
Code: Select all
Name=Hibernate
Name[pl]=Hibernacja
Exec=/usr/bin/dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Hibernate
Icon=system-hibernate
Terminal=false
Type=Application
If you use changes=EXIT: cheatcode and want shutdown without saving changes do:
add
Code: Select all
chown guest:guest /mnt/live/tmp
create exit-no-changes.sh file in /home/guest/.local/share and paste
Code: Select all
#!/bin/bash
mv /mnt/live/tmp/changes-exit /mnt/live/tmp/changes-exit-no && /usr/bin/dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
Code: Select all
Name=Shutdown without saving changes
Name[pl]=Wyłącz komputer bez zapisywania zmian
Exec=/home/guest/.local/share/exit-no-changes.sh
Terminal=false
Type=Application
You can change Name, Icon and add Categories to these .dektop files.