Disabling primary selection outside of terminalKeyboard shortcut for pasting the primary selectionCopy filename in Nautilus, pastes different formats in Terminal vs normal text fieldInconsistent copy and paste behaviour. Is there a fix?How to use primary selection with tilda/terminalCopy text in Libre Office WriterProcessing clipboard text through a script in between copy and pasteCopy/Paste from Firefox to Terminal (Urxvt)How to prevent copying additional nonvisible textHow can I copy text from xfce4 terminal emulator to the clipboard?
Why 401k contribution as % of salary vs. fixed amount per pay check?
60's or earlier fantasy about two children pranksters who turn out to be persian deities
Why would a berry have a slow-acting poison?
Convention for inverted signal
Cheap and safe way to dim 100+ 60W Incandescent bulbs
Did the US embassy in Kyiv resist hanging Trump's picture while Yovanovitch was ambassador?
Why is the tangent of an angle called that?
Is there any theory why (for Bitcoin) the discrete logarithm problem is so hard to solve?
Why does rm manual say that we can run it without any argument, when this is not true?
I can't understand how probability makes sense
Best fighting style for a pacifist
Is the Moon not in hydrostatic equilibrium?
How often are there lunar eclipses on Jupiter
How does Wall of Roots interact with +1/+1 counters?
What's the difference between 繁盛 and 隆盛?
My advisor wants me to make my PhD thesis weaker
Tiling on Drywall in Shower
Universal example of Lie algebra
How to prepend a character to start of each line in 250,000+ line file using a script?
Calculating the possible number of configurations
Why, in the US, are politicians tried by other politicians?
I peer reviewed a paper and found it to be sound - technically and language-wise. How should I write the review report?
Bought a book that is in the public domain ... but the T&A of company says I can't redistribute it
How to indicate "photograph by"
Disabling primary selection outside of terminal
Keyboard shortcut for pasting the primary selectionCopy filename in Nautilus, pastes different formats in Terminal vs normal text fieldInconsistent copy and paste behaviour. Is there a fix?How to use primary selection with tilda/terminalCopy text in Libre Office WriterProcessing clipboard text through a script in between copy and pasteCopy/Paste from Firefox to Terminal (Urxvt)How to prevent copying additional nonvisible textHow can I copy text from xfce4 terminal emulator to the clipboard?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
I like the ability to highlight something in terminal, then go to some other application (e.g., Firefox) and paste what I've highlighted. Unfortunately, I have a lot of issues with primary selection.
Example 1
I highlight some JSON in terminal that I want to paste in a website. I go to Firefox and highlight the URL, hit backspace and enter a new URL, I have now overwritten what I highlighted in terminal with the URL I just highlighted.
Example 2
I highlight a chunk of code in Visual Studio Code, scroll down and highlight the chunk of code that I want to replace, then hit ctrl+v. Because my most recent highlight was the chunk of code I want to replace, not the code that I want to replace it with, I've now pasted the chunk of code that I want to replace, rather than the code above that I highlighted.
I'd like to retain the ability to highlight in terminal and have it go to primary selection for pasting outside of terminal, but in every other application I'd rather just disable highlight to copy (primary selection).
If nothing else, maybe I'm just doing something wrong here and someone knows a better way to deal with this.
EDIT: As suggested in the comments, I am also open to having the behavior of highlighting text in terminal copy to the primary clipboard. Just so long as highlighting outside of terminal does not do this. In many regards, I am looking for behavior similar to MacOS: highlight in iterm and it automatically is copied, cmd+v in firefox to paste it; highlight in firefox, must hit cmd+c to copy whatever is highlighted.
clipboard
add a comment
|
I like the ability to highlight something in terminal, then go to some other application (e.g., Firefox) and paste what I've highlighted. Unfortunately, I have a lot of issues with primary selection.
Example 1
I highlight some JSON in terminal that I want to paste in a website. I go to Firefox and highlight the URL, hit backspace and enter a new URL, I have now overwritten what I highlighted in terminal with the URL I just highlighted.
Example 2
I highlight a chunk of code in Visual Studio Code, scroll down and highlight the chunk of code that I want to replace, then hit ctrl+v. Because my most recent highlight was the chunk of code I want to replace, not the code that I want to replace it with, I've now pasted the chunk of code that I want to replace, rather than the code above that I highlighted.
I'd like to retain the ability to highlight in terminal and have it go to primary selection for pasting outside of terminal, but in every other application I'd rather just disable highlight to copy (primary selection).
If nothing else, maybe I'm just doing something wrong here and someone knows a better way to deal with this.
EDIT: As suggested in the comments, I am also open to having the behavior of highlighting text in terminal copy to the primary clipboard. Just so long as highlighting outside of terminal does not do this. In many regards, I am looking for behavior similar to MacOS: highlight in iterm and it automatically is copied, cmd+v in firefox to paste it; highlight in firefox, must hit cmd+c to copy whatever is highlighted.
clipboard
I am no expert, but there are two types of 'clipboard'. The one you are using is what I would call single use(deletes as soon as you copy again). Think you would want a more permanent clipboard that keeps everything you copy(unless deleted by you). Look in software store for clipboard and you might find something.
– crip659
Sep 18 at 20:53
1
For Example 1, I have found that if you highlight text in the terminal and then Right-Click->Copy before switching to Firefox, it seems to work.
– Wayne Vosberg
Sep 25 at 7:04
1
For Example 2, I don't have VS but in other editors, if you highlight text and ctrl-c and then highlight the text to replace and ctrl-v it seems to work.
– Wayne Vosberg
Sep 25 at 7:10
2
Although it's not exactly what you've asked for, if someone knows how to make selection in specific applications (like the terminal) copy to the regular clipboard rather than behaving as primary selection, would that be a sufficient solution? I recommend that you edit your question to clarify that (especially if the answer is yes).
– Eliah Kagan
Sep 25 at 8:22
In the KDE clipboard, I think it's called klipper, There's a configuration checkbox for Ignore Selection. That solves your first two issues if your clipboard has a similar option. But, then, you have to use Ctrl+Shift+C to save highlighted text in your terminal into the clipboard and Ctrl+C elsewhere to do the same. If that's not good enough, you can use a tool such as AutoKey which will allow you to setup hotkeys that run scripts that do exactly what you want which can optionally be configured so that which script/behavior occurs is dependent on the active window title/class.
– Joe
Sep 26 at 7:22
add a comment
|
I like the ability to highlight something in terminal, then go to some other application (e.g., Firefox) and paste what I've highlighted. Unfortunately, I have a lot of issues with primary selection.
Example 1
I highlight some JSON in terminal that I want to paste in a website. I go to Firefox and highlight the URL, hit backspace and enter a new URL, I have now overwritten what I highlighted in terminal with the URL I just highlighted.
Example 2
I highlight a chunk of code in Visual Studio Code, scroll down and highlight the chunk of code that I want to replace, then hit ctrl+v. Because my most recent highlight was the chunk of code I want to replace, not the code that I want to replace it with, I've now pasted the chunk of code that I want to replace, rather than the code above that I highlighted.
I'd like to retain the ability to highlight in terminal and have it go to primary selection for pasting outside of terminal, but in every other application I'd rather just disable highlight to copy (primary selection).
If nothing else, maybe I'm just doing something wrong here and someone knows a better way to deal with this.
EDIT: As suggested in the comments, I am also open to having the behavior of highlighting text in terminal copy to the primary clipboard. Just so long as highlighting outside of terminal does not do this. In many regards, I am looking for behavior similar to MacOS: highlight in iterm and it automatically is copied, cmd+v in firefox to paste it; highlight in firefox, must hit cmd+c to copy whatever is highlighted.
clipboard
I like the ability to highlight something in terminal, then go to some other application (e.g., Firefox) and paste what I've highlighted. Unfortunately, I have a lot of issues with primary selection.
Example 1
I highlight some JSON in terminal that I want to paste in a website. I go to Firefox and highlight the URL, hit backspace and enter a new URL, I have now overwritten what I highlighted in terminal with the URL I just highlighted.
Example 2
I highlight a chunk of code in Visual Studio Code, scroll down and highlight the chunk of code that I want to replace, then hit ctrl+v. Because my most recent highlight was the chunk of code I want to replace, not the code that I want to replace it with, I've now pasted the chunk of code that I want to replace, rather than the code above that I highlighted.
I'd like to retain the ability to highlight in terminal and have it go to primary selection for pasting outside of terminal, but in every other application I'd rather just disable highlight to copy (primary selection).
If nothing else, maybe I'm just doing something wrong here and someone knows a better way to deal with this.
EDIT: As suggested in the comments, I am also open to having the behavior of highlighting text in terminal copy to the primary clipboard. Just so long as highlighting outside of terminal does not do this. In many regards, I am looking for behavior similar to MacOS: highlight in iterm and it automatically is copied, cmd+v in firefox to paste it; highlight in firefox, must hit cmd+c to copy whatever is highlighted.
clipboard
clipboard
edited Sep 25 at 9:04
Franz Kafka
asked Sep 18 at 18:53
Franz KafkaFranz Kafka
614 bronze badges
614 bronze badges
I am no expert, but there are two types of 'clipboard'. The one you are using is what I would call single use(deletes as soon as you copy again). Think you would want a more permanent clipboard that keeps everything you copy(unless deleted by you). Look in software store for clipboard and you might find something.
– crip659
Sep 18 at 20:53
1
For Example 1, I have found that if you highlight text in the terminal and then Right-Click->Copy before switching to Firefox, it seems to work.
– Wayne Vosberg
Sep 25 at 7:04
1
For Example 2, I don't have VS but in other editors, if you highlight text and ctrl-c and then highlight the text to replace and ctrl-v it seems to work.
– Wayne Vosberg
Sep 25 at 7:10
2
Although it's not exactly what you've asked for, if someone knows how to make selection in specific applications (like the terminal) copy to the regular clipboard rather than behaving as primary selection, would that be a sufficient solution? I recommend that you edit your question to clarify that (especially if the answer is yes).
– Eliah Kagan
Sep 25 at 8:22
In the KDE clipboard, I think it's called klipper, There's a configuration checkbox for Ignore Selection. That solves your first two issues if your clipboard has a similar option. But, then, you have to use Ctrl+Shift+C to save highlighted text in your terminal into the clipboard and Ctrl+C elsewhere to do the same. If that's not good enough, you can use a tool such as AutoKey which will allow you to setup hotkeys that run scripts that do exactly what you want which can optionally be configured so that which script/behavior occurs is dependent on the active window title/class.
– Joe
Sep 26 at 7:22
add a comment
|
I am no expert, but there are two types of 'clipboard'. The one you are using is what I would call single use(deletes as soon as you copy again). Think you would want a more permanent clipboard that keeps everything you copy(unless deleted by you). Look in software store for clipboard and you might find something.
– crip659
Sep 18 at 20:53
1
For Example 1, I have found that if you highlight text in the terminal and then Right-Click->Copy before switching to Firefox, it seems to work.
– Wayne Vosberg
Sep 25 at 7:04
1
For Example 2, I don't have VS but in other editors, if you highlight text and ctrl-c and then highlight the text to replace and ctrl-v it seems to work.
– Wayne Vosberg
Sep 25 at 7:10
2
Although it's not exactly what you've asked for, if someone knows how to make selection in specific applications (like the terminal) copy to the regular clipboard rather than behaving as primary selection, would that be a sufficient solution? I recommend that you edit your question to clarify that (especially if the answer is yes).
– Eliah Kagan
Sep 25 at 8:22
In the KDE clipboard, I think it's called klipper, There's a configuration checkbox for Ignore Selection. That solves your first two issues if your clipboard has a similar option. But, then, you have to use Ctrl+Shift+C to save highlighted text in your terminal into the clipboard and Ctrl+C elsewhere to do the same. If that's not good enough, you can use a tool such as AutoKey which will allow you to setup hotkeys that run scripts that do exactly what you want which can optionally be configured so that which script/behavior occurs is dependent on the active window title/class.
– Joe
Sep 26 at 7:22
I am no expert, but there are two types of 'clipboard'. The one you are using is what I would call single use(deletes as soon as you copy again). Think you would want a more permanent clipboard that keeps everything you copy(unless deleted by you). Look in software store for clipboard and you might find something.
– crip659
Sep 18 at 20:53
I am no expert, but there are two types of 'clipboard'. The one you are using is what I would call single use(deletes as soon as you copy again). Think you would want a more permanent clipboard that keeps everything you copy(unless deleted by you). Look in software store for clipboard and you might find something.
– crip659
Sep 18 at 20:53
1
1
For Example 1, I have found that if you highlight text in the terminal and then Right-Click->Copy before switching to Firefox, it seems to work.
– Wayne Vosberg
Sep 25 at 7:04
For Example 1, I have found that if you highlight text in the terminal and then Right-Click->Copy before switching to Firefox, it seems to work.
– Wayne Vosberg
Sep 25 at 7:04
1
1
For Example 2, I don't have VS but in other editors, if you highlight text and ctrl-c and then highlight the text to replace and ctrl-v it seems to work.
– Wayne Vosberg
Sep 25 at 7:10
For Example 2, I don't have VS but in other editors, if you highlight text and ctrl-c and then highlight the text to replace and ctrl-v it seems to work.
– Wayne Vosberg
Sep 25 at 7:10
2
2
Although it's not exactly what you've asked for, if someone knows how to make selection in specific applications (like the terminal) copy to the regular clipboard rather than behaving as primary selection, would that be a sufficient solution? I recommend that you edit your question to clarify that (especially if the answer is yes).
– Eliah Kagan
Sep 25 at 8:22
Although it's not exactly what you've asked for, if someone knows how to make selection in specific applications (like the terminal) copy to the regular clipboard rather than behaving as primary selection, would that be a sufficient solution? I recommend that you edit your question to clarify that (especially if the answer is yes).
– Eliah Kagan
Sep 25 at 8:22
In the KDE clipboard, I think it's called klipper, There's a configuration checkbox for Ignore Selection. That solves your first two issues if your clipboard has a similar option. But, then, you have to use Ctrl+Shift+C to save highlighted text in your terminal into the clipboard and Ctrl+C elsewhere to do the same. If that's not good enough, you can use a tool such as AutoKey which will allow you to setup hotkeys that run scripts that do exactly what you want which can optionally be configured so that which script/behavior occurs is dependent on the active window title/class.
– Joe
Sep 26 at 7:22
In the KDE clipboard, I think it's called klipper, There's a configuration checkbox for Ignore Selection. That solves your first two issues if your clipboard has a similar option. But, then, you have to use Ctrl+Shift+C to save highlighted text in your terminal into the clipboard and Ctrl+C elsewhere to do the same. If that's not good enough, you can use a tool such as AutoKey which will allow you to setup hotkeys that run scripts that do exactly what you want which can optionally be configured so that which script/behavior occurs is dependent on the active window title/class.
– Joe
Sep 26 at 7:22
add a comment
|
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1175102%2fdisabling-primary-selection-outside-of-terminal%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1175102%2fdisabling-primary-selection-outside-of-terminal%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I am no expert, but there are two types of 'clipboard'. The one you are using is what I would call single use(deletes as soon as you copy again). Think you would want a more permanent clipboard that keeps everything you copy(unless deleted by you). Look in software store for clipboard and you might find something.
– crip659
Sep 18 at 20:53
1
For Example 1, I have found that if you highlight text in the terminal and then Right-Click->Copy before switching to Firefox, it seems to work.
– Wayne Vosberg
Sep 25 at 7:04
1
For Example 2, I don't have VS but in other editors, if you highlight text and ctrl-c and then highlight the text to replace and ctrl-v it seems to work.
– Wayne Vosberg
Sep 25 at 7:10
2
Although it's not exactly what you've asked for, if someone knows how to make selection in specific applications (like the terminal) copy to the regular clipboard rather than behaving as primary selection, would that be a sufficient solution? I recommend that you edit your question to clarify that (especially if the answer is yes).
– Eliah Kagan
Sep 25 at 8:22
In the KDE clipboard, I think it's called klipper, There's a configuration checkbox for Ignore Selection. That solves your first two issues if your clipboard has a similar option. But, then, you have to use Ctrl+Shift+C to save highlighted text in your terminal into the clipboard and Ctrl+C elsewhere to do the same. If that's not good enough, you can use a tool such as AutoKey which will allow you to setup hotkeys that run scripts that do exactly what you want which can optionally be configured so that which script/behavior occurs is dependent on the active window title/class.
– Joe
Sep 26 at 7:22