mouse icon indicating copy to clipboard operation
mouse copied to clipboard

segmentation fault when using mouse lib on RsPI3B

Open bbd666 opened this issue 1 year ago • 2 comments

All is in the title just ran :

import mouse
mouse.move(100, 100, absolute=True)

gave me a segmentation fault

bbd666 avatar Jan 29 '25 09:01 bbd666

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.

hotkeymuc avatar May 07 '25 11:05 hotkeymuc

if using without a display, export DISPLAY=:0.0

bradmartin333 avatar May 20 '25 22:05 bradmartin333