suspend and shutdown shortcut directly on Desktop
suspend and shutdown shortcut directly on Desktop
Hi Team,
Could you please assist in creating a suspend and shutdown shortcut directly on Desktop?
I have tried couple of things and it did not worked.
Thanks in advance.
Could you please assist in creating a suspend and shutdown shortcut directly on Desktop?
I have tried couple of things and it did not worked.
Thanks in advance.
- ncmprhnsbl
- DEV Team
- Posts: 3939
- Joined: 20 Mar 2012, 03:42
- Distribution: v5.0-64bit
- Location: australia
- Contact:
suspend and shutdown shortcut directly on Desktop
which desktop are we talking about? (kde(plasma), cinnamon, mate, xfce, lxde, lxqt, openbox)
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44
suspend and shutdown shortcut directly on Desktop
Hi ncmprhnsbl ,
Thanks much for the reply.
Sorry not to mention that, its LXDE.
Will be greatful if I can get that for XFCE as well.
Thanks
Thanks much for the reply.
Sorry not to mention that, its LXDE.
Will be greatful if I can get that for XFCE as well.
Thanks
suspend and shutdown shortcut directly on Desktop
Hi Team,
Was able to create shortcuts with DBus commands.
Thanks
Was able to create shortcuts with DBus commands.
Thanks
suspend and shutdown shortcut directly on Desktop
Hi Rava,
Sure will love to share the info.
Found the info on the below github site
https://gist.github.com/reporter123/1635661 - Suspend, hibernate, restart or shutdown the computer without sudo!
Can use the script or directly use the commands to create shortcuts.
Hope this is helpful
Sure will love to share the info.
Found the info on the below github site
https://gist.github.com/reporter123/1635661 - Suspend, hibernate, restart or shutdown the computer without sudo!
Can use the script or directly use the commands to create shortcuts.
Hope this is helpful
- Ed_P
- Contributor
- Posts: 8369
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
suspend and shutdown shortcut directly on Desktop
I think I'm missing something.
Code: Select all
guest@porteus:~$ ./power.sh restart
Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ConsoleKit was not provided by any .service files
guest@porteus:~$
Ed
- Rava
- Contributor
- Posts: 5415
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
suspend and shutdown shortcut directly on Desktop
Probably this:
Or am I mistaken and you, Ed_P, either did test it under LXDE or XFCE?
I - running XFCE - get a different error:
Code: Select all
$ ./power.sh suspend
Error org.freedesktop.DBus.Error.UnknownMethod: No such method “Suspend”
Either org.freedesktop.DBus.Error.UnknownMethod is mistaken or for XFCE the code needs altering?
Testuser, did ./power.sh work for you in XFCE as well?
Cheers!
Yours Rava
Yours Rava
- Ed_P
- Contributor
- Posts: 8369
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
suspend and shutdown shortcut directly on Desktop
Actually I tested it in Cinnamon. So where/how does one find the DE's service name?
Ed
- ncmprhnsbl
- DEV Team
- Posts: 3939
- Joined: 20 Mar 2012, 03:42
- Distribution: v5.0-64bit
- Location: australia
- Contact:
suspend and shutdown shortcut directly on Desktop
if you're using RC2 or 3 anything using consolekit will not work, because consolekit has been replaced with elogind (whose commands are simply: loginctl poweroff (or reboot or suspend))
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44
- Rava
- Contributor
- Posts: 5415
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
suspend and shutdown shortcut directly on Desktop
^
thanks for the reminder, I integrated that into my suspend.sh script, but its only on my rc3 x86-64 machine, not on my 4.0 i586 one… so I forgot to look up the code I utilised many moons ago.
Back then it was also you who told me about loginctl suspend.
thanks for the reminder, I integrated that into my suspend.sh script, but its only on my rc3 x86-64 machine, not on my 4.0 i586 one… so I forgot to look up the code I utilised many moons ago.
Back then it was also you who told me about loginctl suspend.
Cheers!
Yours Rava
Yours Rava
- Ed_P
- Contributor
- Posts: 8369
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
suspend and shutdown shortcut directly on Desktop
So for Cinnamon I tweaked the code to use loginctl.
Added in 8 minutes 2 seconds:
All work for me except hibernate but that's because I don't use disk until I shutdown.
Code: Select all
THINGY_CINNAMON=loginctl
case $1 in
suspend)
$THINGY_CINNAMON suspend
;;
hibernate)
$THINGY_CINNAMON hibernate
;;
restart)
$THINGY_CINNAMON reboot
;;
shutdown)
$THINGY_CINNAMON poweroff
;;
*)
usage
;;
esac
All work for me except hibernate but that's because I don't use disk until I shutdown.
Ed
suspend and shutdown shortcut directly on Desktop
Hi Team,
Sorry for late reply.
I found a harder and longer command for new RC3 OS.
dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Suspend boolean:true
loginctl also works for me
loginctl hybrid-sleep - Good option will hibernate, but if power is not down then immediately turn on like suspend.
Thanks everybody.
Sorry for late reply.
I found a harder and longer command for new RC3 OS.
dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Suspend boolean:true
loginctl also works for me
loginctl hybrid-sleep - Good option will hibernate, but if power is not down then immediately turn on like suspend.
Thanks everybody.