Remote desktop over ethernet connection and sharing internet


#1

Ok, deep breath. Here goes.

I got the vnc remote desktop between my laptop and the brickpi working today and have also set it up so that the tightvnc server on the brickpi auto starts on power up. Great day so far :slight_smile:

The next thing I am trying to do is to set things up so that my brickpi can share my internet connection to make updating etc easy. o do this I assigned a fixed ip to my lan network on th epc as 192.168.0.10 and assigned a fixed ip to my pi as 192.168.0.11. Problems come when I try to share the internet between them.

A bit about my setup. I use a usb modem to connect to my isp. First I tried bridging my wireless network to the lan network thinking that might do but it doesnt give me the option to bridge.

I then did the next logical thing and did an internet connection share between my wireless connection and my lan, which went through ok. when I restarted the wireless modem I noticed that I had lost my connection to the remote desktop. I think this might be because the ip number assigned to me by my isp (not a fixed ip) is no longer similar to the fixed ip i have assigned to the pi and they stop talking.

Has anyone managed to get this working and if you have could you share how you did it please?


#2

Finally got it working. Tricky little thing.

If anyone needs to know how I did it let me know and I will list out the steps I had to go through.


#3

I’d be interested.
I’m trying to install tightVncServer on another card, and not succeeding much.
It will detect via wifi, but I want it via ethernet, and sharing the internet connection via the laptop.

thanks for offering.


#4

Hi there Cleo

Ok let me try to remember what I did :0

First thing I did was get the pi running on its own set up, monitor keyboard etc then link it in to the laptop with the ethernet cable.

The next thing you have to do is assign your laptop with a fixed ip address, and also set up internet conection sharing on the network.

The next part is to give your pi a fixed ip address, which was quite tricky

Note of caution, please backup any files you change before you change them so you can get back to a stable system should anything go wrong

go here and edit the file called “interfaces” with leafpad

/etc/network/

this is what the contents of my interfaces file looks like now:

auto lo
iface lo inet loopback
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface eth0 inet static
address 192.168.1.11
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.1.255
gateway 192.168.1.10

I chose the ip address as 192.168.1.11 on my pi because I set the fixed ip on my laptop as 192.168.1.10
I set the gateway on the pi as the ip number of my laptop too.

That should be the pi setup, so now its back to the laptop to set it up.

click control panel, network and sharing center, then click change adapter settings

right click the local area network icon and click properties.

select the internet protocol version 4 in the list and click properties

I then clicked “use the following ip address”

and entered the following data:

ip address: 192.168.1.10
subnet mask fills itself in (the values are
255.255.255.0)
default gateway: 192.168.1.11 (the ip address of the pi)

i also set up the dns servers as
8.8.8.8
8.8.4.4 which google offers

enter that data then exit and reboot your laptop

go back to the settings you just entered and click advanced, then ip settings:

when I look at my settings I see:

ip address 192.168.1.10 with the standard subnet mask
and in default gateways i see

192.168.1.11 with metric as autmatic

now make sure that you are sharing your internet connection and you should be able to get the internt through the pi

to log into vnc assuming you are using the same ip numbers as me

enter 192.168.1.11:1

and if all goes well you will be able to remotely access your pi over the cable and have interent access from the pi throught the cable too

Please note: I am a total noob at this so step carefully when you follow what I have written. I got it from a few websites but lost most of the links whe I cleared out my cache a few days ago

Good luck!

if anyone sees any mistakes please do let me know so I can tidy my own configuration up


#5

offers a different way of doing it but i couldnt get it to work


#6

If you’ve wandered off the internet to this topic, please see our Cinch setup for the latest on how to set this up here.


#7