|
|
Subscribe / Log in / New account

You must be joking

You must be joking

Posted Nov 7, 2010 4:08 UTC (Sun) by dlang (guest, #313)
In reply to: You must be joking by zander76
Parent article: LPC: Life after X

a simple example of how you can run into problems.

think about doing a text cut-n-paste between two terminal windows of different widths where the source is multiple lines, some of which wrap.

many windows apps do this wrong, most *nix apps handle this correctly.


to post comments

You must be joking

Posted Nov 7, 2010 4:13 UTC (Sun) by zander76 (guest, #6889) [Link] (1 responses)

Yeah, windows is really annoying with how they do it. They simply encode return characters at the end of every line in the terminal and not the actual return characters in the terminal text.

You must be joking

Posted Nov 7, 2010 4:35 UTC (Sun) by zander76 (guest, #6889) [Link]

The question leads me back to my original question which is "Does the application know how to copy and paste to itself". In the windows case it doesn't encode the text correctly right from the very beginning and has nothing to do with the system wide copy/paste function.

You must be joking

Posted Nov 7, 2010 4:58 UTC (Sun) by drag (guest, #31333) [Link] (14 responses)

I am sure that everybody here is aware of this, but I just like to point it out time to time to remind everybody. It's like trying to explain how Windows 98 sucked to people that used Windows 98 for 7 years or more... they often don't realize how crappy something is because they have lived with it and avoiding it's problems has become second nature.

In Linux on Gnome:

1. Open up Gnome-terminal. Highlight some text and right click, select copy. Highlight some other text.
2. Close out Gnome-terminal
3. Open up Gedit.
4. Middleclick to paste, then right click paste.

Notice how you have 2 copy-n-paste buffers. Highlighting text makes the first buffer go away and be replaced by new text. This makes it almost entirely worthless for anything except working with a terminal. Using middlelick copy is one of those habits I wish I can break myself from doing.

The second buffer works in a sane way.

Almost.

5. Open up firefox. Highlight some text, Right click copy.
6. Close out firefox.
7. Attempt to paste text into Gedit.

Notice something wrong?

The only people that get it right are Gnome apps that religiously follow the HIG. Probably KDE-only apps get it right, too. Everybody else gets it wrong almost every single time. Some apps will clear everything out every time. Some apps will override one buffer with another in order to be helpful. All sorts of really weird and crappy behavior.

It's something that is fundamentally broken with X and has been since the beginning of time. I don't think there is any sane way to fix it as nobody has been able to do so. Even with aggressive clipboard managers it's still a bit hit or miss if it works sometimes.

You must be joking

Posted Nov 7, 2010 5:05 UTC (Sun) by dlang (guest, #313) [Link] (13 responses)

the ability to highlight text and then middle click to paste is one of the things that I love about linux, not just when working with terminals (I paste things from webforms, pdfs, etc into webforms and applications all the time.

I do get annoyed once in a while by apps that use the second clipboard, and I've never taken the time to figure out the difference between the two. but for the most part I find that if just highlighting doesn't work, shift + highlighting almost always does.

You must be joking

Posted Nov 7, 2010 13:51 UTC (Sun) by drag (guest, #31333) [Link] (12 responses)

Yeah. I used to feel that way also. But since then I've changed my mind. Using middleclick is impossible to use if you want to perform a 'replace' on some text.

A simple example is try pasting a URL into your browser bar, at pretty much any point without opening a extra tag. Also many many times I'll lose my buffer by simply clicking on a terminal window and accidentally highlighting some whitespace or some tiny portion of text.

The advantage to the second buffer is mainly that you control when things are inserted. With a primary, traditional, X copy buffer it is often wiped out many times during the course of normal text manipulation in a GUI.

I wouldn't mind having 2 buffers at all except that how applications and X handles these buffers is broken. It's very inconsistent so you either have to learn how each and every application you typically use is going to behave, or you just end up having to copy stuff multiple times quite often.

You must be joking

Posted Nov 8, 2010 2:46 UTC (Mon) by madscientist (subscriber, #16861) [Link] (11 responses)

Yes but the answer to the browser bar problem is NOT to destroy the incredibly useful cut/paste behavior of traditional X. Rather, it's simply to have a button on the browser bar that will clear the @#$%& text when you press it, without requiring you to select the text first. How hard is that? I can't believe it's 2010 and we still don't have that as a default part of the browser.

You must be joking

Posted Nov 8, 2010 3:39 UTC (Mon) by dlang (guest, #313) [Link] (2 responses)

my work-around is to just open a new tab to paste the URL into (and a history of doing this is why I have a couple hundred tabs open :-)

You must be joking

Posted Nov 8, 2010 7:07 UTC (Mon) by mp (subscriber, #5615) [Link] (1 responses)

In Firefox middle-clicking anywhere in the window opens the URL from the selection, no need to open new tabs and aim at the tiny address bar.

You must be joking

Posted Nov 8, 2010 7:14 UTC (Mon) by dlang (guest, #313) [Link]

that's a configurable option. I don't remember when I first ran into it, but I hunted down how to disable it and have happily used the middle mouse button to open a link in a new tab instead (I got _so_ annoyed at slightly missing a link or text bar and the entire page disappearing on my when firefos opened some random URL that it thought I wanted to go to, or a search for the text that happened to be in the clipboard)

You must be joking

Posted Nov 8, 2010 3:54 UTC (Mon) by sfeam (subscriber, #2841) [Link] (1 responses)

a button on the browser bar that will clear the @#$% text when you press it
Konqueror has this, and I love it. That, the built-in site filtering, and the filebrowser are enough to keep me using konqueror rather than firefox.

You must be joking

Posted Nov 8, 2010 15:53 UTC (Mon) by jackb (guest, #41909) [Link]

There is a Firefox addon called Clear Fields that adds the functionality you are looking for.

You must be joking

Posted Nov 8, 2010 8:56 UTC (Mon) by nicooo (guest, #69134) [Link]

I works fine with opera. X can't be blamed for people designing broken programs.

You must be joking

Posted Nov 9, 2010 5:20 UTC (Tue) by njs (subscriber, #40338) [Link] (2 responses)

AFAICT Firefox has an interesting tweak to this -- Control-L selects the text in the URL bar, *without* claiming the PRIMARY selection (which selecting the same text with the mouse would do). So to paste the PRIMARY selection into the current tab's URL bar, one can use the sequence: Control-L, backspace, middle-click.

You must be joking

Posted Nov 14, 2010 4:57 UTC (Sun) by tnoo (subscriber, #20427) [Link] (1 responses)

... which is exactly why I hate using FF. Konqueror has a "delete" button to rub out the old URL.

You must be joking

Posted Nov 14, 2010 6:10 UTC (Sun) by bronson (subscriber, #4806) [Link]

In FF just middle-click the favicon to the left of the URL. Instead of taking 2 clicks, it takes a single click.

Seems a rather weak reason to hate a browser.

You must be joking

Posted Nov 15, 2010 16:24 UTC (Mon) by wookey (guest, #5501) [Link]

ctrl-U used to provide this vital feature and then some eejit decided that that in a browser that should open a window with the page source in it. That was _such_ a painful decision and still enrages me on a daily basis on machines where I haven't persuaded the system to change the keybinding. (where did it come from?).

Ctrl-U can still be made to work (as 'clear line/box'), but it gets harder to find the rune every year. A button to prod for the same function would indeed be a useful alternative.

Like many here I find middle-button paste to be one of the finest things about GNU/Linux, and it's extremely tiresome when you get apps that don't do it right. I really hope it does not get sacrificed as part of the GUI re-architecting that it looks like we are headed for.

I use remote-X-over-ssh for graphical apps fairly regularly and it's extremely useful, but accept the argument that we can achieve much the same effect by other means (SPICE/VNC/NX/whatever). I hope that does indeed come to pass.

A similar button does exist.

Posted Nov 18, 2010 3:52 UTC (Thu) by gmatht (guest, #58961) [Link]

In Google-Chrome middle-click the (+) new tab button to open a new window with that URL, this also works for searches.

With Firefox, middle-click the icon to the left of the icon bar. However this does not work for searching for non-urls; see the patch to implement middle-clicking on the search icon at: https://bugzilla.mozilla.org/show_bug.cgi?id=414849. I would be particularly interested to know if you would find the functionality implemented by this patch useful.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds