Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Using st with dwm, depending on the way I select text (e.g. mouse vs keyboard), and where the text is (e.g. document body vs address bar), copying text from firefox and pasting it into st does not always work.

Are there two different clipboards?

Is there a way to unify them?

share|improve this question
    
Do you copy with ctrl-c or are you just relying on text-highlighting to copy? –  drs Jun 9 at 16:21

1 Answer 1

In a sense, yes there are two different clipboards (though X11 calls them "selections", and only one of the selections is called “the clipboard”).

In all likelihood, you are thinking of the Primary Selection (an understandable mistake considering that it functions much more like one on Linux distros than it does under Windows or Mac—though, for the record, the same keyboard shortcuts can typically be used to interact with the Primary Selection under Windows and Mac as they are under Linux).

The clipboard is typically controlled via the Ctrl+{c,v} key bindings for Copy and Paste (respectively). The Primary Selection, on the other hand, has several means of interaction. With the mouse, selecting anything automatically places it in the Primary Selection. Then, one can typically middle-click to Paste from it. One can also use the keyboard: {Ctrl,Shift}+Insert may be used for Copy and Paste (again, respectively) from/to the Primary Selection.

Oddly, it seems X's clipboard is not supported by every application. And, though it may seem unfortunate, there is no way to unify the Primary Selection and the Clipboard. However, there are two solutions for you.

  1. Use the Primary Selection
    It is almost universally available and (at least, it my humble opinion) is a fair bit more flexible.

  2. Use an alternative clipboard manager
    There are plenty of third-party clipboard managers out there which offer far more powerful functionality than the built-in.

Just for example, you could use xcmenu or xclip. There are, however, more alternatives than I can count.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.