LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-22-2022, 04:15 AM   #1
jt1122
Member
 
Registered: Apr 2021
Posts: 140

Rep: Reputation: Disabled
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
 
Old 10-22-2022, 06:31 AM   #2
lvm_
Member
 
Registered: Jul 2020
Posts: 942

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
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
 
Old 10-23-2022, 04:44 AM   #3
jt1122
Member
 
Registered: Apr 2021
Posts: 140

Original Poster
Rep: Reputation: Disabled
Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
xdotool, XSendEvent or something like them jovie Linux - Software 1 01-09-2012 10:06 AM
LXer: Trigger keyboard and mouse actions with your voice and xdotool LXer Syndicated Linux News 0 09-06-2011 02:10 AM
Can I wake up a server in "standby" or "memory" mode using wake-on-lan? songweijia Linux - Server 2 03-03-2010 06:51 PM
how to send with xdotool a window to another Desktop X number? frenchn00b Linux - General 1 10-23-2009 12:31 PM
wake on lan magic packet does not wake. albean Linux - Networking 1 06-30-2007 03:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration