Emacs: Sync Copy/Paste Clipboards with Linux X11

By Xah Lee. Date: . Last updated: .

In Linux, if copy/paste doesn't work with other apps, you can add this:

;; after copy Ctrl+c in Linux X11, you can paste by `yank' in emacs
(setq x-select-enable-clipboard t)

;; after mouse selection in X11, you can paste by `yank' in emacs
(setq x-select-enable-primary t)

In X11, there are 2 major copy/paste mechanisms:

The primary selection and clipboard are independent.

References:

If you want to sync X11's “primary selection” and “clipboard” always, see: Linux: Sync X11 Primary Selection and Clipboard

If you have a question, put $5 at patreon and message me on xah discord.
Or support me by Buy Xah Emacs Tutorial

Emacs Tutorial

Emacs Init

Emacs Keys

ELisp

ELisp Examples

ELisp Write Major Mode


Emacs Init

Init Basics

packages

text editing

file

appearance

misc