Trying to launch VNC VIEWER at bootup. RP3

Hey all - I’ve read a few threads that come close to the issue I’m having, but I’ve had no luck solving my issue. I’m trying to launch VNC viewer on boot using .bashrc and also crontab, but have had little luck. (Not server) Using the .bashrc method, I’ve managed to get VNC viewer to launch upon opening the terminal (so that’s something), but will not run on boot. I’ve tried adding a timer to no avail. crontab doesn’t seem to be working at all, and I’ve verified that the settings are saving correctly. I’m using sudo credentials and have tried using just ‘vncviewer’ (which works on opening a command prompt - so I know its pointing to the right place) as well as ‘/usr/share/applications/realvnc-vncviewer.desktop.’ (which does nothing in .bashrc). Any thoughts? I’m a TOTAL newb and ultimately I’d like to have the unit able to point to a VNC address at a specific IP address and open that window on boot, although I will gladly settle for simply realvnc launching at startup. Anybody feel like helping me out? Apologies if I have posted this in the wrong sub-category! Thank you in advance!

Matt

Hello @mzeiner
Are you using Raspbian, or Raspbian for Robots?

With Raspbian for Robots, the VNC server is already set up for you, you have nothing to do.

With Raspbian, you would need to enable the VNC server by using
sudo raspi-config
then selecting interfaces, followed by VNC server. Enable it, save and reboot.

You don’t need anything else.

Cleo

Hey thanks for the reply!

I’m using straight up Raspibian and Its VNC VIEWER, not server that I’m trying to launch. The latest generation of media blocks for commercial cinema come without KVM functionality, but they do run VNC server in the background, so I wanted to use a Rpi as am inexpensive viewer solution. I tried every method I could find on the web (setting up a custom service, using crontab, .bashrc, systemd) and none seem to work at all. If I add ‘sudo vncviewer’ to the end of .bashrc, it will run vnc viewer whenever I launch the command prompt, but not as bootup. I just want to avoid unneceesary keystokes so it would be AWESOME if there was a way for the pi to boot up into VNCviewer immediately. Let me know if anything comes to mind.

Thanks!

Matt

You would have better support at the Raspberry Pi forums as this is very Raspbian specific, and not related to our robots. Best of luck!

Cleo

Understood. I posted here in light of the article you guys had at:

https://www.dexterindustries.com/howto/run-a-program-on-your-raspberry-pi-at-startup/

so I thought this was an appropriate place to ask … since y’all invited me to at the end of the article!

I will try installing a build of Raspbian for robots and apply the steps in your article and see if that helps out.

Matt

No problem, we appreciate you coming here! It’s just that I don’t think anyone on the team has tried to install VNC viewer, just VNC server.