Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Dec 2003 11:01:03 -0500
From:      Scott W <wegster@mindcore.net>
To:        Pat Lashley <patl+freebsd@volant.org>
Cc:        freebsd questions <freebsd-questions@freebsd.org>
Subject:   Re: Any (easy)way to copy contents of a file into X clipboard?
Message-ID:  <3FEC5B3F.70801@mindcore.net>
In-Reply-To: <2063146224.1072431531@[192.168.0.13]>
References:  <3FE64DDE.8090802@mindcore.net> <2063146224.1072431531@[192.168.0.13]>

next in thread | previous in thread | raw e-mail | index | archive | help
Pat Lashley wrote:

> --On Sunday, December 21, 2003 20:50:22 -0500 Scott W 
> <wegster@mindcore.net> wrote:
> 
>>
>> Hey all..was wondering if anyone knew of a utlity to copy the contents
>> of a text file into an X clipboard buffer?
>>
>> It's possible via the use of xmessage or any other X editor that allows
>> you to select all text, but something command line only would be 
>> useful...
>> I'm sure something exists somewhere, but I'm not having any luck as of
>> yet...anyone?
> 
> 
> Have you tried /usr/ports/x11/xclip ?
> 
> 
> 
> -Pat
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to 
> "freebsd-questions-unsubscribe@freebsd.org"
> 

Actually, no...it hadn't been installed, so I did so.  I just tried it, 
but it appears to have a buffer size limitation, or I may be using it wrong:
xclip -i /home/wegster/bsd/freeBSDInstall.txt
completes, but then doesn't seem to have filled the X clipboard buffer, 
as pasting into an open text file produces no output.

xclip -i Makefile (using xclips Makefile)
does work as advertised,

while cat /home/wegster/bsd/freeBSDInstall.txt | xclip
doesn't produce any output,

but
cat Makefile | xclip
works....so looks like a non-dynamic buffer being used.  If anyone has 
any ideas (cmd params I'm missing) I'd appreciate it, otherwise I'll dig 
into the source and see what it's doing with respect to buffer allocation.

Thanks,  (definately closer than I was )

Scott




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3FEC5B3F.70801>