Last active
December 2, 2018 00:46
-
-
Save Domin8-IPTV/efcf0a118b6eab7a5461e4afab608437 to your computer and use it in GitHub Desktop.
vnc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
apt-get update | |
apt-get install firefox-esr xfce4 xfce4-goodies gnome-icon-theme tightvncserver -y | |
cd /etc/init.d/ | |
wget https://gist.githubusercontent.com/Domin8-IPTV/efcf0a118b6eab7a5461e4afab608437/raw/d926bdfb4f802e53b97e9c4b74552874397fa1a7/vncserver && chmod +x vncserver | |
systemctl daemon-reload | |
systemctl enable vncserver | |
vncserver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: vncserver | |
# Required-Start: | |
# Required-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: vncserver | |
# Description: vncserver | |
### END INIT INFO | |
PATH="$PATH:/usr/X11R6/bin/" | |
# The Username:Group that will run VNC | |
export USER="root" | |
#${RUNAS} | |
# The display that VNC will use | |
DISPLAY="1" | |
# Color depth (between 8 and 32) | |
DEPTH="16" | |
# The Desktop geometry to use. | |
#GEOMETRY="<WIDTH>x<HEIGHT>" | |
#GEOMETRY="800x600" | |
GEOMETRY="1024x768" | |
#GEOMETRY="1280x1024" | |
# The name that the VNC Desktop will have. | |
NAME="my-vnc-server" | |
OPTIONS="-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}" | |
. /lib/lsb/init-functions | |
case "$1" in | |
start) | |
log_action_begin_msg "Starting vncserver for user '${USER}' on localhost:${DISPLAY}" | |
su ${USER} -c "/usr/bin/vncserver ${OPTIONS}" | |
;; | |
stop) | |
log_action_begin_msg "Stoping vncserver for user '${USER}' on localhost:${DISPLAY}" | |
su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}" | |
;; | |
restart) | |
$0 stop | |
$0 start | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment