It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In RegisterIt looks like you're new here. If you want to get involved, click one of these buttons!
Howdy, Stranger!
It looks like you've been lurking for a while.
If you register, we also will remember what you have read and notify you about new comments. You will also be able to participate in discussions.
So if you'd like to get involved, register for an account, it'll only take you a minute!
apt-get update
apt-get upgrade -y
apt-get install xfce4 xfce4-goodies gnome-icon-theme tightvncserver
adduser username
su - username
vncserver
vncserver -kill :1
<- the :1 identifies the display number that will be stopped.nano /usr/local/bin/vncsrv
#!/bin/bash
PATH="$PATH:/usr/bin/"
DISPLAY="1"
DEPTH="16"
GEOMETRY="1024x768"
OPTIONS="-depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}"
case "$1" in
start)
/usr/bin/vncserver ${OPTIONS}
;;
stop)
/usr/bin/vncserver -kill :${DISPLAY}
;;
restart)
$0 stop
$0 start
;;
esac
exit 0
Make the created file executable:chmod +x /usr/local/bin/vncsrv
nano /lib/systemd/system/vncsrv.service
The contents:Take notice that in the used code, "User" should be your created additional user from 3rd step.[Unit] Description=Manage VNC Server on this user [Service] Type=forking ExecStart=/usr/local/bin/
vncsrv
start ExecStop=/usr/local/bin/
vncsrv
stop ExecReload=/usr/local/bin/
vncsrv
restart User=username [Install] WantedBy=multi-user.target
systemctl daemon-reload
systemctl enable vncsrv.service