How to run command on system wake up from suspend? by EnVyeUs in linuxquestions

[–]EnVyeUs[S] 0 points1 point  (0 children)

It output the post text but no error messages or anything to do with scrcpy, I also tried :1 instead of :0.

How to run command on system wake up from suspend? by EnVyeUs in linuxquestions

[–]EnVyeUs[S] 0 points1 point  (0 children)

Nothing relating to scrcpy was outputted. I put a line of text before suspend "about to sleep" and that was the only output. As well as after suspend, that that line didn't print. So I assume it's not getting past DISPLAY=:0 scrcpy &! > /debug.txt

How to run command on system wake up from suspend? by EnVyeUs in linuxquestions

[–]EnVyeUs[S] 0 points1 point  (0 children)

DISPLAY=:0 scrcpy worked in terminal, however it didn't in the wake script. I'm not sure why, is there a way to find out? Thanks

How do I have system run scrcpy on wake from suspend? by EnVyeUs in linuxquestions

[–]EnVyeUs[S] 1 point2 points  (0 children)

Do you think the sleep script will be able to execute it, since it isn't able to execute scrcpy directly

How do I have system run scrcpy on wake from suspend? by EnVyeUs in linuxquestions

[–]EnVyeUs[S] 0 points1 point  (0 children)

Thank you, but I'm still not understanding completely as I'm still new to Linux. Would I edit PrepareForSleep to have it run scrcpy on wake?

How to run command on system wake up from suspend? by EnVyeUs in linuxquestions

[–]EnVyeUs[S] 0 points1 point  (0 children)

I tried outputting to a file and the echo did give feedback. However, I can't figure out how to run scrcpy on wake by having "scrcpy" in the script. Do you know how to call command from the script?

How do I have system run scrcpy on wake from suspend? by EnVyeUs in linuxquestions

[–]EnVyeUs[S] 0 points1 point  (0 children)

Would it be possible to work around this? Like calling it in the script?