home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux      Getting to be as bloated as Windows!      107,822 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 107,800 of 107,822   
   Maria Sophia to Carlos E. R.   
   Re: PSA: Clipboard differences between C   
   15 Feb 26 14:49:06   
   
   XPost: alt.comp.software.firefox, comp.sys.mac.system   
   From: mariasophia@comprehension.com   
      
   Carlos E. R. wrote:   
   > I found several tools doing things with the clipboard. One letting you   
   > access content from previous operations. But I did not see one listing   
   > the contents of the clipboard.   
   >   
   > Not being a Linux programmer, I'm not aware of the many clipboards you   
   > or Lew mentions. I only know two types:   
   >   
   >   - An ancient method accessed solely with the mouse   
   >   - A newer method accessed via menu or shortcuts.   
   >   
   > Different, but with some apps they mix.   
      
   Hi Carlos,   
      
   You're in good hands with Lew and Paul on the Linux side, since I haven't   
   used it as a daily drive since the Solaris/Redhat/Centos/Ubuntu days.   
      
   I think the issue you raised here is that Lawrence was running his tests   
   under Wayland, which is why his command was wl-paste -l. That tool only   
   works on Wayland, as you are aware, so it is expected that your system   
   prints "Failed to connect to a Wayland server" when you are running X11.   
      
   That does not mean you cannot reproduce the PSA on your Linux box.   
   It only means you need the X11 equivalent of wl-paste.   
      
   What's that?   
   Hell if I know.   
   I haven't had Linux as my daily drive for a long time now.   
      
   But, running a quick search on your behalf, it may be that   
   on X11, the closest equivalent may be xclip or xsel.   
      
   Apparently both can list the clipboard formats the same way   
   wl-paste does on Wayland.   
      
   For example, with xclip you can run:   
      
       xclip -selection clipboard -t TARGETS -o   
      
   That prints the list of offered clipboard formats under X11.   
   It seems, to me, to be the same idea as wl-paste -l, but   
   just for the X11 clipboard instead of the Wayland clipboard.   
      
   If you run that command after copying text from Firefox, then run it   
   again after copying the same text from Chrome, you should see the same   
   pattern that Lawrence showed (assuming the original copy had HTML).   
      
   What we learned, as a team, with the tests mostly done on Linux, was:   
   1. Firefox offers HTML only when it thinks the selection has structure.   
   2. Chromium based browsers always offer HTML plus their internal formats.   
   3. Plain text editors offer only plain text formats.   
      
   That is the core of the PSA. The platform does not matter. The browser   
   decides what formats to place on the clipboard, and the editor decides   
   which one to request when pasting.   
      
   So the only reason you could not reproduce Lawrence's exact command is   
   that you are on X11, not Wayland. If you use xclip or xsel instead, you   
   should be able to see the same differences he demonstrated. I think.   
   --   
   If we think we understand something, we don't. But if we think we don't   
   quite yet understand something, then we're just beginning to understand it.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca