Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

136
Visualizações
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?

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda