I have 3 Raspberry Pi's connected to 3 separate USB ports on my PC and they all run a VNC server. I would like to direct the VNC client on my PC to always connect to a specific Pi (without shutting down the server on the two other Pi's).

Update: it should be possible to connect to Pi using VNC through USB as that is the configuration explained for example here.

I am interested of having the "USB route" hard coded in the VNC configuration somehow. Is this possible and if so, how could it be done?

  • I don't believe VNC works over USB. Normally it runs over the network connection (ethernet or WiFi). You say that the 3 Pis are connected via USB (this is not the best way to power your Pis either. It can and does work but the current draw from the Pis can be above the spec and what your PC can supply. If you connect them to a network then you can pick the Pi to connect to via their IP address or if set their hostname. – Steve Robillard Dec 19 '15 at 3:58
  • There seems to be some way to accomplish the VNC-through-USB, judging from this related question at superuser.SE: superuser.com/questions/406803/… – x457812 Dec 19 '15 at 16:54
  • 1
    Having read the link above it does appear that VNC over USB is supported. How to hardcode (save the connection settings) this into your client will depend on the client you are using (most have a save or save connection option). To allow connecting to anyone of them without shutting down the other two you will need to change the IP address assigned to the Pis to make them unique. Basically you would change the last digit in this line on each Pi address I would probably go with, and – Steve Robillard Dec 19 '15 at 16:55
  • A few questions: 1.) Are you using a USB LAN adapter or just plugging in your pi's power connector into the USB port of your host device? 2.) Why not use Ethernet/WiFi? – PNDA Dec 20 '15 at 0:39

As stated by Steve Robillard, VNC does not work over USB. The best route would be to connect to your local network and set a static IP on each of your Pis (don't forget to connect your pis to the network too). After that, depending on your VNC viewer, you can set it to always connect to a specific pi (identified by its IP address).

If ever typing an IP address is not your thing, avahi (zeroconf implementation) is available on Linux. Here's a quick guide on how to do it (Step 2, bullet 2: "The flexible way")

  • 1
    Why attempt an answer to a vague question. Until the OP clarifies this adds no value!. Users should NOT be encouraged to use static. They should learn to use the computer to do the work e.g. by zero-conf. – Milliways Dec 19 '15 at 6:07
  • @Milliways Clarify how exactly? – PNDA Dec 19 '15 at 6:22
  • I assume you are referring to zero-conf You can easily connect from most with systems with ssh pi@hostname.local. If you want to know more you should ask your own question. – Milliways Dec 19 '15 at 8:27
  • 2
    @Milliways, there is nothing vague about the question. If there's something vague about it in your opinion then you need to be explicit about what's vague in it. – SherlockEinstein Dec 19 '15 at 14:14
  • 1
    @SherlockEinstein The question is still vague. At least now we could follow the link and guess what you may have done, but your question provides ABSOLUTELY NO detail of the CONFIGURATION or what YOU HAVE DONE. Questions like this sometimes generate speculation and discussion (which is off-topic). PS If you do add any detail, edit it into your original question. – Milliways Dec 19 '15 at 21:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.