[qubes-users] capturing X selection event

In an AppVM based on Debian-11 template, I would like a bash script running in xfce Terminal to catch an X selection paste event in firefox-esr - is that possible, and where to look? Thanks in advance.