Hello,
I have difficulties (not problems, let's remain positive ) with my scripts in sleep.d folder.
To workaround a few things in KDE, Cairo-Dock, gkrellm and my hardware I have to launch a few commands at SUSPEND TO RAM and a few more at RESUME.
However, for some reasons I cannot explain, the commands I have in my script work only for some of them, the others just don't do anything. I do not know how to view logs of such scripts.
Here's my actual script in /etc/pm/sleep.d/:
I have tried ordering the commands differently, I have tried launching only those that don't work, I have a tried a slightly different script (like with the {} and with EXIT, with BASH instead of SH, with *) at the end, without the "sudo -u -g", using dbus Reboot command instead of Quit + nohup cairo-dock, inserting a few "sleep 3" in between commands, etc...) and every time only the same commands work and not the others.
Yes I have tried slipping into 2 files and guess what, the computer refuses to go in sleep mode! I can provide the error from konsole on that if need be. So since with more than 1 script it doesn't want to go to sleep, I have had to put back into one script. All commands work no problem when I launch them myself in konsole.
The commands that do work when launched by the script are the following:
The others never did, not even alone in the script.
Anyone would have ideas?
If not I'll log a bug, maybe there is a bug, who knows.
tnx!
I have difficulties (not problems, let's remain positive ) with my scripts in sleep.d folder.
To workaround a few things in KDE, Cairo-Dock, gkrellm and my hardware I have to launch a few commands at SUSPEND TO RAM and a few more at RESUME.
However, for some reasons I cannot explain, the commands I have in my script work only for some of them, the others just don't do anything. I do not know how to view logs of such scripts.
Here's my actual script in /etc/pm/sleep.d/:
Code:
#!/bin/sh case "${1}" in hibernate|suspend) sudo -u frank -g frank dbus-send --session --dest=org.cairodock.CairoDock /org/cairodock/CairoDock org.cairodock.CairoDock.Quit pkill -5 gkrellm ;; thaw|resume) sudo -u frank -g frank nohup gkrellm > /dev/null 2>&1 sudo -u frank -g frank nohup cairo-dock > /dev/null 2>&1 service fancontrol restart ;; esac
Yes I have tried slipping into 2 files and guess what, the computer refuses to go in sleep mode! I can provide the error from konsole on that if need be. So since with more than 1 script it doesn't want to go to sleep, I have had to put back into one script. All commands work no problem when I launch them myself in konsole.
The commands that do work when launched by the script are the following:
Code:
pkill -5 gkrellm service fancontrol restart
Anyone would have ideas?
If not I'll log a bug, maybe there is a bug, who knows.
tnx!
Comment