Comments (9)
Can you try with --debug
as the first option and piping the output to a file?
from imgur-screenshot.
sorry for late reply
if I append the debug option to shortcut command , the imgur-screenshot.sh wont even start by hotket
/home/changch/git/imgur-screenshot/imgur-screenshot.sh --debug >> /tmp/imgur.log
but the command works in terminal.
any other ways to collect log ?
update:
after some try and error , I find out the "edit" is the reason why imgur-screenshot.sh not working , if I set edit="false" in imgur-screenshot.sh , then the script works like a charm !
but if I enable edit with pinta or gimp , then sometimes the script just failed....
from imgur-screenshot.
Do you provide the full path to gimp/pinta? It might also not work if e.g. the DISPLAY
environment variable is not present when your hotkey script runs.
from imgur-screenshot.
add the full path to pinta does not help .
from imgur-screenshot.
You'll have to figure out how to execute the command with debug output enabled, otherwise there's no way I can help you.
I'd try putting the line with the debug flag and output redirection in a separate shell script and calling that script via hotkey.
from imgur-screenshot.
I make a script running imgur-screenshot --debug=/tmp/1.log and config the hotkey to run the script
and here is the logfile
2018-05-23 11:32:21 [cch@h075 ~]$ cat /tmp/1.log
########################################
Enabling debug mode
Please remove credentials before pasting
########################################
Linux h075.abc.com.tw 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
'/home/changch/git/imgur-screenshot/imgur-screenshot.sh' '--debug'
Please select area
Failed to take screenshot 'imgur-2018_05_23-11:32:26.png': ''. For more information visit https://github.com/jomo/imgur-screenshot/wiki/Troubleshooting
2018-05-23 11:32:33 [cch@h075 ~]$
seems like nothing "special" ??
from imgur-screenshot.
Can you please try this:
/home/changch/git/imgur-screenshot/imgur-screenshot.sh --debug >/tmp/1.log 2>&1
There should be a lot more output.
from imgur-screenshot.
1 succesful , 1 failed
########################################
Enabling debug mode
Please remove credentials before pasting
########################################
Linux hqdc075.ematters.com.tw 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
'/home/changch/git/imgur-screenshot/imgur-screenshot.sh' '--debug'
+ current_version=v1.7.4
+ imgur_anon_id=ea6c0ef2987808e
+ imgur_icon_path=/home/changch/Pictures/imgur.png
+ imgur_acct_key=
+ imgur_secret=
+ login=false
+ album_title=
+ album_id=
+ credentials_file=/home/changch/.config/imgur-screenshot/credentials.conf
+ file_name_format=imgur-%Y_%m_%d-%H:%M:%S.png
+ file_dir=/home/changch/Pictures
+ upload_connect_timeout=5
+ upload_timeout=120
+ upload_retries=1
+ is_mac
+ uname
+ grep -q Darwin
+ screenshot_select_command='scrot -s %img'
+ screenshot_window_command='scrot %img'
+ screenshot_full_command='scrot %img'
+ open_command='xdg-open %url'
+ open=false
+ mode=select
+ edit_command='/usr/bin/pinta %img'
+ edit=true
+ exit_on_album_creation_fail=true
+ log_file=/home/changch/.imgur-screenshot.log
+ auto_delete=
+ copy_url=true
+ keep_file=true
+ check_update=true
+ settings_path=/home/changch/.config/imgur-screenshot/settings.conf
+ '[' -f /home/changch/.config/imgur-screenshot/settings.conf ']'
+ '[' '' = --check ']'
+ '[' 0 '!=' 0 ']'
+ '[' false = true ']'
+ '[' -n '' ']'
+ '[' -z '' ']'
+ upload_files[0]=
+ for upload_file in "${upload_files[@]}"
+ '[' -z '' ']'
+ cd /home/changch/Pictures
++ date +imgur-%Y_%m_%d-%H:%M:%S.png
+ img_file=imgur-2018_05_24-11:05:52.png
+ take_screenshot imgur-2018_05_24-11:05:52.png
+ echo 'Please select area'
Please select area
+ is_mac
+ uname
+ grep -q Darwin
+ sleep 0.1
+ cmd=screenshot_select_command
+ cmd='scrot -s imgur-2018_05_24-11:05:52.png'
++ scrot -s imgur-2018_05_24-11:05:52.png
+ shot_err=
+ '[' 2 '!=' 0 ']'
+ tee -a /home/changch/.imgur-screenshot.log
+ echo 'Failed to take screenshot '\''imgur-2018_05_24-11:05:52.png'\'': '\'''\''. For more information visit https://github.com/jomo/imgur-screenshot/wiki/Troubleshooting'
Failed to take screenshot 'imgur-2018_05_24-11:05:52.png': ''. For more information visit https://github.com/jomo/imgur-screenshot/wiki/Troubleshooting
+ notify error 'Something went wrong :(' 'Information has been logged'
+ is_mac
+ grep -q Darwin
+ uname
+ '[' error = error ']'
+ notify-send -a ImgurScreenshot -u critical -c im.error -i /home/changch/Pictures/imgur.png -t 500 'imgur: Something went wrong :(' 'Information has been logged'
+ exit 1
+ remote_version=v1.7.4
+ '[' 0 -eq 0 ']'
+ '[' '!' v1.7.4 = v1.7.4 ']'
+ '[' -z v1.7.4 ']'
+ '[' -z v1.7.4 ']'
+ echo 'Version v1.7.4 is up to date.'
Version v1.7.4 is up to date.
from imgur-screenshot.
Ah, yeah. This is an issue with scrot
which sometimes fails when the hotkey is still pressed while scrot
runs, where pressing the any key cancels the screenshot. The sleep 0.1
before the scrot
line somewhat fixes this, but it doesn't always.
After all, scrot
has a bunch of bugs and has been unmaintained for a long time, but comes pre-installed on many distributions and is therefore used as the default by imgur-screenshot. You can install and configure anything else that can take screenshots in your environment. (e.g. gnome-screenshot
, escrotum
, maim
, …).
This is actually a common issue. I'll make sure to handle the error message better in #127 and improve documentation on this in the troubleshooting section.
from imgur-screenshot.
Related Issues (20)
- Copr repository fails to sync for f27 HOT 3
- Graphical issue on screen capture window? HOT 1
- AUR version 1.7.4 not working properly HOT 1
- screenshot only take all black picture
- [feature request] Ability to change mode by additional command line parameter HOT 2
- On Kubuntu there are black lines in the screenshots. HOT 1
- Missing response_type=pin in requests HOT 2
- Config file? HOT 1
- Uploaded pictures are smaler than my screenshot HOT 2
- Getting artifacts on the images HOT 2
- Screenshot area border disappearing HOT 6
- Run in background when Mac starts HOT 1
- Looking for a new maintainer HOT 4
- Mint 20 is Uploading from Nemo but Displaying Upload Failed HOT 6
- upload failed HOT 1
- Not working anymore HOT 1
- Need to wait for a pose HOT 1
- not honoring settings.conf HOT 1
- Config doesn't work HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imgur-screenshot.