{"id":5573,"date":"2016-05-12T13:42:23","date_gmt":"2016-05-12T10:42:23","guid":{"rendered":"http:\/\/www.karadere.com\/blog\/?p=5573"},"modified":"2016-05-12T13:42:23","modified_gmt":"2016-05-12T10:42:23","slug":"ubuntu-server-desktop-kurulum-notlarim","status":"publish","type":"post","link":"https:\/\/www.karadere.com\/blog\/ubuntu-server-desktop-kurulum-notlarim.html","title":{"rendered":"Ubuntu Server desktop kurulum notlar\u0131m"},"content":{"rendered":"<pre><code>servera desktop kurmak\r\nsudo apt-get install ubuntu-desktop\r\n\r\nRDP i\u00e7in olan paketti <\/code><\/pre>\n<div class=\"container\">\n<h1 class=\"content-title\">VNC ile ise\u00a0Ubuntu 12 ve di\u011fer s\u00fcr\u00fcmlere ba\u011flanmak i\u00e7in<\/h1>\n<p><span class=\"meta-section tags\"><span class=\"meta-value\"><span class=\"tutorial-date\">Mar 31, 2013<\/span> <a class=\"\" href=\"https:\/\/www.digitalocean.com\/community\/tags\/ubuntu?type=tutorials\">Ubuntu<\/a><\/span><\/span><\/div>\n<div class=\"container\"><\/div>\n<div class=\"content-body tutorial-content tutorial-content-legacy\" data-growable-markdown=\"\">\n<div>\n<h3>Background<\/h3>\n<p>VNC stands for Virtual Network Computing, which allows you to connect to your server remotely, and be able to use your keyboard, mouse, and monitor to interface with that server.<\/p>\n<h3>Step 1 &#8211; Install VNC server and XFCE 4 desktop.<\/h3>\n<p>To get started, we will install a VNC server on Ubuntu 12.10 x64 Server droplet. Login as root and install packages:<\/p>\n<pre>apt-get -y install ubuntu-desktop tightvncserver xfce4 xfce4-goodies\r\n<\/pre>\n<h3>Step 2 &#8211; Add a VNC user and set its password.<\/h3>\n<pre>adduser vnc\r\npasswd vnc\r\n<\/pre>\n<p>If you would like to get root as user vnc you would have to add it to sudoers file. Make sure you are logged in as root:<\/p>\n<pre>echo \"vnc ALL=(ALL)       ALL\" &gt;&gt; \/etc\/sudoers\r\n<\/pre>\n<p>Set user vnc&#8217;s VNC Server password:<\/p>\n<pre>su - vnc\r\nvncpasswd\r\nexit\r\n<\/pre>\n<p>This step sets the VNC password for user \u2018vnc\u2019. It will be used later when you connect to your VNC server with a VNC client:<\/p>\n<h3><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/community\/Ubuntu-VNC1.png\" width=\"680\" \/><\/h3>\n<p>Now you can login as user \u2018vnc\u2019 and obtain root by running \u2018sudo su -\u2018 and entering your password:<\/p>\n<h3><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/community\/Ubuntu-VNC2.png\" width=\"680\" \/><\/h3>\n<h3>Step 4 &#8211; Install VNC As A Service<\/h3>\n<p>Login as root and edit <b>\/etc\/init.d\/vncserver<\/b> and add the following lines:<\/p>\n<pre>#!\/bin\/bash\r\nPATH=\"$PATH:\/usr\/bin\/\"\r\nexport USER=\"vnc\"\r\nDISPLAY=\"1\"\r\nDEPTH=\"16\"\r\nGEOMETRY=\"1024x768\"\r\nOPTIONS=\"-depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}\"\r\n. \/lib\/lsb\/init-functions\r\n\r\ncase \"$1\" in\r\nstart)\r\nlog_action_begin_msg \"Starting vncserver for user '${USER}' on localhost:${DISPLAY}\"\r\nsu ${USER} -c \"\/usr\/bin\/vncserver ${OPTIONS}\"\r\n;;\r\n\r\nstop)\r\nlog_action_begin_msg \"Stoping vncserver for user '${USER}' on localhost:${DISPLAY}\"\r\nsu ${USER} -c \"\/usr\/bin\/vncserver -kill :${DISPLAY}\"\r\n;;\r\n\r\nrestart)\r\n$0 stop\r\n$0 start\r\n;;\r\nesac\r\nexit 0\r\n<\/pre>\n<p>Edit <b>\/home\/vnc\/.vnc\/xstartup<\/b> and replace with:<\/p>\n<pre>#!\/bin\/sh\r\nxrdb $HOME\/.Xresources\r\nxsetroot -solid grey\r\nstartxfce4 &amp;\r\n<\/pre>\n<p>Update file permissions and allow any user to start X Server:<\/p>\n<pre>chown -R vnc. \/home\/vnc\/.vnc &amp;&amp; chmod +x \/home\/vnc\/.vnc\/xstartup\r\nsed -i 's\/allowed_users.*\/allowed_users=anybody\/g' \/etc\/X11\/Xwrapper.config\r\n<\/pre>\n<p>Make <b>\/etc\/init.d\/vncserver<\/b> executable and start VNC server:<\/p>\n<pre>chmod +x \/etc\/init.d\/vncserver &amp;&amp; service vncserver start\r\n<\/pre>\n<p>Add your VNC server to automatically start on reboot:<\/p>\n<pre>update-rc.d vncserver defaults\r\n<\/pre>\n<h3>Step 5 &#8211; Connect to your droplet with TightVNC<\/h3>\n<p>TightVNC is a great VNC client that allows SSH tunnel. It can be downloaded from<a href=\"http:\/\/www.tightvnc.com\/download.php\">http:\/\/www.tightvnc.com\/download.php<\/a><\/p>\n<p>Make sure to use IP::port as your remote host, where IP is your droplet\u2019s IP and port is 5901:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/community\/Ubuntu-VNC3.png\" width=\"680\" \/>You will be asked for VNC password that you specified in step 2 with vncpasswd:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/community\/Ubuntu-VNC4.png\" width=\"680\" \/>And now you are connected:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/community\/Ubuntu-VNC5.png\" width=\"680\" \/><\/p>\n<h3>Recommended Step &#8211; Secure your VNC server session with encryption.<\/h3>\n<p>A basic VNC server setup has no encryption, which makes it vulnerable to snooping.<\/p>\n<p>We will create an SSH tunnel with Putty and connect to VNC via this tunnel.<\/p>\n<p>First, we need to make sure VNC server only listens on localhost.<\/p>\n<p>Edit <b>\/etc\/init.d\/vncserver<\/b> and add <b>-localhost<\/b> to <b>OPTIONS<\/b>:<\/p>\n<pre>OPTIONS=\"-depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY} -localhost\"\r\n<\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/community\/Ubuntu-VNC6.png\" width=\"680\" \/>Restart VNC server:<\/p>\n<pre>\/etc\/init.d\/vncserver restart\r\n<\/pre>\n<p>Make sure VNC server is only listening on localhost IP:<\/p>\n<pre>netstat -alpn | grep :5901\r\n<\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/community\/Ubuntu-VNC7.png\" width=\"680\" \/>Download Putty from <a href=\"http:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/download.html\">http:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/download.html<\/a><\/p>\n<p>For Windows: <a href=\"http:\/\/the.earth.li\/~sgtatham\/putty\/latest\/x86\/putty.exe\">http:\/\/the.earth.li\/~sgtatham\/putty\/latest\/x86\/putty.exe<\/a><\/p>\n<p>Start Putty and enter your droplet IP under Session:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/community\/Ubuntu-VNC8.png\" width=\"680\" \/><b>Don\u2019t connect just yet.<\/b>Scroll down to Connection -&gt; SSH -&gt; Tunnels and Add New Forwarded Port and click Add:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/community\/Ubuntu-VNC9.png\" width=\"680\" \/>Now you can connect by clicking Open. You can login as user vmc:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/community\/Ubuntu-VNC10.png\" width=\"680\" \/>Make sure you don\u2019t close this SSH session, as it creates a tunnel between your PC (localhost) and your droplet, mapping ports 5901 on both ends.<\/p>\n<p>Connect with TightVNC to <b>localhost::5901<\/b><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/community\/Ubuntu-VNC11.png\" width=\"680\" \/>Enter your VNC password from Step 3 above:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/community\/Ubuntu-VNC12.png\" width=\"680\" \/>And you are now connected via a secure connection:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/assets.digitalocean.com\/articles\/community\/Ubuntu-VNC13.png\" width=\"680\" \/>And you are all done!<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>servera desktop kurmak sudo apt-get install ubuntu-desktop RDP i\u00e7in olan paketti VNC ile ise\u00a0Ubuntu 12 ve di\u011fer s\u00fcr\u00fcmlere ba\u011flanmak i\u00e7in Mar 31, 2013 Ubuntu Background VNC stands for Virtual Network Computing, which allows you to connect to your server remotely, and be able to use your keyboard, mouse, and monitor to interface with that server. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[1],"tags":[2544,2120],"class_list":["post-5573","post","type-post","status-publish","format-standard","hentry","category-genel","tag-rdp","tag-ubuntu","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"aioseo_notices":[],"views":1689,"_links":{"self":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts\/5573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/comments?post=5573"}],"version-history":[{"count":2,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts\/5573\/revisions"}],"predecessor-version":[{"id":5578,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/posts\/5573\/revisions\/5578"}],"wp:attachment":[{"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/media?parent=5573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/categories?post=5573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.karadere.com\/blog\/wp-json\/wp\/v2\/tags?post=5573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}