Ungoogled Chromium on Debian (running on Qubes OS)

I’m running a rather unique setup, and ActivityWatch may not be compatible. Let’s tackle the easy one first.

I’m using Debian, and my browser is Ungoogled Chromium (a modification of Chromium that removes as much Google code as possible). The executable is /usr/bin/chromium. I have the ActivityWatch Chrome plugin installed and aw-qt running, but no activity is being captured when I look in the web UI. If I stop aw-qt, the Chrome plugin sends a notification “Unable to send event to server,” so it’s clearly connecting properly. Why am I not seeing any browser activity? Perhaps I misunderstand how the watcher works.

On to the complicated one. I use an OS called Qubes. It is a Xen-based client hypervisor where you can set up multiple, separate, self-contained VMs. All applications then run in the same window manager (much like VMware’s Seamless or Unity mode where applications launched inside a VM behave natively to the host OS’s window manager). I have ActivityWatch set up inside the Debian VM I use for work which is what I want to be watching. However, it’s not able to collect any data. It IS able to detect if I’m AFK or not, but that’s all. aw-qt is showing an endless loop of warnings in the console:

[WARNING]: window_prop was None (aw_watcher_window.xlib:23)

I’m assuming that this has to do with the way Qubes works and ActivityWatch needs to be running on the host Xen system in order to watch active windows. However, I wondered if there might be a way to get around this.

Thanks for your help!

The browser extension depends on that the window watcher and afk watcher works. This is because there is no WebExtensions API to know whether the user is at the keyboard or even currently focusing the browser window, so we merge together the data from all those 3 buckets to get good estimations.

Is that “window_prop was None” message get spammed all the time or just every now and then? Do you have any events in your aw-watcher-window bucket? If you have events in the window bucket it might simply be that some windows don’t expose information about themselves properly to X11 while others do. If that’s the case and the chromium window exposes information about itself correctly it might simply be that we need to add ungoogled-chromium to this list in the web-ui to properly detect it: https://github.com/ActivityWatch/aw-webui/blob/03a1242/src/queries.ts#L100

I’m getting the “window_prop was None” every second. There is data in the aw-watcher-window bucket, but it’s all from app:unknown and title:unknown. I’m assuming this means this won’t work on Qubes, then. Sad day - that’s what I get for using a weird OS. :stuck_out_tongue:

Ah, that’s a shame.

I guess it’s kind of a feature for a secure OS that one application can’t access information about other applications on the system though.

Perhaps there’s another way to get the information? I can do xdotool getwindowpid and successfully get a result. However, xdotool getactivewindow getwindowname gives the following error:

Your windowmanager claims not to support _NET_ACTIVE_WINDOW, so the attempt to query the active window aborted.

I can’t say that I’ve really looked at the source of ActivityWatch, I’m not an expert in X11, and my overall understanding of how Qubes implements the window manager is limited. However, I know that the windows and processes inside a running VM are to one another and to the OS of the VM itself. If there’s other info I can provide, let me know - I’d love to give ActivityWatch a try!