You are not logged in.

#51 2009-09-11 19:48:36

ugkbunb
Member
Registered: 2009-02-26
Posts: 227

Re: Linux clipboard HELL

XFire wrote:

I find it annoying when I copy a file name from XFCE to paste it somewhere else, and close the name dialogue and there too goes the text which I copied. That is one of the few Windows features that I miss.

Install any one of the number of different clipboard managers and yoru cut/paste will persist after the app is closed... I have tried out a few and settled on Parcellite - works great and low on the dependencies.

Offline

#52 2009-09-11 21:40:20

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: Linux clipboard HELL

Willie Green wrote:

I realize that my gripe is tangential to the main topic of two different clipboards in linux.
But I had found it so hugely convenient and useful to have my clipboard pop-up fully integrated with a text-clip library when I was using Windows that I'm totally flabergasted and dumbfounded that such a basic utility doesn't seem to exist in the linux world. But then again, maybe something does and I just haven't discovered it yet.

I think the responses to your post, in addition to opinions I have
gathered elsewhere, would seem to indicate that while you may consider it "such
a basic utility", not everyone would agree with you.  I for one have never used
a clipboard application except Windows 98's Clipboard Viewer.  (Is there even a
clipboard viewer in Windows anymore?  I wouldn't know.)

In any case, the absence of an app <speculation>which most people don't
use</speculation> doesn't strike me as worthy of the horror with which you treat
it.  It probably means that not enough people have expressed interest in such an
app to cause anyone to write it.  In that case, now's your chance to act.  smile

Offline

#53 2009-09-11 22:12:17

Anikom15
Banned
From: United States
Registered: 2009-04-30
Posts: 836
Website

Re: Linux clipboard HELL

The clipboard should be in the kernel (or a tight knit program). Every user has a clipboard file like ".clipboard" or something, and applications send a clip to this process and it gets stored in the file. The keys to copy, cut, and paste are application specific.


Personally, I'd rather be back in Hobbiton.

Offline

#54 2009-09-12 01:14:34

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: Linux clipboard HELL

Anikom15 wrote:

The clipboard should be in the kernel <snip> The files to copy, cut, and paste are application specific

Err... o.o'

Offline

#55 2009-09-12 08:00:53

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: Linux clipboard HELL

Willie Green wrote:
Heller_Barde wrote:

doesn't matter really anyway big_smile because of exactly that kind of abstraction, this program was so incredibly useful, i imagine.

Yes, as a matter of fact, one of my most frequent uses for it was to post prewritten responses to repetitive questions that were posted on internet forums.  big_smile

I'm sure we've all posted a well-thought-out answer to somebody's question at some time or other, complete with links directing them where to go for more specific reference information. Then 2 days, or 2 weeks, or 2 months later, you come across discussions where somebody different is asking the very same thing. roll

(..)
Simply popup your clipboard and paste the same answer you posted on the previous theads!!! cool
(..)

LOL! I can think of 1001 uses for text clips.

the line between 'pasting from clipboard' and 'pasting predefined snippets of text' is blurring here.
I don't need that many buffers/clipboards, and usually I just want to paste what I copied last.
But yes, I do have some predefined files containing my address, email, some common phrases etc which I can paste with the right combo.  See also http://bbs.archlinux.org/viewtopic.php?id=71938

it would be nice to have these integrated. Eg there would be 'copy to clipboard', 'copy to secondary', and maybe about 50 slots for these, and 'copy and save as snippet' to save it permanently as a snippet.  Then, for pasting there would be paste from clipboard and from secondary (by default you get the last entry, but there could be a keycombo to use dmenu to select any item from the list of 50 slots) and then you could paste from your collection of snippets.

I think the aforementioned topic already has nice scripts to use as a base for choosing items to paste. now you just need the part where you save things as a snippet


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#56 2009-09-12 12:48:04

Willie Green
Member
Registered: 2009-06-12
Posts: 70

Re: Linux clipboard HELL

Trent wrote:
Willie Green wrote:

