vncx11-forwardingnovnc

How to autostart Linux novnc with x11vnc


I was trying to use my old computer as a remote desktop. I installed Ubuntu 22 and wanted to connect to it via browser. I can somehow make it work via those 3 commands, but when I put them in an start.sh file it doesn't work the same.

These are the commands:

sudo openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/ssl/novnc.pem -out /etc/ssl/novnc.pem -days 9999
x11vnc -storepasswd VNCPASS /tmp/vncpass

xvfb-run --listen-tcp --server-num 44 --auth-file /tmp/xvfb.auth -s "-ac -screen 0 1920x1080x16" xfce4-session
x11vnc -rfbport 4544 -rfbauth /tmp/vncpass -display :44 -forever -auth /tmp/xvfb.auth
websockify -D --web=/usr/share/novnc/ --cert=/etc/ssl/novnc.pem 6080 localhost:4544

I tried using nohup but it still isn't working. Which is the right way to make them work? Thanks


Solution

  • I switched to docker and built my own vnc image based on kasmweb... Will be using the container instead of the pc wich has extra advantages btw. For persistency I mapped the volumes. In my case, this aproach works...yet not exactly what I wanted.