screencloud icon indicating copy to clipboard operation
screencloud copied to clipboard

Shell script return error

Open bashfulrobot opened this issue 6 years ago • 5 comments

Hi there,

I added a shell script that I use for uploading the images to a service I use. The script echo's out the resulting URL - which I put onto my clipboard.

For example (running at the shell without clipboard):

$ ./upload.sh ~/Pictures/sparkys_server.png 
http://0x0.st/sEqA.png

Then with the clipboard (at terminal):

$ ./upload.sh ~/Pictures/sparkys_server.png | xsel -ib
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 19289  100    23  100 19266     34  28971 --:--:-- --:--:-- --:--:-- 29006
## pastes out as expected.

The script itself (adding the clipboard portion into the script):

#!/bin/bash

# sudo apt install xsel
# Puts the URL onto your clipboard
curl -F"file=@$1" http://0x0.st | xsel -ib
exit 0

Now the issue is that when running the script from within screencloud, no URL is added to the clipboard.

Any hints?

bashfulrobot avatar Oct 15 '18 01:10 bashfulrobot

Haven't looked into this, but it could be a sandboxing issue

olav-st avatar Oct 17 '18 17:10 olav-st

Thank you. I'll come back to the app when I can get this working - the app looks awesome.

bashfulrobot avatar Oct 22 '18 17:10 bashfulrobot

Hi & sorry guys. I will't create a new topic for my question, because this topic is the same. I found a bash script for using it to upload screenshots on my own VPS server here - https://gist.github.com/llybin/73502a930808e368c6de27c7f1fdce1d. If execute script from terminal - it working normaly. But when i use it in screencloud "Shell Script" plugin returning 127 error. With next message:

Upload failed! Command b'/home/alex/Apps/screencloud_upload.sh /tmp/1556033911.9578917.jpg' returned 127, but 0 was expected

any help appreciate it.

hex0gen avatar Apr 23 '19 15:04 hex0gen

got the same error as @hex0ge is there any ways to fix it ?

Aiko-Suzuki avatar Dec 16 '19 02:12 Aiko-Suzuki

As for access to /usr/bin/scp being denied, installing unsandboxed works snap install --dangerous screencloud and I've only seen exit code 127 when the script isn't set as executable

DonovanDMC avatar Nov 18 '21 11:11 DonovanDMC

This issue has had no activity in the last 60 days. Please add a reply if you want to keep this issue active, otherwise it will be automatically closed after 30 days.

github-actions[bot] avatar Apr 24 '24 02:04 github-actions[bot]