WITH-LOCK-EX(1)
π WITH-LOCK-EX(1) β the chiark-utils-bin era π
okay bestie, so this page lives in the chiark-utils-bin collection, and the manual itself is filed under WITH-LOCK-EX(1) (iykyk, the naming is chaotic, we love her anyway). But the actual star of this page? Her name is xduplic-copier. Let's go π¦
β¨ NAME β¨
xduplic-copier β type into multiple X windows at once π
β¨ SYNOPSIS β¨
xduplic-copier
β¨ DESCRIPTION β¨
So xduplic-copier literally lets you type into multiple X windows at once. That's it, that's the whole vibe. π
She comes with a very basic user interface for picking which windows you wanna type into. No cap β "very basic" is doing a lot of work in that sentence, but we'll get there. π
β¨ OPTIONS β¨
- command-line arguments β
xduplic-copierignores them. All of them. Every single one. She said "not my business" π
β¨ MODES β¨
She pops up a small window with some text in it, and she's got exactly two modes:
Idle: "i 0" (red); Typing "T count" (green)
If you type keystrokes into xduplic-copier, they get replicated to all the selected windows (if there are any, bestie β if there aren't, nothing happens, obviously). You can also still type into the selected windows individually in the normal way, don't worry. π
count is the number of selected windows.
The starting mode is Idle, and you should left-click to start selecting. That's your entry point, girlie β¨
Selecting: "S count" (white)
In this mode xduplic-copier has grabbed the mouse pointer and you can indicate which windows you're gonna want to type into. main character energy honestly π
β¨ MOUSE ACTIONS β¨
- Left-click in
xduplic-copierβ switch between typing and selecting modes. π - Right-click in
xduplic-copierβ quit. bye bestie π - Left-click in another window while selecting β select this window. (Beeps if already selected. π)
- Right-click in another window while selecting β deselect this window. (Beeps if not selected. π)
- Right-click in root window (ie, desktop background) while selecting β deselect all windows. π§Ή
Qkey while selecting β quits. β¨οΈ
β¨ XTERM AND ALLOW SENDEVENTS β¨
okay this is the part where it gets messy, buckle up π«Ά
xduplic-copier does her work by generating synthetic events for the selected windows, using XSendEvent. Unfortunately the xterm authors think that allowing XSendEvent is a security problem.
They are wrong: any untrusted person can already take over your xterms anyway. π
But regardless β the xterm authors have configured xterm to discard synthetic events by default. So yeah, that's a thing.
You can solve this at runtime by bringing up the ctrl-leftbutton menu in each xterm, and ticking the option "Allow SendEvents". Or you can set the allowSendEvents in your xterm X resources. Either one, dealer's choice β¨
Neither of these significantly reduce your security. Indeed, xterm itself allows these properties to be set via the X toolkit system's remote widget property setting arrangements β so it would be possible for xduplic-copier to set this property itself on any xterms it encountered. Unfortunately doing so would be a lot of tedious programming. π
β¨ BUGS β¨
If one of the windows you have selected is closed, and you try typing, xduplic-copier will crash due to an unhandled X11 error. π
If you notice that you've got into this state, you cannot retain your set of selected windows, because there is no way to click on the now-destroyed window to deselect it. Iconic behaviour, honestly. π
You can keep xduplic-copier from crashing by right-clicking on the background in selecting mode, and then reselecting all your windows β which may be marginally more convenient than restarting it. marginally. π
The UI is perhaps excessively sparse. π
β¨ AUTHOR AND COPYRIGHT β¨
Ian Jackson <ijackson@chiark.greenend.org.uk> wrote xduplic-copier some time in 2002, and updated it in 2013. The manpage is from 2013. π
xduplic-copier is govered by the GNU GPL, v3 or later. π«Ά
and that's the whole page, bestie!! this one shipped from Debian back in July 2003, filed under WITH-LOCK-EX(1) in the chiark-utils-bin set β go forth and type into all the windows at once π β¨π
π¦ where this page comes from
- debian bookworm: chiark-utils-bin 7.0.0
- debian trixie: chiark-utils-bin 8.0.1
- ubuntu jammy: chiark-utils-bin 6.1.2+nmu1
- ubuntu noble: chiark-utils-bin 7.0.0build2
- ubuntu questing: chiark-utils-bin 8.0.1
- ubuntu resolute: chiark-utils-bin 8.0.1build1
- ubuntu stonking: chiark-utils-bin 8.0.1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms