Created
November 1, 2018 14:31
-
-
Save ParkNoBreak/1a6bf41687ae4c6112fd407cd7bceb1c to your computer and use it in GitHub Desktop.
minim tumani auth
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
# setelah install vnc | |
vncserver | |
vncserver -kill :1 | |
nano ~/.vnc/xstartup | |
lxterminal & | |
/usr/bin/lxsession -s LXDE & | |
# yang diatas kan seperti biasanya ya???? | |
#lha ini yang luar binasa | |
# kita pakai service saja dan port yang ngga port vnc | |
# caranya | |
sudo nano /etc/init.d/vncserver | |
# masukkan cod dibawah dan sesuaikan user dan port (jngan pakai port 5900 -5999) | |
# list port lihat https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml | |
#!/bin/sh -e | |
### BEGIN INIT INFO | |
# Provides: vncserver | |
# Required-Start: networking | |
# Required-Stop: networking | |
# Default-Start: 3 4 5 | |
# Default-Stop: 0 6 | |
### END INIT INFO | |
PATH="$PATH:/usr/X11R6/bin/" | |
# The Username:Group that will run VNC | |
export USER="kimcilcoin" | |
#${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" | |
PORTMU="1025" | |
OPTIONS="-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} -rfbport ${PORTMU}" | |
. /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 | |
######################################### | |
# setelah itu simpan pakai ctrl+x | |
# lalu masukkan command ini | |
sudo chmod +x /etc/init.d/vncserver && sudo update-rc.d vncserver defaults && sudo update-rc.d vncserver 99 | |
sudo /etc/init.d/vncserver start | |
#wes remote vnc sampean di port 1025 / sesuaikan dengan yang udah sipakai tadi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment