I want to copy a long file into clipboard with xsel,in my local pc ,just input:
cat /usr/bin/mysql_secure_installation|xsel -b
mysql_secure_installation located in my local os was copied into clipboard.
Now login to my vps with ssh command,then input
DISPLAY=:0 cat /usr/bin/mysql_secure_installation|xsel -b
I come across the error info:
xsel: Can't open display: (null) : Inappropriate ioctl for device
I know that the proper way to get remote file is
scp -P port username@tohostname:/remotefile /newlocalfile
I just wonder how to get file content copied into clipboard after loginning my vps,copy file from remote machine to the clipboard of my local computer.
DISPLAY=:0 xsel -b < /usr/bin/mysql_secure_installation xsel: Can't open display: (null) : Connection refused