

{"id":384,"date":"2023-10-02T10:47:59","date_gmt":"2023-10-02T17:47:59","guid":{"rendered":"https:\/\/peden.ece.uw.edu\/computing\/?page_id=384"},"modified":"2025-09-22T11:54:56","modified_gmt":"2025-09-22T18:54:56","slug":"linux-lab-remote-access-vnc","status":"publish","type":"page","link":"https:\/\/peden.ece.uw.edu\/computing\/linux-lab-remote-access-vnc\/","title":{"rendered":"Linux Lab Remote Access Using VNC"},"content":{"rendered":"<p><strong>For remote access to the VLSI\/IS Linux Lab, <a href=\"https:\/\/peden.ece.uw.edu\/computing\/linux-lab-remote-access-rdp\/\">we now recommend RDP<\/a>. However if you must use VNC, here are the instructions for connecting.<\/strong><!--more--><\/p>\n<p>VNC sessions will not start if your account is over the disk quota.<\/p>\n<p><a name=\"setup\"><\/a><\/p>\n<p>Because most VNC clients unfortunately do not offer built-in support for SSH tunneling, we no longer include instructions for doing that. You can set up and access a VNC session using the instructions below. <strong>This will only work if you&#8217;re connected to Husky OnNet.<\/strong><\/p>\n<p>Either way, you will need SSH to make an initial connection to the Linux Lab computer.<\/p>\n<h3>I. Make Sure You Have the Software<\/h3>\n<p>You will need the following software on your computer to connect remotely to the VLSI\/IS Linux Lab. This should work on Windows, macOS, and most varieties of Linux:<\/p>\n<ul>\n<li>A VNC client such as <strong><a href=\"https:\/\/www.tightvnc.com\/download.php\">TightVNC<\/a><\/strong>, <strong><a href=\"https:\/\/tigervnc.org\/\">TigerVNC<\/a><\/strong>, or the Mac&#8217;s built-in <strong><a href=\"https:\/\/support.apple.com\/guide\/mac-help\/share-the-screen-of-another-mac-mh14066\/mac\">Screen Sharing app<\/a><\/strong>.<\/li>\n<li><a href=\"https:\/\/itconnect.uw.edu\/connect\/uw-networks\/about-husky-onnet\/\"><strong>Husky OnNet<\/strong><\/a>. Unless you are physically in the ECE building and using a wired ethernet connection, you will <strong>not<\/strong> be able to connect remotely to VNC on our Linux machines without Husky OnNet.<\/li>\n<li><strong>Terminal emulator<\/strong> &#8211; you will need a terminal to run SSH. The Mac has one built-in &#8211; it&#8217;s located at Applications -&gt; Utilities -&gt; Terminal. If you&#8217;re using Windows, <a href=\"http:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/download.html\"> Download PuTTY<\/a>.<\/li>\n<\/ul>\n<p><a name=\"start\"><\/a><\/p>\n<h3>II. Connect to Husky OnNet<\/h3>\n<p>Launch the application and select &#8220;UW Campus Network Traffic Only&#8221;.<\/p>\n<p>(If you happen to be on a wired connection in the ECE building, you can skip this step)<\/p>\n<h3>III. Start a VNC Session<\/h3>\n<p>In the examples below, <strong>linux-lab-069.ece.uw.edu<\/strong> is being used (and the example user&#8217;s NetID is <em>nemo<\/em>).<\/p>\n<ol>\n<li>Open your terminal program and connect to one of the <a href=\"https:\/\/peden.ece.uw.edu\/computing\/linux-lab\/\">Linux Lab systems<\/a> using SSH. If you&#8217;re not sure of the name of the machine to which you&#8217;ve connected, use the <strong>hostname<\/strong> command:\n<pre class=\"prettyprint\"><span class=\"pun\">[<\/span><span class=\"pln\">nemo@linux<\/span><span class=\"pun\">-<\/span><span class=\"pln\">lab<\/span><span class=\"pun\">-<\/span><span class=\"lit\">069<\/span> <span class=\"pun\">~]<\/span><span class=\"pln\">$ <\/span><strong><span class=\"pln\">hostname<\/span><\/strong><span class=\"pln\">\r\nlinux<\/span><span class=\"pun\">-<\/span><span class=\"pln\">lab<\/span><span class=\"pun\">-<\/span><span class=\"lit\">069.ece<\/span><span class=\"pun\">.<\/span><span class=\"pln\">uw<\/span><span class=\"pun\">.<\/span><span class=\"pln\">edu<\/span><\/pre>\n<\/li>\n<li>Set a VNC password by running <strong>vncpasswd<\/strong> at the command prompt. Note that VNC passwords must be 8 characters or less &#8211; if you type a longer password, everything after character eight is ignored. (Technically you don&#8217;t need to set up a new VNC password if you&#8217;ve previously created one, but doing this each time ensures you remember what it is!)Note that while you&#8217;re typing your password on Linux, you will not see any feedback at all (no asterisks). <strong>Note:<\/strong> If the option to create a view-only password is offered, do <strong>not<\/strong> do so.<\/li>\n<li>You can start a VNC session by using the <strong>vncserver<\/strong> command as follows (note that you just type &#8220;vncserver&#8221; with no additional flags \/ arguments):\n<pre class=\"prettyprint\"><span class=\"pun\">[<\/span><span class=\"pln\">nemo@linux<\/span><span class=\"pun\">-<\/span><span class=\"pln\">lab<\/span><span class=\"pun\">-<\/span><span class=\"lit\">069<\/span> <span class=\"pun\">~]<\/span><span class=\"pln\">$ <\/span><strong><span class=\"pln\">vncserver<\/span><\/strong>\r\n\r\n<span class=\"typ\">New<\/span> <span class=\"str\">'linux-lab-069.ece.uw.edu:2 (nemo)'<\/span><span class=\"pln\"> desktop <\/span><span class=\"kwd\">is<\/span><span class=\"pln\"> linux<\/span><span class=\"pun\">-<\/span><span class=\"pln\">lab<\/span><span class=\"pun\">-<\/span><span class=\"lit\">069.ece<\/span><span class=\"pun\">.<\/span><span class=\"pln\">uw<\/span><span class=\"pun\">.<\/span><span class=\"pln\">edu<\/span><span class=\"pun\">:<\/span><span class=\"lit\">2<\/span>\r\n\r\n<span class=\"typ\">Starting<\/span><span class=\"pln\"> applications specified <\/span><span class=\"kwd\">in<\/span> <span class=\"pun\">\/<\/span><span class=\"pln\">homes<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">nemo<\/span><span class=\"pun\">\/.<\/span><span class=\"pln\">vnc<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">xstartup\r\n<\/span><span class=\"typ\">Log<\/span><span class=\"pln\"> file <\/span><span class=\"kwd\">is<\/span> <span class=\"pun\">\/<\/span><span class=\"pln\">homes<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">nemo<\/span><span class=\"pun\">\/.<\/span><span class=\"pln\">vnc<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">linux<\/span><span class=\"pun\">-<\/span><span class=\"pln\">lab<\/span><span class=\"pun\">-<\/span><span class=\"lit\">069.ece<\/span><span class=\"pun\">.<\/span><span class=\"pln\">uw<\/span><span class=\"pun\">.<\/span><span class=\"pln\">edu<\/span><span class=\"pun\">:<\/span><span class=\"lit\">2.log<\/span><\/pre>\n<p>To verify whether a VNC session is already running, use the &#8220;-list&#8221; argument:<\/p>\n<pre class=\"prettyprint\"><span class=\"pun\">[<\/span><span class=\"pln\">nemo@linux<\/span><span class=\"pun\">-<\/span><span class=\"pln\">lab<\/span><span class=\"pun\">-<\/span><span class=\"lit\">069<\/span> <span class=\"pun\">~]<\/span><span class=\"pln\">$ <\/span><strong><span class=\"pln\">vncserver <\/span><span class=\"pun\">-<\/span><span class=\"pln\">list<\/span><\/strong>\r\n\r\n<span class=\"typ\">TigerVNC<\/span><span class=\"pln\"> server sessions<\/span><span class=\"pun\">:<\/span><span class=\"pln\">\r\n\r\nX DISPLAY <\/span><span class=\"com\">#\tPROCESS ID<\/span>\r\n<span class=\"pun\">:<\/span><span class=\"lit\">2<\/span>\t\t<span class=\"lit\">11720<\/span><\/pre>\n<\/li>\n<li>Take note of the display number associated with the session. VNC ports start at 5900 &#8211; so when TigerVNC refers to &#8220;Display :2&#8221;, the port number VNC maps to that display is 5900 + 2 = <strong>5902<\/strong>. If it tells you the display is &#8220;:3&#8221;, you&#8217;d need to use port 5903; and so on.<\/li>\n<\/ol>\n<p>With your VNC session now running, you can now connect to that hostname and port number using VNC.<\/p>\n<p><a name=\"tightvnc\"><\/a><\/p>\n<h3>IV. Connect To your VNC Session<\/h3>\n<p>If you&#8217;re not tunneling your VNC session over SSH, you can use any VNC client you like. In the example below, we&#8217;re using the TightVNC Java Client.<\/p>\n<ol>\n<li>For &#8220;Remote Host&#8221;, use the name of the server you started the VNC server on (linux-lab-069.ece.uw.edu in this example)<\/li>\n<li>For &#8220;Port&#8221;, use the port number from steps 3 and 4 of the previous section (e.g. 5902 in this example)<br \/>\n(<em>If you&#8217;re using Mac Screen Sharing or TigerVNC, you&#8217;ll notice there aren&#8217;t separate boxes for the host and port. In that case, you need to combine the hostname and port in this manner &#8211; <strong>linux-lab-069.ece.uw.edu:5902<\/strong><\/em>)<\/li>\n<li>Once you&#8217;ve filled in all the fields, hit the &#8220;Connect&#8221; button<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-394 aligncenter\" src=\"https:\/\/peden.ece.uw.edu\/computing\/wp-content\/uploads\/sites\/12\/2023\/10\/tightvnc-direct-1-300x185.png\" alt=\"\" width=\"300\" height=\"185\" srcset=\"https:\/\/peden.ece.uw.edu\/computing\/wp-content\/uploads\/sites\/12\/2023\/10\/tightvnc-direct-1-300x185.png 300w, https:\/\/peden.ece.uw.edu\/computing\/wp-content\/uploads\/sites\/12\/2023\/10\/tightvnc-direct-1-375x231.png 375w, https:\/\/peden.ece.uw.edu\/computing\/wp-content\/uploads\/sites\/12\/2023\/10\/tightvnc-direct-1.png 606w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Next you will be asked for the VNC password you chose when you set up the VNC session.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-395 aligncenter\" src=\"https:\/\/peden.ece.uw.edu\/computing\/wp-content\/uploads\/sites\/12\/2023\/10\/tightvnc-direct-2-300x124.png\" alt=\"\" width=\"300\" height=\"124\" srcset=\"https:\/\/peden.ece.uw.edu\/computing\/wp-content\/uploads\/sites\/12\/2023\/10\/tightvnc-direct-2-300x124.png 300w, https:\/\/peden.ece.uw.edu\/computing\/wp-content\/uploads\/sites\/12\/2023\/10\/tightvnc-direct-2-375x155.png 375w, https:\/\/peden.ece.uw.edu\/computing\/wp-content\/uploads\/sites\/12\/2023\/10\/tightvnc-direct-2.png 678w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>There may be somewhat of a delay, but after all this you should soon see a new VNC window containing a Linux desktop session. If you see a blank window, be patient for a bit &#8211; but if it continues to be blank, end the current session and try starting over again using a different Linux Lab machine &#8211; the one you chose may already be bogged down with too many other users.<\/p>\n<p><a name=\"close\"><\/a><\/p>\n<h3>V. IMPORTANT: Close Your VNC Session When Finished!<\/h3>\n<p>From the command line on the remote machine, use the <strong>vncserver -list<\/strong> command to determine the display number of your VNC session. Then, run <strong>vncserver -kill<\/strong> to quit any sessions which need not remain open (note that you do not add 5900 in this case &#8211; use the exact display number reported).<\/p>\n<pre class=\"prettyprint\"><span class=\"pun\">[<\/span><span class=\"pln\">nemo@linux<\/span><span class=\"pun\">-<\/span><span class=\"pln\">lab<\/span><span class=\"pun\">-<\/span><span class=\"lit\">069<\/span> <span class=\"pun\">~]<\/span><span class=\"pln\">$ <\/span><b><span class=\"pln\">vncserver <\/span><span class=\"pun\">-<\/span><span class=\"pln\">list<\/span><\/b>\r\n\r\n<span class=\"typ\">TigerVNC<\/span><span class=\"pln\"> server sessions<\/span><span class=\"pun\">:<\/span><span class=\"pln\">\r\n\r\nX DISPLAY <\/span><span class=\"com\">#\tPROCESS ID<\/span>\r\n<span class=\"pun\">:<\/span><span class=\"lit\">2<\/span>\t\t<span class=\"lit\">11720<\/span>\r\n<span class=\"pun\">[<\/span><span class=\"pln\">nemo@linux<\/span><span class=\"pun\">-<\/span><span class=\"pln\">lab<\/span><span class=\"pun\">-<\/span><span class=\"lit\">069<\/span> <span class=\"pun\">~]<\/span><span class=\"pln\">$ <\/span><b><span class=\"pln\">vncserver <\/span><span class=\"pun\">-<\/span><span class=\"pln\">kill <\/span><span class=\"pun\">:<\/span><span class=\"lit\">2<\/span><\/b>\r\n<span class=\"typ\">Killing<\/span> <span class=\"typ\">Xvnc<\/span><span class=\"pln\"> process ID <\/span><span class=\"lit\">11720<\/span><\/pre>\n<p><a name=\"reset\"><\/a><\/p>\n<h3>Appendix 1: If You Need to Reset Your VNC Session Password<\/h3>\n<p>Close any VNC sessions as in the previous section, then delete the vnc password file. This will wipe out any saved password for the VNC session:<\/p>\n<pre class=\"prettyprint\"><span class=\"pun\">[<\/span><span class=\"pln\">nemo@linux<\/span><span class=\"pun\">-<\/span><span class=\"pln\">lab<\/span><span class=\"pun\">-<\/span><span class=\"lit\">069<\/span> <span class=\"pun\">~]<\/span><span class=\"pln\">$ <\/span><b><span class=\"pln\">cd<\/span><\/b>\r\n<span class=\"pun\">[<\/span><span class=\"pln\">nemo@linux<\/span><span class=\"pun\">-<\/span><span class=\"pln\">lab<\/span><span class=\"pun\">-<\/span><span class=\"lit\">069<\/span> <span class=\"pun\">~]<\/span><span class=\"pln\">$ <\/span><b><span class=\"pln\">pwd<\/span><\/b>\r\n<span class=\"pun\">\/<\/span><span class=\"pln\">homes<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">nemo\r\n<\/span><span class=\"pun\">[<\/span><span class=\"pln\">nemo@linux<\/span><span class=\"pun\">-<\/span><span class=\"pln\">lab<\/span><span class=\"pun\">-<\/span><span class=\"lit\">069<\/span> <span class=\"pun\">~]<\/span><span class=\"pln\">$ <\/span><b><span class=\"pln\">rm <\/span><span class=\"pun\">.<\/span><span class=\"pln\">vnc<\/span><span class=\"pun\">\/<\/span><span class=\"pln\">passwd<\/span><\/b>\r\n<\/pre>\n<p>And to be really sure nothing is running&#8230;<\/p>\n<pre class=\"prettyprint\"><span class=\"pun\">[<\/span><span class=\"pln\">nemo@linux<\/span><span class=\"pun\">-<\/span><span class=\"pln\">lab<\/span><span class=\"pun\">-<\/span><span class=\"lit\">069<\/span> <span class=\"pun\">~]<\/span><span class=\"pln\">$ <\/span><b><span class=\"pln\">pkill <\/span><span class=\"pun\">-<\/span><span class=\"pln\">u $USER <\/span><span class=\"typ\">Xvnc<\/span><\/b><\/pre>\n<p>Then, return to the top of the page to start a new server.<\/p>\n<p>Note: things will be more complicated if you have started VNC server sessions on multiple hosts. The easy way to avoid this problem is to not do that.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For remote access to the VLSI\/IS Linux Lab, we now recommend RDP. However if you must use VNC, here are the instructions for connecting.<\/p>\n<div><a class=\"more\" href=\"https:\/\/peden.ece.uw.edu\/computing\/linux-lab-remote-access-vnc\/\">Read more<\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"tags":[],"class_list":["post-384","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/peden.ece.uw.edu\/computing\/wp-json\/wp\/v2\/pages\/384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peden.ece.uw.edu\/computing\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/peden.ece.uw.edu\/computing\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/peden.ece.uw.edu\/computing\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/peden.ece.uw.edu\/computing\/wp-json\/wp\/v2\/comments?post=384"}],"version-history":[{"count":31,"href":"https:\/\/peden.ece.uw.edu\/computing\/wp-json\/wp\/v2\/pages\/384\/revisions"}],"predecessor-version":[{"id":757,"href":"https:\/\/peden.ece.uw.edu\/computing\/wp-json\/wp\/v2\/pages\/384\/revisions\/757"}],"wp:attachment":[{"href":"https:\/\/peden.ece.uw.edu\/computing\/wp-json\/wp\/v2\/media?parent=384"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peden.ece.uw.edu\/computing\/wp-json\/wp\/v2\/tags?post=384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}