Ubuntu – Workarounds for mouse pointer visibility in screen sharing sessions

gnomemouse pointertransparencyxorg

Edit: The problem in Teams has been solved by Microsoft since the question was asked: Teams screen sharing sessions now capture the mouse pointer also on Linux computers. This makes this question asking for a workaround obsolete. However, the solutions presented in the answers may still be applicable for other applications.


I'm doing screen sharing with Microsoft Teams on Linux. My mouse pointer is not visible to the people I share the screen with. This is a known shortcoming of the Linux version: https://docs.microsoft.com/answers/questions/3222/mouse-pointer-not-visible-when-sharing-screen.html

I'm searching for workarounds. Today I have used a terminal window, resized it to the smallest possible size and told people 'look at the upper left corner of this window' while dragging that terminal window across the screen to point out the parts of the screen that I want to draw attention to. I want to find a better workaround.

Ideas:

  1. Use an image with transparency. An improvement over dragging around a terminal window would be to drag around an image of a mouse pointer with transparency around the mouse pointer. The tool 'display' from imagemagick had this property that when displaying e.g. a png image with transparent pixels, it would show the screen content behind those transparent pixels. The current version on ubuntu 18.04, however, shows an opaque checkerboard pattern instead. Is there another image display tool in Ubuntu that can still display transparency in an X11 window?

  2. Have some application display a bright-colored circle (or something else) at the position of the mouse pointer on and off in intervals. Is there an application that can do this?

I am using Ubuntu 18.04, with the default desktop environment (the default desktop is called "ubuntu" on 18.04, it is based on gnome but preconfigured by canonical to resemble the discontinued "unity" desktop).

Best Answer

I have found this workaround, based on an answer to a SE question and first suggested by a user on a Microsoft discussion forum. It works for me in linux mint 19.3 MATE, Ubuntu 20.04, and 18.04.4 (tested both ubuntu versions on a vmware machine).

  • Download find-cursor from https://github.com/arp242/find-cursor
  • Inside the folder of this library, type make and sudo make install.

    • You can ignore warnings (mostly related to docs).
    • If you see an error, you probably need to install some X11 libraries:

      sudo apt install libx11-dev libxdamage-dev libxrender-dev libxext-dev
      
  • In a terminal, use this command:

    find-cursor --repeat 0 --follow --distance 1 --line-width 16 --size 16 --color red
    

The following gif shows the pointer on Ubuntu 18.04 after I followed the previous steps. Notice that the mouse is not visible until I used the find-cursor command (recording with Kazam but it also happens with teams). So far, the mouse works normally (I use it to take notes and draw lines on xournal while I screenshare with teams).

find-cursor on ubuntu for mikewhatever

Related Question