Looks like you drop a .desktop file into ~/.local/share/kio/servicemenus.
Name the file extensions, write your Exec= line, fill in a couple other details like what icon to use and what it should be called in the right-click menu, save it, and you're done.
I imagine it's similar in xfce.
Here's what I might do if I couldn't catch a murderer but wanted to make an example anyway, and I had access to AI art that was very good at getting approximately accurate images of people...
Looks like Thunar has a "Custom Actions" feature under the Edit menu where you can get the same result.