Minecraft hides the X11 cursor during normal gameplay, as moving the mouse changes the view of the camera, like in most first-person games.

During gameplay, pressing e is supposed to open up the inventory, and restore the cursor. (So that you can click things. Minecraft doesn't use any sort of fancy cursor art, it just uses the system cursor here.) Lately, pressing e will open the inventory, but not show the cursor. The mouse still works fine: hovering over things will cause them to highlight, clicking works just fine. Everything is great except I have no idea (aside from hints from hovering and clicking) where my cursor actually is.

At some point, I hoped exiting minecraft would fix this, so I quit. I still, of course, have no cursor.

In X11, is there a way to force a cursor that's been hidden by a program such as Minecraft to be restored?


Well, while I was hoping for some generic xunhidemycursor, an answer actually turned out to be in Minecraft. (I would still love to have a generic command.)

In Minecraft, you can travel between "dimensions", the two primary ones being the Overworld and the Nether (hell, essentially). Travel involves an interstitial loading screen, during which, the cursor reappears; this is usually brief as it will hide again once the load finishes and gameplay resumes.

While pressing e for inventory should unhide the cursor, and did not, in my case, travelling to the Nether (and thus forcing that screen) caused the cursor to reappear during that screen, and thereafter whenever it should. (i.e., it hid when the load finished, and I was in the Nether, but pressing e at that point, or Alt+Tab, etc. caused the cursor to properly unhide.)

| improve this answer | |

I had a similar issue with the window manager Awesome. When switching from external display to the laptop LCD the cursor would disappear occasionally.

One way to get it back was to use the unclutter program:

$ unclutter -idle 1 -root -grab -visible

Unclutter is used to hide the cursor for touchscreen applications, on-screen recordings etc. Here we use it to "hide" the already invisible cursor and restore it once we terminate the program (with Ctrl+C).

In Debian/Ubuntu, you can simply install unclutter via apt:

$ sudo apt-get install unclutter

Original source for this solution: https://askubuntu.com/questions/118001/how-to-restart-only-missing-invisible-mouse-pointer-cursor

Which in turn cites this as it's source: https://stackoverflow.com/questions/660613/how-do-you-hide-the-mouse-pointer-under-linux-x11/696855#696855

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.