how to run a script before execute a dbus-send command?
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
1
down vote
favorite
I have the following problem: on lubuntu 16.04 I can send the laptop to sleep (suspend on RAM) using a hook script to switch to a virtual teminal before to suspend and reswitching out from a vt after suspend
/etc/pm/sleep.d/01_switchvt
cat /etc/pm/sleep.d/01_switchvt
#!/bin/sh
# Switch to a VC before suspending and back after resume
case "$1" in
resume|thaw)
chvt 7
;;
suspend|hibernate)
chvt 1
;;
esac
but when I execute (and also the lxdesession-logout does) the dbus command
dbus-send --session --dest=org.freedesktop.PowerManagement /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.Suspend
the hook script is not executed and the system does not wake-up properly (blank screen and need to reboot from vt1)
Please I apreciate any kind of help,
thanks in advance
Francesco
suspend lubuntu d-bus hook
add a comment |Â
up vote
1
down vote
favorite
I have the following problem: on lubuntu 16.04 I can send the laptop to sleep (suspend on RAM) using a hook script to switch to a virtual teminal before to suspend and reswitching out from a vt after suspend
/etc/pm/sleep.d/01_switchvt
cat /etc/pm/sleep.d/01_switchvt
#!/bin/sh
# Switch to a VC before suspending and back after resume
case "$1" in
resume|thaw)
chvt 7
;;
suspend|hibernate)
chvt 1
;;
esac
but when I execute (and also the lxdesession-logout does) the dbus command
dbus-send --session --dest=org.freedesktop.PowerManagement /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.Suspend
the hook script is not executed and the system does not wake-up properly (blank screen and need to reboot from vt1)
Please I apreciate any kind of help,
thanks in advance
Francesco
suspend lubuntu d-bus hook
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have the following problem: on lubuntu 16.04 I can send the laptop to sleep (suspend on RAM) using a hook script to switch to a virtual teminal before to suspend and reswitching out from a vt after suspend
/etc/pm/sleep.d/01_switchvt
cat /etc/pm/sleep.d/01_switchvt
#!/bin/sh
# Switch to a VC before suspending and back after resume
case "$1" in
resume|thaw)
chvt 7
;;
suspend|hibernate)
chvt 1
;;
esac
but when I execute (and also the lxdesession-logout does) the dbus command
dbus-send --session --dest=org.freedesktop.PowerManagement /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.Suspend
the hook script is not executed and the system does not wake-up properly (blank screen and need to reboot from vt1)
Please I apreciate any kind of help,
thanks in advance
Francesco
suspend lubuntu d-bus hook
I have the following problem: on lubuntu 16.04 I can send the laptop to sleep (suspend on RAM) using a hook script to switch to a virtual teminal before to suspend and reswitching out from a vt after suspend
/etc/pm/sleep.d/01_switchvt
cat /etc/pm/sleep.d/01_switchvt
#!/bin/sh
# Switch to a VC before suspending and back after resume
case "$1" in
resume|thaw)
chvt 7
;;
suspend|hibernate)
chvt 1
;;
esac
but when I execute (and also the lxdesession-logout does) the dbus command
dbus-send --session --dest=org.freedesktop.PowerManagement /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.Suspend
the hook script is not executed and the system does not wake-up properly (blank screen and need to reboot from vt1)
Please I apreciate any kind of help,
thanks in advance
Francesco
suspend lubuntu d-bus hook
asked 2 days ago
Francesco Lazzarotto
61
61
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f460482%2fhow-to-run-a-script-before-execute-a-dbus-send-command%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password