You are not logged in.

#1 2006-06-27 01:45:09

nogoma
Member
From: Cranston, RI
Registered: 2006-03-01
Posts: 217

X clipboard synchronization

Having moved to wmii, I'm now trying to make cut'n'paste between apps work properly. Most things seem to work fine, but some programs (firefox in particular) refuse to paste selections from, say, a terminal or mutt. I googled around a bit, and apparently FF uses a different "kind" of clipboard mechanism; the autocutsel program was recommended as a fix. I'm running it via my xinitrc, but it doesn't seem to help; I'm not sure if I'm invoking it incorrectly, or what. What do other wmii (or ion3, or what have you) users use to make cut'n'paste work reliably? I do know there is wmiipsel, which prints out the current X clip buffer; perhaps making special keybindings using this would work?


-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/

Offline

#2 2006-06-27 04:22:21

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: X clipboard synchronization

I was having the same question, though I solved it with autocutsel, the solution is both helpfull and annoying because now whenever i select a text anywhere (even in firefox), it became the copied text (overwride what was there)
The idea is to sync both PRIMARY and CLIPBOARD

.xinitrc wrote:

if [ -x /usr/bin/autocutsel ]; then
    #this will keep the clipboard in sync
    #   with the primary buffer
    autocutsel -selection CLIPBOARD -fork

    #this will keep the primary in sync
    #   with the clipboard buffer
    autocutsel -selection PRIMARY -fork
fi

Offline

#3 2006-06-27 14:31:24

nogoma
Member
From: Cranston, RI
Registered: 2006-03-01
Posts: 217

Re: X clipboard synchronization

Zoop! Yeah, I was just misusing autocutsel; thanks a bunch!


-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/

Offline

#4 2006-06-27 16:03:17

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: X clipboard synchronization

_Gandalf_ wrote:

I was having the same question, though I solved it with autocutsel, the solution is both helpfull and annoying because now whenever i select a text anywhere (even in firefox), it became the copied text (overwride what was there)

I agree.  You get used to it, but the problem I have is in situations like: select URL posted on IRC, switch to firefox window, hit C-l to go to URL bar.... whoops, it just selected the text and overrode your clipboard... hit delete/backspace, go back to IRC, reselect URL, back to firefox and paste....

_Gandalf_ wrote:

The idea is to sync both PRIMARY and CLIPBOARD

Yes, but this also goofs things up a bit.  It would be best if you could just make middle click paste from CLIPBOARD and sync the PRIMARY selection with CLIPBOARD.

Offline

#5 2006-06-27 16:08:11

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: X clipboard synchronization

phrakture wrote:

I agree.  You get used to it, but the problem I have is in situations like: select URL posted on IRC, switch to firefox window, hit C-l to go to URL bar.... whoops, it just selected the text and overrode your clipboard... hit delete/backspace, go back to IRC, reselect URL, back to firefox and paste....

Exactly and it's very annoying :s

phrakture wrote:

Yes, but this also goofs things up a bit.  It would be best if you could just make middle click paste from CLIPBOARD and sync the PRIMARY selection with CLIPBOARD.

How to do that? i mean is it possible to assign it to another key? coz since I'm on a laptop, middle click is Right + Left at the same time and it's kinda a bit annoying to be done...

Thx phrak smile

Offline

#6 2006-06-27 16:20:34

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: X clipboard synchronization

_Gandalf_ wrote:

How to do that? i mean is it possible to assign it to another key? coz since I'm on a laptop, middle click is Right + Left at the same time and it's kinda a bit annoying to be done...

Yeah, that's why I use a USB mouse on my laptop - I hate touchpads...

Still, there's no way to rebind the middle click to use CLIPBOARD.

I've debated writing a global clipboard handler to do this sort of thing.  Bind global "copy" and "paste" keys to a small app to do the actual work.  If I understand the ICCCM correctly, it should be do-able with very little effort.  I just need the time to do it.  I imagine:

global bind "C-c" "copypaste --copy"
global bind "C-v" "copypaste --paste"

Offline

#7 2006-06-27 18:27:50

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: X clipboard synchronization

Well that would be cool phrak, meanwhile i'll search a bit maybe someone already did that...

thx

Offline

#8 2006-06-27 18:52:21

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: X clipboard synchronization

_Gandalf_ wrote:

Well that would be cool phrak, meanwhile i'll search a bit maybe someone already did that...

thx

xclip is the closest, and you have to use like

xclip -s PRIMARY -o | xclip -s CLIPBOARD

to do that, but there is no "paste"

Offline

#9 2006-06-28 10:44:46

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: X clipboard synchronization

discussion on wmii mailing list

@phrak if there's no paste what we can do with it? you mean bind it to some key to sync one of the directions ??

Offline

#10 2006-06-28 11:03:30

Purch
Member
From: Finland
Registered: 2006-02-23
Posts: 229

Re: X clipboard synchronization

There should be The Arch Way to solve these copy/paste problems ... anyone? 8)

Offline

#11 2016-01-29 12:18:31

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: X clipboard synchronization

@jonaspf,

thanks for posting your solution. But we forbid bumping old threads, especially, super old threads. Please open a thread under the "Community Contributions" section, if you would like, with a link to this thread.

https://wiki.archlinux.org/index.php/Fo … bumping.22

Closing.

Note: On further consideration, I have moved the post to a thread of its own: https://bbs.archlinux.org/viewtopic.php?id=208229

Offline

Board footer

Powered by FluxBB