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!
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.
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.