LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   xdotool in a wake-up script (https://www.linuxquestions.org/questions/linux-newbie-8/xdotool-in-a-wake-up-script-4175718020/)

jt1122 10-22-2022 04:15 AM

xdotool in a wake-up script
 
Hi,

I'd like to run xdotool in a script which is to be run when the machine wakes-up from suspend.

I've placed the script in /lib/systemd/system-sleep/ http://t.ly/5225

The script is executed (since it outputs to the /mnt/ramdisk/f file) but nothing happens in the xdotool part:
Code:

#!/bin/bash

case $1/$2 in
  pre/*)
    echo "Going to $2..."
    ;;
  post/*)
    echo "Waking up from $2...">/mnt/ramdisk/f
    xdotool mousemove 720 13
    ;;
esac

Any suggestions?.

Thanks

lvm_ 10-22-2022 06:31 AM

System scripts don't have access to user X shells, you have to provide it e.g. https://forums.fedoraforum.org/showt...n-with-crontab

jt1122 10-23-2022 04:44 AM

Thanks :thumbsup:


All times are GMT -5. The time now is 02:03 PM.