Transferring data between two distinct programs linked to a single router without internet connection using JavaScript and Electron

I am currently working on implementing a feature called 'add monitors' into my program. This feature would allow users to display data on another computer (a sub-program) within the same building, without the need for internet connectivity. The two programs would be operated by different individuals who do not have direct access to each other's computers, but can send and receive data between them.

The concept behind this feature is:

1. Main program requests a list of connected computers from the router.

2. Router sends back MAC addresses of connected computers.

3. Main program connects to the desired computer and waits for a response (data).

As I am new to this type of implementation and do not fully understand how requests work, I am struggling to come up with a solution on my own. I am using Electron for this project.

If anyone has any ideas or hints on how to achieve this, I would greatly appreciate it. Thank you.

Answer №1

To achieve remote desktop control, you will need a client on your PC and a server on the PC you wish to control. Typically, you would connect the two machines through SSH and grant access to the desktop server. An interesting article on remote desktop connections can be found here: remote desktop. Connecting within the same local network eliminates the need to retrieve a MAC address as the router can handle the job for you.

Edit

While there isn't a JavaScript library that automates the entire process, you can choose a method for implementing the necessary functionalities and then find a library that supports those functionalities. For example, the RDP protocol is commonly used for remote desktop connections. Here is a node.js library for RDP: RDP. Keep in mind that different operating systems require different settings. Upon a quick review, this library seems to be for Windows, so you may need to find another solution for different OSs.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

CSRF Forbidden Error: incorrect csrfToken code: 'INVALIDCSRFTOKEN' found in Node.js

While working on my blog project, I encountered an issue with CSRF on certain routes. The CSRF protection works fine on routes like login, register, logout, and updating account information. However, when attempting to create or update a post or category i ...

Unable to save the current light/dark mode preference to local storage

Being a beginner in JavaScript, I am currently working on implementing a simple light mode button for my website which defaults to dark mode. The transition between JS/CSS dark and light modes is seamless, giving the site an appealing look when switching t ...

The MVC 5 view is unable to display an HTML image when adding it within an appended div

Currently, I am working with ASP.net MVC5 at a novice level. I'm faced with the challenge of creating a div that displays an image using a JavaScript function. Here is the code snippet I have: function showLoadingImage() { $('#submit_Em ...

How can I retrieve the length of an array in vuejs?

This snippet includes a script tag <script> export default { data() { return { blogs: [], }; }, created() { this.paginate_total = this.blogs.length / this.paginate; }, }; </script> Displayed below is the respo ...

Issues with jKit Pagination (Controlling Size by Height)

I'm currently utilizing the jkit paginate feature to limit the number of items by height, with the setting at 910 pixels. Everything works fine when there is enough content to exceed this limit and create a second page. However, if the content falls ...

Securing Codeigniter with CSRF protection while using datatables and an AJAX URL

I am currently utilizing codeigniter and have implemented CSRF protection. We have enabled it using the following configuration: $config['csrf_protection'] = TRUE; For form submission, we are using the following code: `<input type="hidden" ...

Having trouble accessing an injector service within the promise of a dynamically loaded JavaScript function that has been assigned to a global variable

Query I am facing an issue while trying to integrate PayPal with Angular. I am encountering difficulties when attempting to call an injected service inside a function of the promise returned. Any assistance in resolving this would be greatly appreciated. ...

Need a tool for validating forms?

I am currently facing some confusion with the UI Validation plugin that we are using. Within our application, we employ Spring MVC, Jquery & Bootstrap. As we delve into UI development, we have encountered uncertainty in selecting an appropriate Validation ...

How to fetch terms in Wordpress using ajax

As a newcomer to WordPress, I am looking to gather all photos within posts and categorize them accordingly. Here is the JavaScript function I have written: function get_photos(elem) { $.ajax({ cache: true, type: "GET", timeout: 20000, ...

Error: Undefined property 'showMessageBox' cannot be read in Electron for Node.js

Here is a snippet of code that showcases how to utilize the dialog box feature using the electron node module. app.js const { dialog } = require('electron') const response = dialog.showMessageBox(null); console.log(response); I am ...

Encountering an error when attempting to iterate over an undefined property using an API

I am trying to fetch all classes and their assignments from Google Classroom. I successfully used Google's example code for listing the classes, but had to write my own code for listing the assignments. While the code runs as expected and lists the as ...

The function for executing the specific command is not recognized and is resulting in a TypeError: client.commands

I'm having an issue with the code below and need a solution. Please help. Error : TypeError: client.commands.get(…).execute is not a function I am encountering difficulty with this specific command in my code: client.command ...

Because of the CSS tree structure, it is not possible to add or remove classes. This restriction applies to all actions done in jQuery, including click

I want to create a hover effect where the CSS changes when hovering over an item, then reverts back to normal when no longer hovered. Additionally, I would like the CSS to change when the item is selected, and return to normal when another item in the same ...

:host background color may be missing, but the font size has been boosted?

Check out this demo where the CSS is applied to the :host element or <hello>. The font size increases but the background color remains unchanged. What do you think? styles: [` :host { font-size: 2rem; background-color: yellow; }`] }) ...

"Deactivate the escaping feature in PHP when using heredoc syntax

My PHP code generates minified JS output using the heredoc. Take a look at this snippet: function prerefresh(){$("#len").empty();predata.forEach(item)} I've highlighted that the {$ is causing issues with variable escaping in my heredoc. Is there a ...

Incorporating a YouTube channel into mobile websites

While it's relatively easy to embed single YouTube videos in mobile pages with the help of Google, I'm still struggling with embedding a whole channel. The issue seems to revolve around the screen width, and my attempts at using JavaScript have n ...

The jquery UI button is displaying too wide even though the padding is set to zero

My goal is to decrease the width of certain jQuery buttons. Though I have attempted to eliminate padding using the code below, there remains a minimum of 5 pixels on either side of the text within my button. .button().css({ 'padding-left':' ...

Enhancing visuals with THREE.js and the power of transparency through EffectComposer

I am attempting to blend texture passes in a way that preserves the alpha channel. I have experimented with several methods to achieve this. The renderer has the alpha property set to true. Renderer with various setClearColor settings. The material on th ...

Issue with Vue 3: Composition API does not support Array of refs

Check out the code snippet below. <template> <div v-for="item in arr" :key="item">{{ item }}</div> </template> <script> import { ref } from "vue"; export default { name: "TestArr", ...

Tips for accessing data from a local JSON file in your React JS + Typescript application

I'm currently attempting to read a local JSON file within a ReactJS + Typescript office add-in app. To achieve this, I created a typings.d.ts file in the src directory with the following content. declare module "*.json" { const value: any; ex ...