-
Notifications
You must be signed in to change notification settings - Fork 15
/
README
81 lines (63 loc) · 3.43 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
autocutsel
http://www.nongnu.org/autocutsel/
https://github.com/sigmike/autocutsel
Copyright (c) 2001-2021 - Michael Witrant
X servers use two schemes to copy text between applications. The first one
(old and deprecated) is the cutbuffer. It is a simple buffer in which any
application can store text. The other scheme is the selection and works
differently. There may be many selections in a single server. An
application does not copy data in a selection, it "owns" it. When
another application wants to retreive the content of a selection, it
asks the owner.
Recent desktop applications (GNOME, KDE, ...) use two selections: the
PRIMARY and the CLIPBOARD. The PRIMARY selection is used when you select
some text with the mouse. You usually paste it using the middle button. The
CLIPBOARD selection is used when you copy text by using, for example,
the Edit/Copy menu. You may paste it using the Edit/Paste menu.
Windows VNC clients keep the Windows clipboard synchronized with the
cutbuffer, but not with the selections. And since recent applications
don't use the cutbuffer, the server's CLIPBOARD is never synchronized
with Windows' one.
Autocutsel tracks changes in the server's cutbuffer and CLIPBOARD
selection. When the CLIPBOARD is changed, it updates the cutbuffer. When
the cutbuffer is changed, it owns the CLIPBOARD selection. The cutbuffer
and CLIPBOARD selection are always synchronized. Since the VNC client
synchronizes the Windows' clipboard and the server's cutbuffer, all
three "clipboards" are always kept synchronized. When you copy some text in
Windows, the cutbuffer and the CLIPBOARD selection are updated. When you
copy text on the server using either the cutbuffer or the CLIPBOARD
selection, the Windows's clipboard is always updated.
To build autocutsel:
./configure
make
If you downloaded autocutsel from git you first have to run ./bootstrap to
build the configure script.
If configure fails because it can't find X or Xaw libraries, you may have to
install the devel packages of these libraries.
On Ubuntu, you may need to install these packages :
sudo apt-get install libc6-dev libxtst-dev xorg-dev
To install it (as root):
make install
To run it:
autocutsel
By default, autocutsel synchronizes the CLIPBOARD selection. You may want to use
the PRIMARY selection instead, if your applications use Motif or another toolkit
not using the CLIPBOARD. To do that, simply run
autocutsel -selection PRIMARY
Some softwares (like Open Office Writer) have trouble when the PRIMARY selection
is requested before the mouse button is released. As a workaround, you can run
autocutsel with the "-buttonup" option and it will only get the selection when
the first mouse button is not pressed.
Any feedback is welcome.
Michael Witrant <mike at lepton.fr>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA