Table of Contents

How To Local Install Xclip On Centos

First download the required rpm package based on your operating system from here...

https://rpmfind.net/linux/rpm2html/search.php?query=xclip(x86-64)

For me the correct version is xclip-0.12-1.el7.x86_64.rpm

Now run following command...

rpm2cpio xclip-0.12-1.el7.x86_64.rpm | cpio -idmv

You should see output like this...

./usr/bin/xclip
./usr/bin/xclip-copyfile
./usr/bin/xclip-cutfile
./usr/bin/xclip-pastefile
./usr/share/doc/xclip-0.12
./usr/share/doc/xclip-0.12/COPYING
./usr/share/doc/xclip-0.12/README
./usr/share/man/man1/xclip-copyfile.1.gz
./usr/share/man/man1/xclip.1.gz

Now do following...

mkdir -p ~/bin/
cp -p ./usr/bin/xclip ~/bin/
chmod +x ~/bin/xclip

Thats it, you are all set. Now you should be able to use xclip.

cat <file_name> | xclip

Related Posts