this post was submitted on 05 Jun 2024
299 points (98.1% liked)

Selfhosted

40137 readers
593 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

Not that I use them anymore anyway, cancelling my old account, but name and shame any companies who conveniently can't support their free base. Also - it's VNC. It's a protocol. There's a dozen free clients out there.

you are viewing a single comment's thread
view the rest of the comments
[–] Norgur@fedia.io 16 points 5 months ago* (last edited 5 months ago)

BEFORE you mess with your VNC, it is extremely important to have a backup connection. So either you have the ability to connect your pi to a monitor and a keyboard locally, or you really, really should setup SSH before you mess with your VNC server.

Use SSH with a Certificate, described here: https://raspberrypi-guide.github.io/networking/connecting-via-ssh ("passwordless") This guide doesn't show how to set up SSH, but how to install a key in a more detailed way: https://pimylifeup.com/raspberry-pi-ssh-keys/

The good thing: Once you got this working, you're basically done. Just ditch VNC and go straight to SSH from now on. It's more secure and has better performance usually.

Yet, if you like your VNC and want to continue using it, you first connect via SSH do not do this while using a VNC connection! Now, first, you do all this: https://www.tomshardware.com/how-to/install-vnc-raspberry-pi-os then you do a

sudo update-alternatives --list vncserver
sudo update-alternatives --list vncserver-x11

you should see tightvnc listed there. Don't freak out if one of the two returns an error that the application was not found. That's okay. Not all versions of Raspbian used the same application name in the past, so I listed them both. As long as one of them works, you're fine.

Then, you do a

sudo update-alternatives --config vncserver
sudo update-alternatives --config vncserver-x11

and change it to tightvnc. now you can stop your running VNC:

sudo vncserver-x11 -service -stop && sudo vncserver -service -stop
sudo vncserver-x11 -service -start && sudo vncserver -service -start

Once you did that, connect to tightvnc as described in the article. If this works, do sudo apt uninstall realvnc

You should now be able to connect via VNC without weird account bullshit.