Jwenger17
Posts: 10
Joined: Thu Dec 29, 2016 1:52 am

VNC into Pi no router (Ethernet)

Mon Oct 01, 2018 2:21 am

I am currently working on projects with the sense hat and other similar devices which means I often have to move my Pi from place to place. Currently I am able to VNC into my Pi over wifi directly from boot (I was able to find a way to program VNC Server to run on startup). An ideal situation however, would be for me to be able to link to my Pi over vnc even when I do not have access to the internet. I am able to ssh into my Pi and VNC over wifi but none of these seem to work when I run a cat 6 ethernet from my mac to my Pi. I am assuming that I need to configure many settings to even have a chance at getting this to work however, most information I have found doesn't seem to make any sense to me. My main goal is to have access to the desktop GUI of the Pi even when no internet connection is available. Is what I am trying to do even possible? If so how?

PhatFil
Posts: 1685
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: VNC into Pi no router (Ethernet)

Mon Oct 01, 2018 7:11 am

you could run your pi as a wifi access point, that way point your wifi at the pi when away from your base network you can access it that way, and when home plug it back into the network..

pcmanbob
Posts: 9612
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: VNC into Pi no router (Ethernet)

Mon Oct 01, 2018 2:16 pm

So if you are going to use Ethernet connection between pi and mac with no dhcp/router between them you probably need to set static IP on both devices.

So on your pi you can use dhcpcd.conf to set a static IP , if you also need to be able to connect your pi using Ethernet to a router or other network you could use the fall back configuration where by when the is no dhcp/router detected your pi will set a static IP that your have specified.

I cant help with setting a fix IP on your mac but you should find help on the web.

Then you just need to use the static IP address when you want to connect to ssh or vnc over the direct Ethernet connection.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

fruitoftheloom
Posts: 23548
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: VNC into Pi no router (Ethernet)

Mon Oct 01, 2018 7:18 pm

Jwenger17 wrote:
Mon Oct 01, 2018 2:21 am
I am currently working on projects with the sense hat and other similar devices which means I often have to move my Pi from place to place. Currently I am able to VNC into my Pi over wifi directly from boot (I was able to find a way to program VNC Server to run on startup). An ideal situation however, would be for me to be able to link to my Pi over vnc even when I do not have access to the internet. I am able to ssh into my Pi and VNC over wifi but none of these seem to work when I run a cat 6 ethernet from my mac to my Pi. I am assuming that I need to configure many settings to even have a chance at getting this to work however, most information I have found doesn't seem to make any sense to me. My main goal is to have access to the desktop GUI of the Pi even when no internet connection is available. Is what I am trying to do even possible? If so how?

OSX like Windows NT includes Connection Sharing (though it will work even if WiFi interface is not actually receiving data).

This will set up a basic DHCP Server on the Ethernet Interface:

https://support.apple.com/kb/PH25327?locale=en_GB

By default Raspbian Stretch is a Ethernet Interface DHCP Client....
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot) RaspiOS64 ARM64
Asus ChromeBox 3 Celeron is my other computer...

Return to “Networking and servers”