Smart programmers-Remote Control of Linux

Source: Internet
Author: User

Smart programmer-Remote Control of Linux was writing a program to capture mouse and mouse messages in Linux today. Check the information and see the following information: The mouse and mouse device (including touch and other devices) event exists in the form of a file in/dev/input/event [n]; where n equals to how much, it can be learned through cat/proc/bus/input/devices. After reading these files, you can get the messages triggered by the keyboard and mouse. If you write these files, you can simulate the keyboard and mouse input. Since it is a file, what is the effect of transmitting the event from one machine to another through the network? So I started a small experiment with a try. Server: nc-l 8888>/dev/input/event2 (my machine event2 is the mouse) client: nc SERVER_IP 8888 </dev/input/event2 the experiment is complete. The effect is that the mouse (or keyboard) of a machine can control another machine. It feels like a local operation. It's great! Previously, RDP and usb ip were used. Today, we found that the original Linux native can achieve remote control without installing other software. With such powerful functions and convenient implementation, I can't help but feel the subtlety of Linux. This function mainly benefits from: 1. The principle that everything is file in Linux; 2. Powerful redirection functions; 3. The Swiss Army knife in netcat.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.