{"id":213,"date":"2016-10-26T16:18:40","date_gmt":"2016-10-26T07:18:40","guid":{"rendered":"http:\/\/jook.pe.kr\/?p=213"},"modified":"2016-10-26T16:18:40","modified_gmt":"2016-10-26T07:18:40","slug":"vncserver-%ec%84%a4%ec%a0%95","status":"publish","type":"post","link":"http:\/\/jook.pe.kr\/?p=213","title":{"rendered":"vncserver \uc124\uc815"},"content":{"rendered":"<p>1. vncserver \uba85\ub839 \uc2e4\ud589<\/p>\n<p>vnc \uc811\uc18d\uc2dc \uc0ac\uc6a9\ud560 \ud328\uc2a4\uc6cc\ub4dc\ub97c \uc785\ub825\ud55c\ub2e4.<\/p>\n<p>[root@sales-linux Desktop]#<strong> vncserver<\/strong><\/p>\n<p>You will require a password to access your desktops.<\/p>\n<p>Password:<br \/>\nVerify:<br \/>\nxauth:\u00a0 creating new authority file \/root\/.Xauthority<\/p>\n<p>New &#8216;sales-linux:1 (root)&#8217; desktop is sales-linux:1<\/p>\n<p>Creating default startup script \/root\/.vnc\/xstartup<br \/>\nStarting applications specified in \/root\/.vnc\/xstartup<br \/>\nLog file is \/root\/.vnc\/sales-linux:1.log<br \/>\n2. \/root\/.vnc \ub514\ub809\ud1a0\ub9ac\ub85c \uc774\ub3d9 pid \ubc0f log \ud30c\uc77c \ud655\uc778<\/p>\n<p>[root@sales-linux ~]# cd .vnc\/<br \/>\n[root@sales-linux .vnc]# ls<br \/>\npasswd\u00a0 sales-linux:1.log\u00a0 sales-linux:1.pid\u00a0 xstartup<br \/>\n3. \/root\/.vnc\/xstartup \ud30c\uc77c\uc5d0\uc11c 4,5 \ub77c\uc778\uc8fc\uc11d \uc81c\uac70<\/p>\n<p>[root@sales-linux .vnc]#\u00a0vi \/root\/.vnc\/xstartup<br \/>\n#!\/bin\/sh<\/p>\n<p># Uncomment the following two lines for normal desktop:<br \/>\n<strong># unset SESSION_MANAGER<\/strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;&#8212;- \uc8fc\uc11d\uc81c\uac70<br \/>\n<strong># exec \/etc\/X11\/xinit\/xinitrc<\/strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;&#8212;- \uc8fc\uc11d\uc81c\uac70<\/p>\n<p>[ -x \/etc\/vnc\/xstartup ] &amp;&amp; exec \/etc\/vnc\/xstartup<br \/>\n[ -r $HOME\/.Xresources ] &amp;&amp; xrdb $HOME\/.Xresources<br \/>\nxsetroot -solid grey<br \/>\nvncconfig -iconic &amp;<br \/>\nxterm -geometry 80&#215;24+10+10 -ls -title &#8220;$VNCDESKTOP Desktop&#8221; &amp;<br \/>\ntwm &amp;<br \/>\n[root@sales-linux .vnc]#<br \/>\n4. vnc \ud504\ub85c\uc138\uc2a4 \ud655\uc778 \ubc0f kill<\/p>\n<p>[root@sales-linux .vnc]# ps ax | grep vnc<br \/>\n11880 pts\/0\u00a0\u00a0\u00a0 S\u00a0\u00a0\u00a0\u00a0\u00a0 0:00 Xvnc :1 -desktop sales-linux:1 (root) -httpd \/usr\/share\/vnc\/classes -auth \/root\/.Xauthority -geometry 1024&#215;768 -depth 16 -rfbwait 30000 -rfbauth \/root\/.vnc\/passwd -rfbport 5901 -pn<br \/>\n11889 pts\/0\u00a0\u00a0\u00a0 S\u00a0\u00a0\u00a0\u00a0\u00a0 0:00 vncconfig -iconic<br \/>\n11927 pts\/0\u00a0\u00a0\u00a0 S+\u00a0\u00a0\u00a0\u00a0 0:00 grep vnc<br \/>\n[root@sales-linux .vnc]# kill -9 11880<br \/>\n5. log \ud30c\uc77c \ubc0f pid \ud30c\uc77c \uc0ad\uc81c<\/p>\n<p>[root@sales-linux .vnc]# ls<br \/>\npasswd\u00a0 sales-linux:1.log\u00a0 sales-linux:1.pid\u00a0 xstartup<br \/>\n[root@sales-linux .vnc]# rm sales-linux\\:1.*<br \/>\nrm: remove regular file `sales-linux:1.log&#8217;? y<br \/>\nrm: remove regular file `sales-linux:1.pid&#8217;? y<br \/>\n6. \/tmp \ub514\ub809\ud1a0\ub9ac\uc5d0\uc11c lock \ud30c\uc77c(\/tmp\/.X1-lock, \/tmp\/.X11-unix\/X1) \uc0ad\uc81c<\/p>\n<p>[root@sales-linux .vnc]# cd \/tmp\/<br \/>\n[root@sales-linux tmp]# ls -al<br \/>\ntotal 56<br \/>\ndrwxrwxrwt\u00a0 7 root root 4096 Oct 13 09:53 .<br \/>\ndrwxr-xr-x 25 root root 4096 Oct 12 18:08 ..<br \/>\ndrwxrwxrwt\u00a0 2 root root 4096 Oct 12 18:08 .font-unix<br \/>\ndrwx&#8212;&#8212;\u00a0 2 root root 4096 Oct 12 18:11 gconfd-root<br \/>\nsrw-rw-rw-\u00a0 1 root root\u00a0\u00a0\u00a0 0 Oct 12 18:08 .gdm_socket<br \/>\ndrwxrwxrwt\u00a0 2 root root 4096 Oct 12 18:11 .ICE-unix<br \/>\nsrwxr-xr-x\u00a0 1 root root\u00a0\u00a0\u00a0 0 Oct 12 18:09 mapping-root<br \/>\ndrwx&#8212;&#8212;\u00a0 2 root root 4096 Oct 12 18:11 orbit-root<br \/>\n-rw&#8212;&#8212;-\u00a0 1 root root 1024 Oct 12 08:41 .rnd<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0 1 root root\u00a0\u00a0 11 Oct 12 18:11 .X0-lock<br \/>\ndrwxrwxrwt\u00a0 2 root root 4096 Oct 13 09:53 .X11-unix<br \/>\n-r&#8211;r&#8211;r&#8211;\u00a0 1 root root\u00a0\u00a0 11 Oct 13 09:53 .X1-lock<br \/>\n[root@sales-linux tmp]# rm .X1-lock<br \/>\nrm: remove regular file `.X1-lock&#8217;? y<br \/>\n[root@sales-linux tmp]# cd .X11-unix\/<br \/>\n[root@sales-linux .X11-unix]# ls -al<br \/>\ntotal 12<br \/>\ndrwxrwxrwt\u00a0 2 root root 4096 Oct 13 09:58 .<br \/>\ndrwxrwxrwt 10 root root 4096 Oct 13 09:58 ..<br \/>\nsrwxrwxrwx\u00a0 1 root root\u00a0\u00a0\u00a0 0 Oct 13 09:53 X1<br \/>\n[root@sales-linux .X11-unix]# rm -rf *<br \/>\n7. vncserver \uba85\ub839 \uc7ac\uc2e4\ud589<\/p>\n<p>[root@sales-linux .vnc]# <strong>vncserver<\/strong><\/p>\n<p>New &#8216;sales-linux:1 (root)&#8217; desktop is sales-linux:1<\/p>\n<p>Starting applications specified in \/root\/.vnc\/xstartup<br \/>\nLog file is \/root\/.vnc\/sales-linux:1.log<\/p>\n<p>[root@sales-linux .vnc]#<br \/>\n8. vncviewer\ub97c \ud1b5\ud574\uc11c \uc811\uc18d<\/p>\n<p>\uc811\uc18d\uc2dc &#8220;ip:\uc138\uc158\ubc88\ud638&#8221; \ub97c \uc785\ub825\ud574\uc11c \uc811\uc18d ex) 192.168.51.17:1<\/p>\n<p>vncserver\u00a0\uba85\ub839\uc744 \ud55c\ubc88 \ub354 \uc2e4\ud589\ud558\uba74 2\ubc88\uc138\uc158\uc774 \uc0dd\uc131\ub418\uba70, 192.168.51.17:2 \ub85c \ucd94\uac00 \uc811\uc18d\ud560 \uc218 \uc788\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. vncserver \uba85\ub839 \uc2e4\ud589 vnc \uc811\uc18d\uc2dc \uc0ac\uc6a9\ud560 \ud328\uc2a4\uc6cc\ub4dc\ub97c \uc785\ub825\ud55c\ub2e4. [root@sales-linux Desktop]# vncserver You will require a password to access your<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,7],"tags":[],"_links":{"self":[{"href":"http:\/\/jook.pe.kr\/index.php?rest_route=\/wp\/v2\/posts\/213"}],"collection":[{"href":"http:\/\/jook.pe.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/jook.pe.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/jook.pe.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/jook.pe.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=213"}],"version-history":[{"count":0,"href":"http:\/\/jook.pe.kr\/index.php?rest_route=\/wp\/v2\/posts\/213\/revisions"}],"wp:attachment":[{"href":"http:\/\/jook.pe.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/jook.pe.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=213"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/jook.pe.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}