Joined February 2012
·
Posted to
Take a screenshot from commandline
over 1 year
ago
@iafonov Thanks for the link!!!
BTW, I have to check, but it seems like the lib use the interface Xvfb, but I don't know if it could be used against a running X server. I wanted to take a screenshot of what is currently at the display :0.
Do you know if this is possible? Thanks in advance.
Posted to
Take a screenshot from commandline
over 1 year
ago
@vinitcool76 Well, I'll say 'scrot' is another tool to do it (as 'xwd'), but I don't really see how is better.
I used 'import' because I have already installed 'ImageMagick' and have a lot of interesting options, but I guess I could use 'scrot' as well.
I don't see that 'scrot' have a 'display' option, so I guess I should export first the 'DISPLAY=:0' variable to be able of taking the screenshot through ssh.
Achievements
189 Karma
13,860 Total ProTip Views
24PullRequests Participant
Sent at least one pull request during the first 24 days of December 2014
Forked 20
Have an established project that's been forked at least 20 times
24PullRequests Participant
Sent at least one pull request during the first 24 days of December 2012
Python 3
Have at least three original repos where Python is the dominant language
Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos
Altruist
Increase developer well-being by sharing at least 20 open source projects
Forked
Have a project valued enough to be forked by someone else
Charity
Fork and commit to someone's open source project in need
Python
Would you expect anything less? Have at least one original repo where Python is the dominant language
Mongoose 3
Have at least three original repos where Ruby is the dominant language
Mongoose
Have at least one original repo where Ruby is the dominant language
Raven
Have at least one original repo where some form of shell script is the dominant language
@vinitcool76 I haven't said that there is a problem with 'scrot' taking screenshots on remote systems, just that it's probably that it need to export the DISPLAY variable to be able to access to the X server.
That's normal behavior. I mean, any app (command line or not) to access to an object of the graphical session (for example, the current aspect of the desktop) need to know the DISPLAY where is running.
'import' has a option to specify that variable, instead of export it to your shell environment, but it's just a handy utility. That's what I was saying.
About the 'delay' option, I also think that is a handy feature, and 'import' has it as well. Among others useful features.
But both tools are valid tools for the task. It's good to know them all and decide which one use based on what you really need or you like the most.
Thanks for your comments. Cheers.