[Raspberry Pi] Remote access doubts | Sololearn: Learn to code for FREE!


[Raspberry Pi] Remote access doubts

I am about to finish my project involving a headless Pi Zero W on which I want to run a Python script. Then, I'd like to have an access to control and/or react if/when something goes wrong, using remote access. Is there a way to actually have the remote desktop access to this particular session? I've tried TightVNC and am about to try TeamViewer for this, but my concern is that I don't want to just have an access to the device, but to this particular session with processes ran during my direct operation on the Pi. Is there a way to guarantee that on each connection?

12/15/2018 3:06:55 PM

Kuba Siekierzyński

20 Answers

New Answer


There is a new stardard interface called WOT Web Of Thing that build a stardard web interfacing application network layer between IOT devices via stardard internet network. It turns a raspberry pi into a Thing gateway, where web applications or browsers can access the connected IOT devices or I/O peripherals using REST API, the gateway could be further customised with the build in Node.js server. More information https://github.com/hollobit/wot.js/blob/master/README.md https://hacks.mozilla.org/2018/02/how-to-build-your-own-private-smart-home-with-a-raspberry-pi-and-mozillas-things-gateway/


Update: I managed to run TeamViewer 11 on the Pi Zero, as its ARM6L CPU architecture doesn't support any newer version. Still, TV14 on my PC was able to communicate with the Pi and it actually does what I wanted, albeit with a laaaaag :) Too much for the poor Pi to handle, I guess.... When I connected also my mobile as a second session, the lag was unbearable. BUT, it worked! I just wonder how it will manage several other automated tasks I have in plans... ;)


Thanks for all the replies :) I wanted to be able to kind of "intercept" the Pi desktop and be able to run, close and operate on it completely remotely. So far, I had some success with TeamViewer, just have to read more about security concerns. The tool is great as it allows me to do stuff to Pi from both desktop and mobile devices without me even being near the Raspberry :) And that's pretty much what I wanted.


Kuba Siekierzyński you could use xrdp. you can use xrdp to get a remote desktop connection.


Well, there's "conspy" (.sourceforge.net)* but...couldn't you just use a terminal multiplexor like 'tmux' or 'screen'? This is how you normally persist + reattach to interactive sessions / protect console shells against network transients / etc. Perhaps I don't understand the concern? I have some experience attaching to master sessions for VNC if your process is in service (not user) space (a hardware vendor trick) just note--this answer may be fiddly because my Pi was great at SNMP traps / security logging and it's gone out to play. :/ * related, ttysnoop for cloning tty's


Sebastian Keßler This is exactly what I wanted to do with the packt.alert project. Too bad I finished it a day before the whole site got recaptcha'ed 😂 I got it sending emails using a google e-mail account. It checks for incoming mail instructions every 15 seconds and sends back an email when a proper instruction is received. I might publish the code tomorrow, as I will most likely not be able to put it in productipn anyway :)


Okay, because my next suggestion was going to be ssh + X11 forwarding (so...just FYI on that should you be low on system resources / need that then -- it's not quite a match here).


I think teamviewer, VNC and all that stuff finally uses x11 protocol. So there might be little difference. Since VNC Server is normally available on standard raspi images it could be the right choice. Additionally u can do some easy settings that vnc is on after turning raspi on. For teamviewer u have to add some lines.


I control my Raspi with VNC Viewer. It works fine.


If you want to use remote desktop install tightvncserver . If you want to control your raspberry pi's gpio pins remotely use this code https://code.sololearn.com/cnIXOmUYsNwr/?ref=app


My vision was to send E-Mail-Commands to my Raspi. An E-Mail with Subject "Newstime" could be answered with current Newslines. The preinstalled Claws Mail allowes to hand over Data from Mails to external Programs. But till today I failed. So at the Moment a Script sends the Information at fix Daytimes.


Sebastian Keßler Did u ever have a look at nodered? on raspi? I did some similiar projects with it. I remember minecraft posted twitter messages


Sebastian Keßler Do I see ASCII charts there??? 😲😲😲


Sebastian Keßler The clapping Shia Saide Labeouf meme goes here... 👏👏👏


Vnc is the best way always.. or you can try to create a web page where you can control your project.. Everytime pi turns on it will communicate to that local ip so that with in a same network you can able.. to access your project.. for that you need to create a page and connect some api's...


Kuba Siekierzyński I'm very curious. By the Way - my Avatar Pic is a Screenshot from my Raspi Weather-App - the Temperature Profile for five Days 😋


Kuba Siekierzyński Yes: https://code.sololearn.com/c40HaQ86WJit/?ref=app


I use Xming via SSH tunneling, for some projects (sensor networks ,. .. ) I used remote gpio , it is amazing way to run your script from local/remote system and control those pins directly. I rarely use VNC, or desktop environment services.


"TeamViewer knows Xorg and framebuffer terminal sessions...From a developer perspective, we would be more than happy to leave the archaic X11 technology stack behind..." https://community.teamviewer.com/t5/Linux/State-of-Wayland-amp-TeamViewer/td-p/26340 So yeah on X11...it's just kindof infamous for security flags so I was thinking if their client works, it may be best :)


Sir please help me out ..I'm unable to write messages on sololearn. Sir though I 'm not able to ask questions to people...sir please help me out from this problem