Wake up screen using System(xset...)

I have a laptop as my asterisk server, and would like to wake up the screen when a call arrives. I’ve tried the System command as:

and it does not do the trick. Yes, I’ve added the command to the sudoers file, and tried other combinations of the command.

Does anyone have an idea how I could do this?

JG

Just a thought, add this to your crontab file and schedule it to run. See if it your commands actually work.

Great suggestion. I did that, and it led me to the solution which is to set the environmental variable XAUTHORITY to the owner of the X session:

and then use the system command in my asterisk extension.conf.

JG