vnc ubuntu with novnc and websockify
- User
vnc ubuntu with novnc and websockify
- Assistant
vnc ubuntu with novnc and websockify
Setting up VNC to access an Ubuntu machine through a web browser using noVNC and Websockify consists of several steps. This can be particularly useful for accessing a remote desktop from systems where you might not be able to install VNC client software directly. Here's a step-by-step guide to achieve this:
Update your package list:
sudo apt update
Install a VNC server (e.g., TightVNC, TigerVNC):
sudo apt install tightvncserver
Set up VNC server:
vncserver to start the VNC server for the first time. You'll be prompted to enter and confirm a password for accessing the VNC session.vncserver -geometry 1280x720 to specify the resolution.vncserver -kill :1 to configure it further.Edit the xstartup file:
nano ~/.vnc/xstartup
#!/bin/sh
xrdb $HOME/.Xresources
startxfce4 & # This command depends on your desktop environment
Restart VNC server:
vncserver -kill :1
vncserver
Clone the noVNC GitHub repository:
git clone https://github.com/novnc/noVNC.git
Navigate to the noVNC directory:
cd noVNC
Copy the vnc_lite.html to index.html for easy access:
cp vnc_lite.html index.html
Install Websockify:
sudo apt install websockify
Run Websockify:
websockify --web /path/to/noVNC/ 6080 localhost:5901
5901 is the default port for :1 VNC server).http://your-server-address:6080/vnc.html
--cert=/path/to/cert.pem --key=/path/to/key.pem options.This setup enables you to interact with your Ubuntu desktop from any device that has a web browser, without needing specific VNC client software installed.
Not yet included in a published release.