![]() ![]() If at any time you need to kill and restart x11vnc, user pgrep to search for x11vnc’s process id and then kill it as sudo pgrep x11vnc 1234 kill 1234 Summary For me, where the Ubuntu server is just used for network backups from my application & file servers and local/on-site security isn’t an issue, having it log in automatically on boot works fine as it will run the script as part of this boot/login process.įinally, reboot and make sure all is working ok. I used the ubuntu GUI for this part – I did want to do the whole lot via the terminal, but I gave up as I ran out of time. #Mac vnc viewer full#Use the full file path to reference the script (I originally tried using tilde ‘~/’ to reference my home directory at first, but this did not work). Now, add the script to your ‘Startup Applications’. Test the script with this operation: ~/x11vnc.sh Next, make the script executable: chmod +x ~/x11vnc.sh ![]() We will then set the script to run at login: echo "/usr/bin/x11vnc -forever -bg -usepw -httpdir /usr/share/vnc-java/ -httpport 5901 -display :0" > ~/x11vnc.sh To configure autostart of x11vnc on the server:Īdd the command, that we use to start the VNC server, to a script in your home directory. Disable it by going to system preferences > Sharing and un-tick/de-select ‘Screen Sharing’. ![]() NOTE: In order to connect successfully to the tunnelled ‘localhost’ you must disable screen sharing on your mac. We’re using OSX’s built in VNC viewer, so in finder: shift+cmd+k and type: vnc://localhost Start the x11vnc vnc server on the Ubuntu server: x11vnc -forever -bg -usepw -httpdir /usr/share/vnc-java/ -httpport 5901 -display :0 On you mac, enter the following to tunnel port 5900 to server port 5900 over SSH (it would be more secure to use non-standard ports). #Mac vnc viewer install#Install the VNC server on Ubuntu: sudo apt-get install x11vncĬonfigure the password for VNC (you will be promoted to enter and then confirm the password and for a location to store it – I used the default values): x11vnc -storepasswd
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |