So I installed VNC as so:

apt-get install x11vnc
x11vnc –storepasswd
cd /usr/local/bin

nano sharex11vnc

inside the file:

x11vnc -ncache 10 -auth guess -repeat -nap -loop -forever -rfbauth ~/.vnc/passwd -desktop "VNC ${USER}@${HOSTNAME}"|grep -Eo "[0-9]{4}"

chmod 755 /usr/local/bin/sharex11vnc

After reboot Im able to remote into my Pi no problem when its connected to my router and I use the provided IP from ifconfig.

[Issues Starts Here] Now I set up my wlan0 to have a static IP in /etc/network/interfaces like so:

allow-hotplug wlan0
iface wlan0 inet static

(^Source: https://learn.sparkfun.com/tutorials/setting-up-a-raspberry-pi-3-as-an-access-point/all#enable-packet-forwarding)

But when I reboot and try to VNC from my remote computer with, it won't establish the connection to the Pi. What step am I missing here?

  • what does "access point" have to do with your question? I don't see you setting up the pi as an access point, setting a static IP (the wrong way for stretch, by the way) doesn't make it an access point – Jaromanda X Dec 6 '18 at 4:19
  • okay so I would like to be able to access my pi remotely using vnc viewer, except I would like the IP on wlan0 to be static so that I can remotely view it anywhere without my pi needing internet connection. Isnt this possible? and could you please guide me in the right direction. Thanks – ZachT Dec 6 '18 at 4:42
  • so you do want the pi to be an access point - so, set it up as an access point (there are literally hundreds of results if you search) – Jaromanda X Dec 6 '18 at 4:48
  • yeah so im following this guide but im stuck on step 3 telling me to find dhcpcd.conf; when I sudo nano etc/dhcpcd.conf, it opens a new file, while the instructions say im supposed to scroll down the file which should already be there. Is it okay to just make a new dhcpcd.conf file with interface wlan0 --- static ip_address= --- denyinterfaces eth0 --- denyinterfaces wlan0 inside? – ZachT Dec 6 '18 at 5:36
  • etc/dhcpcd.conf isn't always the same as /etc/dhcpcd.conf unless pwd is / ... but if you really do not have that file ... then you probably need to install dhcpcd5 – Jaromanda X Dec 6 '18 at 5:55

So I am still following this guide for creating the access point but Jaromanda X helped me solve my initial issue of assigning static IP to wlan0 in the dhcpcd.conf file.

The solution for not seeing dhcpcd.conf, was to install dhcpcd5

The second issue was trying to restart the hostapd service. The error was throwing "Failed to start hostapd.service: Unit hostapd.service is masked". The solution was to unmask with systemctl unmask hostapd.service

My third issue has been posted here as a new question, as requested by user "Ingo" in the comments

Thanks for the help so far!

  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year. – Ingo Feb 23 '20 at 8:17

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.