3 ms·
Clipboard control in terminals... yet.... not a single mention of OSC 52. <_< Then they are using /tmp to facilitate IPC... What a horrible thing.
by tinix 8y ago
Clipboard control in terminals... yet.... not a single mention of OSC 52.
<_<
Then they are using /tmp to facilitate IPC... What a horrible thing.
- sa46 8y agoAuthor here, OSC 52 looks promising. I didn't realize there was an escape code for clipboard integration. You're the second person to mention /tmp for IPC is bad. Why is it bad? [1]: https://medium.freecodecamp.org/tmux-in-practice-integration-with-system-clipboard-bcd72c62ff7b https://medium.freecodecamp.org/tmux-in-practice-integration...
- tomsmeding 8y agoThe reason is security. It isn't much of a problem on a laptop only you use (since then your home directory is likely none safer), but on a shared machine, or at least a shared file system, other accounts can access stuff in /tmp just fine, e.g. by replacing the file with a symlink. To perform a delete operation on a file, you only need execute permissions on the containing directory (iirc), but nothing on the file itself.
- soraminazuki 8y agoLast time I checked, very few terminals implemented OSC 52.
- tinix 8y agoMost "terminals" just use libvte, which, true, doesn't support most control commands, including OSC 52[1]. However, xterm supports it, alacritty supports it, hterm and many others... A stock Chromebook[2] supports OSC 52, and practically every Linux distro has options. For OSX, I know iTerm supports it if you enable the clipboard integration toggle under preferences. A bigger issue here, though, is a recent discussion about removing support for control sequences, in general[3] for many terminals that use libvte. Some view them as a vulnerability, but others view them as a feature.[4] [1] https://bugzilla.gnome.org/show_bug.cgi?id=795774 https://bugzilla.gnome.org/show_bug.cgi?id=795774 [2] https://chromium.googlesource.com/apps/libapps/+/master/nassh/doc/FAQ.md#Is-OSC-52-aka-clipboard-operations_supported https://chromium.googlesource.com/apps/libapps/+/master/nass... [3] http://seclists.org/oss-sec/2017/q2/197 http://seclists.org/oss-sec/2017/q2/197 [4] http://seclists.org/oss-sec/2018/q2/31 http://seclists.org/oss-sec/2018/q2/31