No internet connection
  1. Home
  2. Technical Support

Need to use 2 tiny pilots on a remote server. Works but the mouse does not work on the second tiny pilot.

By D Barr @david_fl
    2023-10-25 14:15:22.778Zassigned to
    • @cghague

    I plugged two tiny pilots into a remote workstation that has two video cards. I was able to see two each of the tiny pilots but can only use the mouse on the primary tiny pilot. In order for this two work it word require the following: 1)plug the USB C cable on one pi into the second Pi. 2) I software driver that would be able take keyboard and mouse events from the second pi and route them into the first pi.

    Solved in post #8, click to view
    • 7 replies
    1. C

      Hi @david_fl, thanks for your question about using two TinyPilot devices with a single target computer. Connecting two TinyPilot devices to a single computer is a novel concept we've not encountered before, although there is no reason it shouldn't work.

      You mentioned that you can only use the mouse on the primary TinyPilot. Can you please advise what happens when you try to use the mouse via the other TinyPilot? Could you please also confirm whether the two display outputs on the target computer mirror each other or are they configured to provide an extended display?

      1. DD Barr @david_fl
          2023-10-26 14:48:43.312Z

          I have the desktop to extend. I notice what is actually happing is the mouse moves on both screens. It seems like a toggle is needed to turn of sending keyboard press / mouse tracking.

          1. DD Barr @david_fl
              2023-10-26 19:11:17.087Z

              To clarify, the mouse moves on both of the pikvms attatch to the workstaion no matter which pikvm is selected. The correct behavior should be that the mouse moves only on the pikvm that is currently selected.

              1. Thanks for getting back to me with those details. Unfortunately, due to how extended desktops share a mouse pointer, they often don't work well with remote viewing solutions.

                The issue is that while the target computer is displaying two desktops on two separate video outputs, they are both part of the same session and, therefore, share a mouse pointer that can move between the two individual desktops. This way of working means that moving the mouse on either TinyPilot device will cause the mouse pointer to move, even if the mouse pointer is on the other desktop.

                TinyPilot is generally used to provide an experience equivalent to being physically present at a computer, so we recommend using mirrored display mode, as that will ensure that all video outputs are identical and means the mouse pointer can't be on a different non-visible desktop.

          2. D
            In reply todavid_fl:
            D Barr @david_fl
              2023-10-30 13:12:28.119Z

              I ended up just unplugging the USB port of the second piKVM which gives me two remote screens to my remote development server.

              This is still useful because when trouble shooting a problem I need O so many windows (SQL debugger, IDE w/ breakpoints, terminal, git client, email, SOAP debugger, wireshark).

              What I do is drag on of the windows I just need to view logs on to the 2cnd pikvm and leave the edge application on the primary kvm. I'm wondering if there is some way I can ssh into the second kvm and just kill some process that it listening or sending mouse keyboard events and if that would be any better than just not pluging in the second usb cable from the second pkvm into the development workstation.

              1. Thanks for getting back to me. I'm pleased that TinyPilot is working for you in this scenario. You can disable the mouse and keyboard by connecting over SSH and running the following commands (adapted from this post):

                sudo sed \
                    --in-place \
                    "s/^MOUSE_PATH = .*$/MOUSE_PATH = '\/dev\/null'/" \
                    /home/tinypilot/app_settings.cfg && \
                  sudo sed \
                    --in-place \
                    "s/^KEYBOARD_PATH = .*$/KEYBOARD_PATH = '\/dev\/null'/" \
                    /home/tinypilot/app_settings.cfg && \
                  sudo sed \
                    --in-place \
                    "/tinypilot_mouse_interface/d" \
                    /home/tinypilot/settings.yml && \
                  sudo sed \
                    --in-place \
                    "/tinypilot_keyboard_interface/d" \
                    /home/tinypilot/settings.yml && \
                  echo "tinypilot_mouse_interface: /dev/null" | \
                    sudo tee --append /home/tinypilot/settings.yml && \
                  echo "tinypilot_keyboard_interface: /dev/null" | \
                    sudo tee --append /home/tinypilot/settings.yml && \
                  sudo service tinypilot restart
                

                If you want to re-enable the mouse and keyboard, you can use these commands:

                sudo sed \
                    --in-place \
                    "s/^MOUSE_PATH = .*$/MOUSE_PATH = '\/dev\/hidg1'/" \
                    /home/tinypilot/app_settings.cfg && \
                  sudo sed \
                    --in-place \
                    "s/^KEYBOARD_PATH = .*$/KEYBOARD_PATH = '\/dev\/hidg0'/" \
                    /home/tinypilot/app_settings.cfg && \
                  sudo sed \
                    --in-place \
                    "/tinypilot_mouse_interface/d" \
                    /home/tinypilot/settings.yml && \
                  sudo sed \
                    --in-place \
                    "/tinypilot_keyboard_interface/d" \
                    /home/tinypilot/settings.yml && \
                  echo "tinypilot_mouse_interface: /dev/hidg1" | \
                    sudo tee --append /home/tinypilot/settings.yml && \
                  echo "tinypilot_keyboard_interface: /dev/hidg0" | \
                    sudo tee --append /home/tinypilot/settings.yml && \
                  sudo service tinypilot restart
                
              2. D
                In reply todavid_fl:
                D Barr @david_fl
                  2023-10-31 08:47:56.521Z2023-10-31 09:01:20.061Z

                  This is great information and using this I thought of even a better use case.

                  I will group my applications two groups
                  Group 1) Interactive: IDE, SOAP UI, SQL developer, Email, Git, unix terminal, web application
                  Group 2) Tracing / Moniter: WireShark, VMware, logs

                  So to start my trouble shooting session I will use the script to disable group 1. After all the windows in place in group2 I run the disable script and start my debugging session on group 1 after re-enabling the events .

                  ReplySolution