mouse
mouse copied to clipboard
segmentation fault when using mouse lib on RsPI3B
All is in the title just ran :
import mouse
mouse.move(100, 100, absolute=True)
gave me a segmentation fault
The same happened here on Raspberry Pi OS (Raspberry Pi 5), while it worked fine on Linux Mint (PC), even without sudo.
Solution: Run your Python program inside an active X Session. If run inside a console session, the call to XDefaultRootWindow, XRootWindow etc. cause a segmentation fault.
if using without a display, export DISPLAY=:0.0