skip to Main Content

On a machine with Ubuntu20.04 (description Ubuntu 20.04.4 LTS, Codename: focal) and python3.8.11 I’ve installed pyautogui, and it works well. But on a machine with Ubuntu22.04 (description Ubuntu 22.04 LTS, Codename: jammy) and python3.10.4 pyautogui does not work, because pyautogui.position() does not show the correct coordinate of the current mouse position. How can I solve this problem? Any suggestion is welcome. Thanks in advance!

2

Answers


  1. I am also searching for a solution to this issue and this is what I have found.

    1. Try restarting your system after installing pyautogui.
    2. Try using just one monitor.

    Thanks,
    Rahul

    Login or Signup to reply.
  2. Use ubuntu with XORG,It will work

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search