Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
Disabling clicks on a certain part of the page using div

I am using the following example as a client in my web browser to access my remote desktop using Guacamole project. But it gives full access of computer to the user.

Although I have used some VNC/RDP restrictions to apply limits from server side. But still the requirement is that user must not able to interact with some portions of the application on the remote computer from front end (like close or minimize button or portion of Top left or top right page) so he can only use the application but can not minimize or close it.

So I was thinking that maybe I could disable click on these portions so it will not be transferred to the remote desktop.

<html>

<head>
    <link rel="stylesheet" type="text/css" href="guacamole.css"/>
    <title>Guacamole</title>
</head>

<body>

    <!-- Display -->
    <div id="display"></div>

    <!-- Guacamole JavaScript API -->
    <script type="text/javascript"
        src="guacamole-common-js/all.min.js"></script>

    <!-- Init -->
    <script type="text/javascript"> /* <![CDATA[ */
        // Get display div from document
        var display = document.getElementById("display");
        // Instantiate client, using an HTTP tunnel for communications.
        var guac = new Guacamole.Client(
            new Guacamole.HTTPTunnel("tunnel")
        );
        // Add client to display div
        display.appendChild(guac.getDisplay().getElement());

        // Error handler
        guac.onerror = function(error) {
            alert(error);
        };
        // Connect
        guac.connect();
        // Disconnect on close
        window.onunload = function() {
            guac.disconnect();
        }
        // Mouse
        var mouse = new Guacamole.Mouse(guac.getDisplay().getElement());
        mouse.onmousedown = 
        mouse.onmouseup   =
        mouse.onmousemove = function(mouseState) {
            guac.sendMouseState(mouseState);
        };
        // Keyboard
        var keyboard = new Guacamole.Keyboard(document);
        keyboard.onkeydown = function (keysym) {
            guac.sendKeyEvent(1, keysym);
        };
        keyboard.onkeyup = function (keysym) {
            guac.sendKeyEvent(0, keysym);
        };
    /* ]]> */ </script>

</body>

What I get on the front end is the complete picture of my remote computer. Any idea how to limit the interaction from front end?

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!