Open ivofacundo opened 4 years ago
Hi. I have exactly the same question, but nobody seems to either have time to answer it or it's too obvious or silly. But for people like us, who are not at that level of knowledge it's very confusing, frustrating and annoying. So, I tried to follow the logic and I presume that because this app is based on showing the mouse on a "screen", then it must have some display/screen drivers/libraries in whatever OS/environment it runs on... This is what I think makes our question silly, but is it...?
I'm saying this because if we consider the Puppeteer library, that uses a chrome browser both headless and not, which makes it perfect to use in any environment, both having screen or not... So, there you go. I have no idea if the Robotjs does that or if not, could be improved to do it, but it's a shame nobody has the time/knowledge to just write a simple thought about it...
Anyway, what I've done is I installed Robotjs on a VPS (screenless ofcourse) and it didn't give any build errors, but when I ran it I got: Could not open main display Segmentation fault (core dumped)
Fair enough, cause there isn't a screen indeed.
But I'm thinking, couldn't it be possible to just install some sort of display driver on the VPS? I know Ubuntu has the Xorg system, so I researched and there seem to be an option: https://www.digitalocean.com/community/questions/is-it-possible-to-launch-x-applications-like-chrome-on-linux-vps-i-need-this-for-testing-purposes
I didn't test it yet, but it might be a direction for someone to follow. I've put it on the Todo list and will get back here with the results if I do.
Is there a way to get it to work from a vps and execute the actions (write, move the mouse) on my computer, either with help with another dependency or directly can't?
Expected Behavior
Run the program in a VPS and leave it running there, and when any event happens, the mouse movement is activated, write a word or press keys on my personal computer
Current Behavior
Currently according to the documentation it is not possible, or I do not know how to do it, recently I found this dependency.
Context
It seems to me that this improvement will help to make programs in the cloud and it will not be necessary to have the program running on the computer itself. In my case this would help a lot since I cannot have the pc all running and the final program is for a client
Your Environment