I realize that my gripe is tangential to the main topic of two different clipboards in linux.
But I had found it so hugely convenient and useful to have my clipboard pop-up fully integrated with a text-clip library when I was using Windows that I'm totally flabergasted and dumbfounded that such a basic utility doesn't seem to exist in the linux world. But then again, maybe something does and I just haven't discovered it yet.

I think the responses to your post, in addition to opinions I have
gathered elsewhere, would seem to indicate that while you may consider it "such
a basic utility", not everyone would agree with you.  I for one have never used
a clipboard application except Windows 98's Clipboard Viewer.  (Is there even a
clipboard viewer in Windows anymore?  I wouldn't know.)

In any case, the absence of an app <speculation>which most people don't
use</speculation> doesn't strike me as worthy of the horror with which you treat
it.  It probably means that not enough people have expressed interest in such an
app to cause anyone to write it.  In that case, now's your chance to act.  smile

Well Trent, it truly makes me sad to disagree with you.
Believe me, after 20+ years of captivity in MicroSoft Hell, my migration to linux a year and a half ago was one of the most joyous events in my computing experience. But if there was ever just one piece of software that would ever make me go back, it would be this little clipboard utility.

And I'm not the only person in the world that finds something like this useful.
Here's a link to Windows Clipboard Utilities at Nonags (one of the good places where I used to get my Windows shareware and freeware.) I have no problem finding alternative apps for the Windows environment.
Compared to what's available in the linux world, working with xclipboard or parcellite is like going back to using edlin to edit DOS batch files. (Well, that may be a bit of an exageration... but not much.)

But I really am puzzled as to why the linux community seems to have completely missed development of comparable apps in this area. It is truly bewildering to me.


"Some people march to a different drummer - and some people polka"

Offline

#57 2009-09-12 14:53:31

Eni
Member
From: Tours, France
Registered: 2007-07-17
Posts: 12

Re: Linux clipboard HELL

Actually, I don't see what you want that glipper doesn't do.
Glipper can use text snippets, manage middle mouse bouton and Ctrl+C/Ctrl+V buffer, etc...
It can even sync different processes through network.
You have just to press Ctrl+Alt+C and it shows you a menu with all you can paste.

I think that klipper can do approximately the same things on KDE.


"Je verrais le monde de bas en haut, c'est peut-être plus rigolo.
Je n'y perdrai rien par surcroît : il est pas drôle à l'endroit."

Offline

#58 2009-09-12 18:54:40

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: Linux clipboard HELL

for those who care.  I created a packaged version for the "snippet paster thing".  see http://bbs.archlinux.org/viewtopic.php?id=71938
I'll probably add some features to create "volatile snips" which is basically like some clipboard slots.  but i need to think a bit about how i will implement it. any ideas welcome.  (see my thoughts in my last post, which is a few posts above this one)


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#59 2009-09-12 20:37:11

Willie Green
Member
Registered: 2009-06-12
Posts: 70

Re: Linux clipboard HELL

Eni wrote:

Actually, I don't see what you want that glipper doesn't do.
Glipper can use text snippets, manage middle mouse bouton and Ctrl+C/Ctrl+V buffer, etc...
It can even sync different processes through network.
You have just to press Ctrl+Alt+C and it shows you a menu with all you can paste.

It looks as if glipper might provide the same functionality, although the interface appears more clumsy and awkward to use. It's much easier to simply click on a stored text clip that's visible in the same window as the clipboard slots and have it paste exactly the same as if it was coming from the clipboard (rather than having to access the stored clips or "snippets' through some kind of pull-down menu system.)

I did download glipper with pacman, but it didn't launch for me as easily as xclipboard or parcellite. Perhaps that's because it's a gnome panel app and I don't have a panel configured on my fluxbox desktop. So I have to figure out why it's not working and get back to you.

I assume Klipper may work as well, although the screenshots I viewed at KDE appear even more awkward than Glipper. (Maybe that's an unfair impression, but I'm reluctant to install KDE apps on my fluxbox system anyway.

It would be nice to have a variant that launched itself into the system tray on my fluxbox toolbar. And wasn't tied in so specifically to KDE or the Gnome desktop.
Parcellite does that. All I'm really looking for is parcellite with an integrated library of permanently stored clips.


"Some people march to a different drummer - and some people polka"

Offline

#60 2009-09-12 23:07:30

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: Linux clipboard HELL

@Willie Green

parcellite saves its history in ~/.local/share/parcellite/history.
It should be possible to write a script which utilizes this to accomplish what you want.


To know or not to know ...
... the questions remain forever.

Offline

#61 2009-09-12 23:52:19

Willie Green
Member
Registered: 2009-06-12
Posts: 70

Re: Linux clipboard HELL

bernarcher wrote:

@Willie Green

parcellite saves its history in ~/.local/share/parcellite/history.
It should be possible to write a script which utilizes this to accomplish what you want.

I suppose so... if I knew how to write a script... sad
But honestly, it wasn't my intent to seek workaround solutions for my personal desire for this type of utility.
The topic of this thread is "Linux clipboard HELL", and all I had hoped to do was communicate to all the good people here what a handy, utilitarian app I had available way back when I was using Windows... and all the similar apps that are available in the Windows world. I don't wish to criticize linux or all the clever scripts that folks might write. But I do have a long-shot dream that maybe some talented software developer will read this thread and be inspired to write a handy-dandy little program that brings linux up to speed with the windows apps.

I want my linux software to be as good or better than Windows.
And shockingly, the clipboard seems to be an area where it is not.


"Some people march to a different drummer - and some people polka"

Offline

#62 2009-09-14 09:21:13

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: Linux clipboard HELL

My two cents:
I use glipper-old (you can almost surely install it with -d options as the package brings many unneeded deps) and xclip.
Just before pasting I select what I want pasted in glipper-old and press shift+ins.

Example of use:
$ ls | xclip, go to the text area, clean the text, call glipper-old key select the file list, shift+ins.

Last edited by ezzetabi (2009-09-14 09:21:40)

Offline

#63 2009-09-14 15:42:10

Isengrin
Member
Registered: 2008-08-07
Posts: 166

Re: Linux clipboard HELL

zowki wrote:

I think the biggest problem is copying from firefox and pasting in urxvt. Anyone have any tips for that?

I copy with ctrl+c, then paste with shift+ins, and works.


BTW, I have no idea how the clipboards work, and at first I found them annoying, but eventually I unconsciously learned to deal with them. =)


The Wheel weaves as the Wheel wills, and we are only the thread of the Pattern."
—Moiraine Damodred

Offline

#64 2009-09-14 16:07:53

ugkbunb
Member
Registered: 2009-02-26
Posts: 227

Re: Linux clipboard HELL

Willie Green wrote:
bernarcher wrote:

@Willie Green

parcellite saves its history in ~/.local/share/parcellite/history.
It should be possible to write a script which utilizes this to accomplish what you want.

I suppose so... if I knew how to write a script... sad
But honestly, it wasn't my intent to seek workaround solutions for my personal desire for this type of utility.
The topic of this thread is "Linux clipboard HELL", and all I had hoped to do was communicate to all the good people here what a handy, utilitarian app I had available way back when I was using Windows... and all the similar apps that are available in the Windows world. I don't wish to criticize linux or all the clever scripts that folks might write. But I do have a long-shot dream that maybe some talented software developer will read this thread and be inspired to write a handy-dandy little program that brings linux up to speed with the windows apps.

I want my linux software to be as good or better than Windows.
And shockingly, the clipboard seems to be an area where it is not.

Maybe this would be a good project for the newly unveiled Arch Bounty system.

Offline

#65 2009-09-14 17:25:13

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: Linux clipboard HELL

Isengrin wrote:
zowki wrote:

I think the biggest problem is copying from firefox and pasting in urxvt. Anyone have any tips for that?

I copy with ctrl+c, then paste with shift+ins, and works.


BTW, I have no idea how the clipboards work, and at first I found them annoying, but eventually I unconsciously learned to deal with them. smile

Hmm. shift-insert enters what i have in my selection buffer (not really needed, i could just as well middleclick).
but 'insert' does not enter the contents of the clipboard sad

so everytime i copy something i have to paste it somewhere, then select it, before i can paste it in urxvt


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#66 2009-09-14 18:55:39

ugkbunb
Member
Registered: 2009-02-26
Posts: 227

Re: Linux clipboard HELL

^^
you could just bind a key to a "xsel -bo | xsel -p" -- that should take your clipboard selection and pipe it to your primary selection which should allow you to paste into urxvt via the middleclick

Offline

#67 2009-09-14 19:25:54

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: Linux clipboard HELL

ugkbunb wrote:

^^
you could just bind a key to a "xsel -bo | xsel -p" -- that should take your clipboard selection and pipe it to your primary selection which should allow you to paste into urxvt via the middleclick

hmm well I don't like to waste one of my clipboards, and i don't like needing to do a keypress and then again a keypress/mouseclick for the pasting.

so I'm trying something like this in .xbindkeysrc:

"xdotool type $(xsel -bo)"
 alt+insert

this should type what is in my primary selection buffer when i press alt+insert.  but it doesn't exactly work.  you guys should try it.  do it a few times and see what happens big_smile


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#68 2009-09-14 19:42:41

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Linux clipboard HELL

Dieter@be wrote:

"xdotool type $(xsel -bo)"
alt+insert

This should preserve the spaces: "xdotool type "$(xsel -bo)"", but there is still the unicode problem.

Offline

#69 2009-09-15 11:11:40

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: Linux clipboard HELL

Procyon wrote:
Dieter@be wrote:

"xdotool type $(xsel -bo)"
alt+insert

This should preserve the spaces: "xdotool type "$(xsel -bo)"", but there is still the unicode problem.

thanks.  I don't really mind to being bound to ascii.  It would be very rare that I want to paste a string in my terminal who contains non-ascii chars.

I'm now at work and tried xdotool type --clearmodifiers but it doesn't work at all. It just puts '[2~' in my terminal. (also without --clearmodifiers it doesn't work). i'll try again at home and sync my configs smile

edit: I created a separate thread for this urxvt-specific issue http://bbs.archlinux.org/viewtopic.php?pid=619897

Last edited by Dieter@be (2009-09-15 17:34:11)


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#70 2009-09-15 18:58:54

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: Linux clipboard HELL

A simple suckless clipboard manager. uses dmenu to select earlier entries

#!/bin/sh

# This file implements basic clipboard management features.
# supported args: load_primary, load_clipboard, save_primary, save_clipboard.
# first you make 4 keybinds for this script with each of the options.
# the save_* options do what the name implies (no difference from what you're used to) but they also create a file in your $XDG_CACHE_HOME, so that you can reuse the contents later
# with the load_* options you are presented a dmenu so you can pick an entry and have it entered in your application
                 

clips_dir=${XDG_CACHE_HOME:-$HOME/.cache}/snip/clips/

mkdir -p $clips_dir &>/dev/null

# load actions. use these if you want to retrieve a value from primary or clipboard other then the current value. (well you can use it to get the current value also, but it's more efficient to get it directly)
# maybe we should forsee an option to move the chosen one to spot #1 but not sure if that's needed
# they ordered by last atime

if [ "$1" == 'load_primary' ]
then
        list=
        for i in `ls -tu $clips_dir | grep '^prim'`
        do
                list="$list$i: `cat $clips_dir/$i | tr '\n' ' '`\n"
        done
        file=$clips_dir/$(echo -e "$list" | dmenu | cut -d ' ' -f1 | sed 's/://')
        xdotool type --delay 0 --clearmodifiers $(cat $file)
elif [ "$1" == 'load_clipboard' ]
then
        list=
        for i in `ls -tu $clips_dir | grep '^clip'`
        do
                list="$list$i: `cat $clips_dir/$i | tr '\n' ' '`\n"
        done
        file=$clips_dir/$(echo -e "$list" | dmenu | cut -d ' ' -f1 | sed 's/://')
        xdotool type --delay 0 --clearmodifiers $(cat $file)


# save actions. behave very similar to default ctrl-v and 'select' actions, but they not only populate primary/clipboard, they also create a cache file

elif [ "$1" == 'save_primary' ]
then
        # assume current selection is already in primary (actually i would like to do this again to avoid problems, but don't know how)
        xsel > $(mktemp --tmpdir=$clips_dir prim.XXXXXXXXXX)
elif [ "$1" == 'save_clipboard' ]
then
        # xdotool key ctrl+c #this will probably fail in programs that don't use ctrl-c to copy to clipboard
        xsel | xsel -i -b
        xsel -b > $(mktemp --tmpdir=$clips_dir clip.XXXXXXXXXX)
else
        echo "Not a correct argument" >&2
        exit 2
fi

< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#71 2009-09-15 21:35:55

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Linux clipboard HELL

I made a little improvement to my script above too. What I noticed was that many files cause a big slowdown and comparing a file to a variable every second takes more CPU than expected.  I am now trying a script that writes everything to one file, and just checks to the previous contents. Even with 0.2 sleep instead of 1, it doesn't take much CPU (<1% for me, whereas the other had 1% and 5-10% while it was adding a new paste) and selecting a paste was really slow.

Option -s will now immediately paste. And like my previous, option -d stays running and stores everything in clipboard and x11 selection.
I couldn't paste the separators, I chose ^[ and ^\, which you get with C-V C-3 and C-V C-4 (it has to be one character)

#! /bin/bash
[ -z "$1" ] && echo "use with -d (daemon) or -s (select)" && exit

file=~/.histdaemon
entryseparate= #see above
secondarysep= #see above

whichclip=clipold
clipold=old
x11old=old

if [ $1 = "-d" ]; then
while sleep 0.2; do
if [ $whichclip = x11old ]; then clipboardtoggle="-b"; whichclip=clipold; else clipboardtoggle=""; whichclip=x11old; fi
new=$(xsel -o $clipboardtoggle)
[ -z "$new" -o "$new" = $'\n' -o "$new" = "$clipold" -o "$new" = "$x11old" ] && continue
echo -n "$entryseparate$new" >> $file
if [ $whichclip = x11old ]; then x11old=$new; else clipold=$new; fi
done
fi

if [ $1 = "-s" ]; then
xsel -x
cat $file | tr '\n' "$secondarysep" | tr "$entryseparate" '\n' | dmenu -xs -i -l 15 -rs -ni -p "select paste" | tr "$secondarysep" '\n' | xsel -i
xdotool key shift+Insert
xsel -x
fi

Offline

#72 2009-10-27 14:34:03

Ogion
Member
From: Germany
Registered: 2007-12-11
Posts: 367

Re: Linux clipboard HELL

ugkbunb wrote:
XFire wrote:

I find it annoying when I copy a file name from XFCE to paste it somewhere else, and close the name dialogue and there too goes the text which I copied. That is one of the few Windows features that I miss.

Install any one of the number of different clipboard managers and yoru cut/paste will persist after the app is closed... I have tried out a few and settled on Parcellite - works great and low on the dependencies.

Hey, Thanks for mentioning parcellite. I dunno why i didn't know about this program, but i'm on a little crusade to ban Desktop-environment-stuff from my nice Openbox, and thus searched for a replacement for glipper tongue

Ogion


(my-dotfiles)
"People willing to trade their freedom for temporary security deserve neither and will lose both." - Benjamin Franklin
"Enlightenment is man's leaving his self-caused immaturity." - Immanuel Kant

Offline

#73 2009-10-29 12:29:09

Shapeshifter
Member
Registered: 2008-03-11
Posts: 230

Re: Linux clipboard HELL

a comment on locationbar-clicking: I just use ctlr-l in firefox or / in file managers. no need to select the field using the mouse.

Offline

#74 2009-10-29 13:12:27

timetrap
Member
From: Here and There
Registered: 2008-06-05
Posts: 342
Website

Re: Linux clipboard HELL

I think we should write a unified clipboard daemon:

clipyd

Offline

#75 2009-10-29 13:34:26

zowki
Member
From: Trapped in The Matrix
Registered: 2008-11-27
Posts: 582
Website

Re: Linux clipboard HELL

timetrap wrote:

I think we should write a unified clipboard daemon:

clipyd

Does this daemon really exist? I searched the pacman repositories and found nothing.


How's my programming? Call 1-800-DEV-NULL

Offline

Board footer

Powered by FluxBB