1

I'm doing a project where Raspberry pi works headless and accesses Internet via wifi. I want to remotely access the rpi desktop from my laptop for programming. I'm not sure if it is possible using Ethernet cable because rpi would get a dynamic ip over wifi. What I want to achieve is connect rpi to internet via wifi and do the programming & debugging when ever necessary by plugging in a network cable and connecting it directly to my laptop or is it possible to do both through wifi? (I don't want to use a router and I don't have a static ip).

Otherwise is it possible to make rpi to get dynamic ip and access wifi and use the static ip automatically when wifi dongle is removed and network cable is plugged in for remote access?

3 Answers 3

2

If you connect your rpi via wifi to internet, through some kind of wireless router, that router will most probably both assign the same internal IP to the rpi every time, and even let you access it through the name you have given it. You can definitely use ssh to connect from your laptop to you pi and at the same time use wifi to connect your pi to the internet. If you plan to use wifi, there is no need for a cable.

2

Rather than accessing the Pi by its IP, you can configure a hostname, and access it by DNS or NetBIOS (with Samba).

If you don't know how to do this, then you can connect your ethernet cable to start and then configure your Pi to the point you can access it by its hostname. Once you do that, you can disconnect the ethernet cable and never worry about knowing the IP again.

I am assuming you are trying to work within a LAN. If you are asking about accessing your Pi remotely, you would probably want to use a dynamic DNS service with port forwarding on your router and/or configure OpenVPN.

For accessing Linux desktops, similar to Windows's RDP, I would suggest using X2Go.

1

you can use xrdp then use MSTSC in your LP to connect to your pi (that's what im doing)

you can install it easily: 1. install xrdp sudo apt-get xrdp

2.start the service: sudo service start xrdp

3.in your LP/PC run mstsc.exe

4.connect to your pi via IP (ifconfig in your pi to get ip)

5.log in with your pi user and password.

in any router you can assign static IP to a device by MAC address which is unique foe each Ethernet device.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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