rescuetime doesn’t record windows on Ubuntu 21.04 (solved)

Just upgraded to Ubuntu 21.04 (Hirsute Hippo) and had RescueTime break on me. It basically only seemed to see when I was using Zoom.
Tried all sorts of things (adding exceptions to Firefox, asking for help, and so on), but nothing worked.

The problem, I was pretty sure, was that the three key commands that are supposed to work to enable RescueTime to know what you are doing on your computer were not working:

xprop -id `xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" | cut -d# -f2 | cut -d, -f1` | grep "NET_WM_PID" | cut -d"=" -f2 2>/dev/null

xprop -id `xprop -root 2>/dev/null | grep "_NET_ACTIVE_WINDOW(WINDOW)" | cut -d# -f2 | cut -d, -f1` 2>/dev/null | grep "WM_CLASS(STRING)" | cut -d"\"" -f4 2>/dev/null

xprop -id `xprop -root 2>/dev/null | grep "_NET_ACTIVE_WINDOW(WINDOW)" | cut -d# -f2 | cut -d, -f1` 2>/dev/null | grep "WM_NAME(STRING)\|WM_NAME(COMPOUND_TEXT)" | cut -d" -f2 2>/dev/null

The first threw an error, the second two produced no return.

Finally I discovered the cause: Ubuntu 21.04 uses Wayland, rather than X11/Xorg as the default window manager, and one of the features of Wayland is that it prevents apps doing precisely what RescueTime is trying to do: track what’s going on in other windows. Apparently this breaks all activity sniffers.

The solution is simply if not elegant: Log out of your (Wayland) session and then log back in using X11 as your Windows manager. You change your session by going to the log-in screen (i.e. where you would type in your password) and, before you do, clicking on the little gear icon: X11 session is one of the options.

Did this and problem solved, AFAICS.

tags:


Follow

Get every new post delivered to your Inbox

Join other followers: