Python Forum

Full Version: controlling multiple server simultaneously.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys,i'm newbie on this forum,i need your help to code a project.

I have 2 vps server with linux and GUI,my goal is to code something for control mouse and keyoboard of each server at the same time.

With a VNC viewer i can use one server at a time,but i need to copy movement over two or more pc's at the same time,evry server must do the same mouse movement over the desktop,same keyboard typing,etc.

is there any library o any ideas to solve this problem? Wall
You have to use some messaging library/protocol or whatever is called to order the remote systems what to do.
I think zerorpc or pyzmq will do the work. Then I will use pyinput to get the local keyboard and mouse events and for example pyautogui to move the mouse and generate keystrokes on the remote systems.

There are other modules to fit ?fill the requirements.
(May-11-2018, 12:23 PM)wavic Wrote: [ -> ]You have to use some messaging library/protocol or whatever is called to order the remote systems what to do.
I think zerorpc or pyzmq will do the work. Then I will use pyinput to get the local keyboard and mouse events and for example pyautogui to move the mouse and generate keystrokes on the remote systems.

There are other modules to fit ?fill the requirements.

tnx for addressing me,i have done onli simple scrip util now so i don't know if this is a more complcated project for me but...let's try!

so the idea is to map the "MASTER" pc trought pyimput,then send the data to "SLAVE1","SLAVE2","SLAVEx" trought zeropc and then tell to pyautoguy to follow the commannds?

i don't need to do complicated tasks like copy/paste or tranfer files,just move mouse and keyboard to open files,browser or programs ,simulating an X number of humans doing the same tasks on your own machines.
It's just as you describe it. Read the input with pyinput and send the raw data to the slaves. They get it and pass it to pyautogui methods which are doing the movement of the mouse and generate the keystrokes. You can serialize the data as json for example. simplejson or ujason are faster libraries in lots of the cases.