pyautogui on Container can't Control Mouse

Viewed 113

I'm trying to automate mouse and keyboard using pyautogui on linux container on my chromebook (official linux support) however, the mouse and keyboard are not responding to any function (moving, clicking, pressing keys ....) yet something like pyautogui.alert('This is the message to display.') works and pop up a window.

Is there anyway to make it work on the container?

1 Answers

It has been more than a year since this question was asked, and there still doesn't seem to be any answer... I can confirm that this pyautogui problem still exists. One clue, perhaps, is the error message produced if an attempt is made to run under sudo like this:

sudo idle [python program that controls mouse]

This generates the error message:

_tkinter.TclError: couldn't connect to display ":0"

Some folks seemed to suggest that an appropriate EXPORT statement might help this problem, but I couldn't determine the exact details...

I really hope there is some solution/workaround for this problem since manipulating the mouse & keyboard is critical in many applications!

Related