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-copier ignores 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. 🧹
  • Q key 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. πŸŽ€


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 πŸ’…βœ¨πŸ‘‘