2

With Raspbian Wheezy I could do the following without any problem through a PHP script run by Apache on the local Pi:

exec('env DISPLAY=:0 xdotool mousemove 20 10 2>&1', $output);

But now I have upgraded to the latest Raspbian Jessie it doesn't work anymore. I get the following error in $output:

No protocol specified
Error: Can't open display: (null)
Failed creating new xdo instance

Why is that and how do I fix it?

Note: The X session is running under the pi user and Apache is running under the www-data user.

Note: With Wheezy I used matchbox-window-manager and kweb browser, but now I use LXDE and Chromium that comes with Jessie. I don't think that should matter though, since as far as I recall xdotool also worked with LXDE in Wheezy (don't recall 100% for sure though).

Here is a very similar question but the answer is a work-around that doesn't work for me.

asked Apr 19, 2017 at 9:21

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.