Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screenshot support for Raspberry Pi? #34

Open
mattfelsen opened this issue Dec 12, 2016 · 2 comments
Open

Screenshot support for Raspberry Pi? #34

mattfelsen opened this issue Dec 12, 2016 · 2 comments

Comments

@mattfelsen
Copy link

Hi! I was pleasantly surprised to find that ampm seems to install & run fine on rPi running the latest Raspian (2016-11-25-raspbian I guess?).

One thing I realized is that screen shots wouldn't work and dug in a little bit. There's a utility called scrot which is included - not sure if it's part of Raspian normally or only when you install the "full" version with their new PIXEL windowing environment - and works fine, creating a PNG image.

I looked into the platform detection for a second and see that node's process.platform will return linux on rPi, but I'm not sure how to detect an rPi vs a full x86 desktop machine, and/or whether the scrot app would be included with something like a standard Debian, Ubuntu etc. install.

I'm half thinking out loud/half throwing this out there to see if this is something you've thought about at all, whether you care if trying to take a screenshot fails on linux, etc. It seems it'd be easy enough to change the platform detection logic to make it work, but then you open a new can of worms about "incomplete linux support."

@endquote
Copy link
Member

Cool that you're trying it out! I think you're the first to do anything on Pi or Linux. Hopefully most of the work that was done to make it work on Mac makes it mostly work on Linux too.

The way I'd probably do this is check for process.platform === 'linux' && scrotExists(), but I'm not sure how to implement that function. There are of course strong opinions on how you might do that.

@mattfelsen
Copy link
Author

This module looks pretty good, and implements one of the recommended approaches. I can play with this tomorrow and send over a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants