Problem : At my debian/ubuntu/kubuntu installing vnc4server dont start at boot, so I had to log via ssh to sart it up. This post is to resolve this problem, at least when no start script is installed.
sudo apt-get install vnc4serverAnd also check if that installation created any startup script at /etc/init.d (newer version could do this)
Now, set a password for the user (from the host) to get the desktop
su remoteuser
vnc4serverThis will prompt to put a password, also at this point you could check the vnc server.
Now, put this script at /etc/init.d/vcn4server
# /etc/init.d/vnc4server#
# Some things that run alwaystouch /var/lock/vnc4server
# Carry out specific functions when asked to by the systemcase "$1" in start) echo "Starting script vnc4server " su remoteuser -c 'vnc4server ' ;; stop) echo "Stopping script vnc4server" su remoteuser -c 'vnc4server -kill ' ;; *) echo "Usage: /etc/init.d/vnc4server {start|stop}" exit 1 ;;esac
exit 0
REMEMBER TO CHANGE THE "remoteuser" AT THE SCRIPT
Add the script at boot:
update-rc.d vnc4server defaultsReboot and test it!
you could add more entries for remote desktop for different users adding :
su remoteuser0 -c 'vnc4server ' su remoteuser1 -c 'vnc4server ' su remoteuser2 -c 'vnc4server 'Different port will be open for every user
1 comentario:
Dont forget to make the new script Executable
sudo chmod +x scriptname
Publicar un comentario en la entrada