octalmage / robotjs

Node.js Desktop Automation.
http://robotjs.io
MIT License
12.37k stars 961 forks source link

Ubuntu hides mouse cursor even when moving mouse with RobotJS moveMouse #686

Closed HadiModarres closed 3 years ago

HadiModarres commented 3 years ago

Ubuntu hides mouse cursor even when moving mouse with RobotJS moveMouse.

Expected Behavior

I need the cursor to show when I use RobotJS moveMouse

Current Behavior

Cursor hides

Steps to Reproduce (for bugs)

  1. Use any modern Ubuntu distro with unclutter installed (unclutter comes by default with Ubuntu)
  2. Use moveMouse to move the cursor
  3. Mouse cursor hides after a couple of seconds
JonasMatos0 commented 3 years ago

Hi, @HadiModarres Isn't disabling/removing unclutter a viable solution? Other Debian-based distros like PopOS don't come with unclutter by default.

HadiModarres commented 3 years ago

Hi @JonasMatos0

Yea pkill unclutter fixes it, I just wanted to see if there's a workaround for this, as it's awkward to ask the user to kill unclutter or have the app automatically kill it.

Thanks for the info about other debian based distros.

JonasMatos0 commented 3 years ago

Yeah, It's something specific to that environment. Solution is to run a script to disable unclutter before and another to reenable it after, in the same program execution.