mushanshitiancai / vscode-paste-image

paste image from clipboard to markdown/asciidoc directly!
MIT License
423 stars 128 forks source link

How to setup on Linux? #27

Closed PhilipWhiteside closed 5 years ago

PhilipWhiteside commented 6 years ago

Hello, I'm unable to get this working on Fedora Core 28. I have installed xclip from the default repo, but still get the error of

You need to install xclip command first.

The same result happens regardless of how I paste it

  1. Take screenshot, copy that to clipboard, attempt to paste
  2. Take screenshot, save to file, copy file, attempt to paste
$ uname -a
Linux desktop 4.16.13-300.fc28.x86_64 #1 SMP Wed May 30 14:31:00 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ 
$ xclip -version
xclip version 0.13
Copyright (C) 2001-2008 Kim Saunders et al.
Distributed under the terms of the GNU GPL
$ 

I tested xclip and it works fine within the terminal

$ uptime | xclip
$ 
$  19:42:01 up 8 min,  2 users,  load average: 0.42, 0.49, 0.29
bash: 19:42:01: command not found...
$ 
$ echo "test" | xclip
$ test

Am I missing something, do I need to add an extra step?

mushanshitiancai commented 6 years ago

Hello, I use command -v xclip to check if xclip is installed.

Refer to How to check if a program exists from a Bash script?

Before install xclip:

➜  /mnt/d/project > command -v xclip
➜  /mnt/d/project > echo $?
1

After install xlip:

➜  /mnt/d/project > command -v xclip
/usr/bin/xclip
➜  /mnt/d/project > echo $?
0

You can try these command, and show the result.

tedour commented 3 years ago

Hi ! Same error here on Manjaro... ~ >>> command -v xclip
/usr/bin/xclip ~ >>> echo $?
0

Thank you for help !