LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-26-2020, 05:14 PM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Firefox usage problem


using Firefox 78.0.2 on Xubuntu 18.04 (last upgraded 4 days ago) logged to twitter.com i am looking at a promoted video among the tweets. i did right-click with the mouse. the video pauses and a small box pops up with "Copy video address". while holding the mouse button down i move the pointer into that box and release the button to select it. then in a terminal window with a bash shell running i middle-click the 3-button mouse to paste in the video address and i get what was originally copied into the mouse buffer. i tried a lot of variations but none work. i've had many other websites fail like this, before. it seems every site doing a custom copy will fail. does anyone know why? am i doing this wrong (it works fine for plain text)?
 
Old 07-26-2020, 05:35 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,732

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
I would think if the context menu has an option to copy the URL, you should:
1. right-click to display the context menu...(click, not click-and-hold)
2. move the pointer to that entry in the menu and click the left button.
...that should put the URL into the buffer.
3. go to your terminal and middle-button click to paste.
 
Old 07-26-2020, 07:18 PM   #3
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
i've tried that. same issue ... the previous buffer content gets pasted. i do the hold first because for many places, the menu goes away when the button is released.

that video went away. is was an ad for Ritz crackers that i wanted to replay if it would really download and was compatible. right-click brought up only the choice to get the video address.
 
Old 07-26-2020, 07:50 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,732

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Can you past with ctrl-V into address bar of a new tab, or into a GUI text editor?

I’ve not completely figured out when or how (or if) the two buffers sync up...the middle click one and the ctrl-V one, but I suspect the copy from the context menu is going into the ctrl-V buffer.
 
Old 07-27-2020, 01:19 AM   #5
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by scasey View Post
Can you past with ctrl-V into address bar of a new tab, or into a GUI text editor?

I’ve not completely figured out when or how (or if) the two buffers sync up...the middle click one and the ctrl-V one, but I suspect the copy from the context menu is going into the ctrl-V buffer.
i'll try that when i get a chance.

i do know the buffer is not real and that the data comes from the source application each time it is pasted. maybe there is an issue with Xorg not becoming aware of a new source as a result of the copy being done.
 
Old 07-27-2020, 01:41 AM   #6
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
got a new ad with a video so i tried that. it worked! Ctrl-V pasted a URL into the URL input of a new tab. i let it run and it brought up a twitter page with the video in it. it went back and tried the mouse middle button, again, and it pasted the previous content. so there must be at least two buffers or two source locators, however this is being done. it make me more worried about Firefox, now.
 
Old 07-27-2020, 01:51 AM   #7
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,732

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
It’s not just Firefox. It seems to be the difference between the GUI ctrl-C/ctrl-V sequence and the cli/terminal highlight copy/middle mouse paste. Definitely different buffers.
 
Old 07-27-2020, 06:40 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
It's an old story; Xorg uses two clipboards: the "primary" and the "clipboard". Firefox' right-click => copy URL action uses the clipboard, middle-click uses primary.

Solution:
either use a terminal that can paste from clipboard (e.g. Ctrl-Shift-v) or use a clipboard manager that can sync both clipboards and/or copy entries from one to the other.
 
1 members found this post helpful.
Old 07-27-2020, 03:32 PM   #9
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
for now i'll just ^V into a new tab URL space, highlight that new URL, paste it in the terminal. in this case i got to see that this address really just gets a twitter page of the ad (that includes the same video), instead of the raw video i had hoped for (such as an .mp4).
 
Old 07-27-2020, 04:31 PM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Skaperen View Post
for now i'll just ^V into a new tab URL space, highlight that new URL, paste it in the terminal. in this case i got to see that this address really just gets a twitter page of the ad (that includes the same video), instead of the raw video i had hoped for (such as an .mp4).
- it is possible that future versions of firefox (or an addon) will restrict copied text leaking into the primary buffer

- mpv + youtube-dl can play videos from tweets
 
Old 07-27-2020, 04:44 PM   #11
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by Skaperen View Post
using Firefox 78.0.2 on Xubuntu 18.04 (last upgraded 4 days ago) logged to twitter.com i am looking at a promoted video among the tweets. i did right-click with the mouse. the video pauses and a small box pops up with "Copy video address". while holding the mouse button down i move the pointer into that box and release the button to select it. then in a terminal window with a bash shell running i middle-click the 3-button mouse to paste in the video address and i get what was originally copied into the mouse buffer. i tried a lot of variations but none work. i've had many other websites fail like this, before. it seems every site doing a custom copy will fail. does anyone know why? am i doing this wrong (it works fine for plain text)?
This sounds like something I've encountered. I've cut/copied something from an editor, switched to the browser window and tried to copy a video URL/URL-at-the-current-time and paste it into VLC only to get the text I copied in the editor. [scratches head]

Thanks to those who've identified that there are two(!) (why?) clipboards being used. Seems crazy.

Cheers...
 
Old 07-27-2020, 09:52 PM   #12
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
I also copy links via right click from firefox. I then use "shift + insert" to paste the buffer into the terminal. This works in FVWM. I do not know if this method depends on the window manager but you could give it a try.
 
Old 07-28-2020, 11:43 PM   #13
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by rnturn View Post
Thanks to those who've identified that there are two(!) (why?) clipboards being used. Seems crazy.
i'd guess because of 2 different implementors making their own ways to do things. it could be a Firefox thing because it is trying to behave consistent between Microsoft Windows and POSIX systems like Linux or Unix.
 
Old 07-29-2020, 03:48 AM   #14
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Skaperen View Post
i'd guess because of 2 different implementors making their own ways to do things.
No, that's not the reason at all.
I looked it up the other day, and when you read about it it actually makes a lot of sense. In a nutshell: implicit selection vs. explicit selection.

I recommend everyone to install a clipboard manager and stop worrying their pretty head.
 
1 members found this post helpful.
Old 07-29-2020, 07:25 PM   #15
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
this problem does not exist outside of Firefox. so ... why is Firefox not using these implicit and explicit clipboards just the same way their host platform does? why should Firefox need a clipboard manager? why can't Firefox just "do the right thing"?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Monitor bandwidth usage and attempted usage! Depressed_amphibian Linux - Networking 3 06-15-2006 07:13 AM
Memory Usage Spaw Usage Swappiness Issues joelunch Linux - Software 3 01-04-2006 06:16 PM
getting realtime info on memory usage-cpu and harddrive usage steering Linux - Newbie 5 03-03-2005 08:43 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
Controlling CPU usage & memory usage Saravana babu Linux - Software 0 02-18-2004 05:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration