
I hate the X11 ICCCM selection system - fanf2
http://www.call-with-current-continuation.org/rants/icccm.txt
======
etaioinshrdlu
Everything in the X11 ecosystem seems to be a pile of hacks on top of hacks on
top of hacks. It sometimes works pretty well and that's amazing! It's kind of
beautiful in a silly way to realize how many layers of hacks are used to build
the desktop experience on Linux.

I don't think terminals are much better. Fun fact about terminal escape
sequences: some of them are timing-dependent. If a byte arrives too slowly, it
will do something different.

The web is also a pile of hacks but at least we have multiple independent
implementations and some standards.

The mess is beautiful. Keep adding layers.

~~~
pcwalton
> The mess is beautiful. Keep adding layers.

No, it's really not. In many ways X11 is behind what the other operating
systems offer, and the emphasis on backwards compatibility above all else is
the reason. For example, Windows has the notion of window privilege, in which
lower-privilege windows are isolated from higher-privilege windows. X11
technically has the XSECURITY extension, but nobody uses it as it breaks
everything, so in practice every X11 app can keylog your browser. It's really
unfortunate that the Linux community is so divided over Wayland, as from a
technical perspective Wayland is sorely needed.

~~~
snagglegaggle
Wayland is problematic as it goes entirely the opposite direction of X11,
which means, for example, that screenshot programs and custom key binding
daemons will not work.

~~~
pcwalton
We now understand that a program that can secretly take screenshots at will
can spy on all your conversations and steal your credit card number. That
isn't _quite_ as bad as root, but, honestly, for most users it's pretty close.

Wayland is absolutely doing the sensible, conservative thing when it comes to
screenshots.

~~~
snagglegaggle
No, I'm pretty sure that was always understood. What Wayland is doing --
breaking expected desktop functionality -- is not sensible at all. Window's
permission model is more sensible as it actually _accomplishes_ something.

Wayland's "fix" isn't one because on the vast, vast majority of systems any
compromised program running under your uid can begin debugging another under
your uid, completely circumventing any permission system Wayland tries to
create. Have a root terminal logged in, or maybe open one later? Any program
under your account now has root if it tries hard enough.

People started freaking out about the _completely normal and expected things_
you could do under X11 and kneejerked themselves into the current Wayland.
Maybe it will eventually be relaxed. If it isn't, I can't expected it to
replace X11.

------
emmelaich
(2001)

Aside, why the few X11 related articles recently?

Has something happened? Is there a debate?

Correction - the author is Conrad Parker aka kfish. Dunno why that is elided
in this version. Conrad has some good rants.

Complete version at
[https://raw.githubusercontent.com/kfish/xsel/1a1c5edf0dc1290...](https://raw.githubusercontent.com/kfish/xsel/1a1c5edf0dc129055f7764c666da2dd468df6016/rant.txt)

Trivia, JW here is jdub and was an early Canonical/Ubuntu employee and their
evangelist.

[https://en.wikipedia.org/wiki/Jeff_Waugh](https://en.wikipedia.org/wiki/Jeff_Waugh)

------
dsr_
Well, it's certainly a rant.

Honestly, I can see why you might want two kinds of objects to pass via
selection: strings, and blobs. But two is an odd number; it ought to be zero,
one, or infinite. Zero doesn't help, and one would be hijacked by incompatible
systems that would have to guess "are they going to want a JSON representation
of this, or a MIME type followed by base64 encoded data?", so I guess that an
updatable registry of types would be ok, just really unwieldy, and ...
nightmares to follow.

~~~
saghm
> But two is an odd number

This is very tangential, but I was very confused when I read this at first due
to the arithmetic meaning of "odd".

~~~
mlyle
Horses have an even number of legs. Behind they have two legs, and in front
they have fore-legs. This makes six legs, which is certainly an odd number of
legs for a horse. But the only number that is both even and odd is infinity.
Therefore, horses have an infinite number of legs. (from fortune).

------
saagarjha
I use a program with multiple selection every day: my text editor. And not
only does it have that, it has multiple cursors, too!

~~~
hyperman1
The icccm uses selection for what we call clipboard. A lot of x11 software
used to put what you selected on the clipboard automatically.

