On 2011-04-15 17:06, wh1sp3r wrote:
>
> Hello,
> I have problems to get it work. i have tried to use pm-utils, but it
> does nothing.
>
> What is need is to kill application, when pc is going into suspend to
> ram and run that application again on wake. It’s a graphical
> application.
tried to do the above to cure internal mic fail on resume. killing alsasound before sleep and restarting on resume works.
Here’s my code of /etc/pm/sleep.d/sound
#!/bin/bash
case “$1” in
suspend)
/etc/init.d/alsasound stop
;;
resume)
/etc/init.d/alsasound start
;;
*)
;;
esac
exit $?
What am I doing wrong? Wiki for 12.1pm-utils is not available so I’m not sure of new syntax.
On 2012-01-02 20:27, kristyon wrote:
>
> tried to do the above to cure internal mic fail on resume. killing
> alsasound before sleep and restarting on resume works.
> Here’s my code of /etc/pm/sleep.d/sound
>
> #!/bin/bash
>
> case “$1” in
> suspend)
> /etc/init.d/alsasound stop
> ;;
> resume)
> /etc/init.d/alsasound start
> ;;
> *)
> ;;
> esac
>
> exit $?
>
> What am I doing wrong? Wiki for 12.1pm-utils is not available so I’m
> not sure of new syntax.
This is not clear. You first say it works, later you say “What am I doing
wrong?” Please explain.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)
Eum… Why do you hang your question at the end of a three years old
question, even if somewhat related? :-?
> Is there a way to execute a program on resuming the computer without
> superuser rights? (as changing /etc/… requires these superuser
> rights.)
>
> The scripts to be executed only need user rights.
It will depend on whether your desktop of choice implements suitable
hooks. I’m not aware of their existence.
–
Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)