<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Steven Harms &#187; windows</title>
	<atom:link href="http://www.sharms.org/blog/tag/windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sharms.org/blog</link>
	<description>Life, Linux and Technology</description>
	<lastBuildDate>Sun, 28 Aug 2011 18:02:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Connecting to Ubuntu from Windows</title>
		<link>http://www.sharms.org/blog/2009/07/connecting-to-ubuntu-from-windows/</link>
		<comments>http://www.sharms.org/blog/2009/07/connecting-to-ubuntu-from-windows/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 16:53:25 +0000</pubDate>
		<dc:creator>sharms</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.sharms.org/blog/?p=474</guid>
		<description><![CDATA[Recently I needed to connect to a Ubuntu box from a Windows machine because FGLRX just would not work with 3 monitors in surround view. Fortunately using a few tools made it much easier to interface with my Ubuntu box again. Assumptions Ubuntu system named ubuntubox with ip 192.168.1.2 Windows system named windowsbox with ip [...]


Related posts:<ol><li><a href='http://www.sharms.org/blog/2008/05/resize-windows-xp-partition-in-vmware/' rel='bookmark' title='Permanent Link: Resize Windows XP Partition in VMWARE'>Resize Windows XP Partition in VMWARE</a></li>
<li><a href='http://www.sharms.org/blog/2009/04/dropbox-on-ubuntu/' rel='bookmark' title='Permanent Link: Dropbox on Ubuntu'>Dropbox on Ubuntu</a></li>
<li><a href='http://www.sharms.org/blog/2008/06/supporting-legacy-windows-applications-through-linux/' rel='bookmark' title='Permanent Link: Supporting legacy windows applications through Linux'>Supporting legacy windows applications through Linux</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Recently I needed to connect to a Ubuntu box from a Windows machine because FGLRX just would not work with 3 monitors in surround view.  Fortunately using a few tools made it much easier to interface with my Ubuntu box again.</p>
<h2>Assumptions</h2>
<ul>
<li><strong>Ubuntu</strong> system named ubuntubox with ip 192.168.1.2</li>
<li><strong>Windows</strong> system named windowsbox with ip 192.168.1.3</li>
</ul>
<h2>Remote Access</h2>
<p>For those of us who are comfortable with the command line, <strong>ssh</strong> is the only way to go.  To make sure you have ssh installed, you can run (on your Ubuntu box):</p>
<p><code>sudo apt-get install ssh</code></p>
<p>This service should automatically start a boot up, and will allow you to open a terminal to access the command prompt.  Now to access our ssh server, we need to download a ssh client for Windows.  Look no further than <strong>PuTTY</strong>, which is free, open source, and easy to use.  There are a few programs PuTTY provides, we just need <strong>putty.exe</strong> and optionally <strong>plink.exe</strong> (for next post in this series).</p>
<p>These can be downloaded <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" />at the PuTTY download page</a>.</p>
<p><img src="http://www.sharms.org/blog/wp-content/uploads/putty.jpg" alt="putty" title="putty" width="456" height="442" class="aligncenter size-full wp-image-476" /></p>
<p>Once downloaded, you can put putty.exe pretty much anywhere you can remember it.  I just left it on my desktop and dragged the shortcut to my quick-launch bar.  Double click putty.exe, and in the dialog box labeled &#8220;Host Name&#8221; go ahead and enter your Ubuntu box&#8217;s IP address.</p>
<p>Click &#8220;Open&#8221; when you are ready to connect, and it will prompt you for a username and password.  You should already have a username and password from your Ubuntu install.</p>
<p><img src="http://www.sharms.org/blog/wp-content/uploads/putty2.jpg" alt="putty2" title="putty2" width="587" height="396" class="aligncenter size-full wp-image-477" /></p>
<p>If you want your prompt to be colorful, you need to type &#8216;nano .bashrc&#8217; at the prompt, and scroll down to the line that looks like &#8220;#force_color_prompt=yes&#8221; and remove the &#8220;#&#8221; character.  After logging in it should now have colors.  If you want other cool tips for your shell, I suggest you check out the Ubuntu Wiki as I wrote up a specification on making it more usable: <a href="https://wiki.ubuntu.com/Spec/EnhancedBash">Enhanced Bash</a>.</p>
<p>At this point you should have remove access to your Ubuntu system.</p>
<h2>Sharing Files</h2>
<p>We need a good way to share files between these two systems.  A lot of people will suggest <strong>Samba / CIFS</strong> (which is really a technical way of just saying Windows File Sharing).  I think that Samba / CIFS lacks any technical merit, and is harder to configure.  I am going to show you two ways of sharing files, both which use SSH.</p>
<h2>WinSCP</h2>
<p><strong>WinSCP</strong> is basically <strong>CuteFTP</strong> or whatever FTP program you grew up with, but instead it works with SSH.  It is incredibly easy to use.  Go ahead and download WinSCP from their website. You can download either the portable executable (which means you can run it from anywhere without installing) or the full installer.  Either one will work for our purposes.</p>
<p>The download page is at: <a href="http://winscp.net/eng/download.php">http://winscp.net/eng/download.php</a>. To connect from Windows to our Ubuntu system, go ahead and install the program (or not if you downloaded the portable version).  Once you start it up, it should look like this:</p>
<p><img src="http://www.sharms.org/blog/wp-content/uploads/winscp.jpg" alt="winscp" title="winscp" width="540" height="390" class="aligncenter size-full wp-image-478" /></p>
<p>Go ahead and fill in the IP address for your system.  It is going to say it doesn&#8217;t know it&#8217;s key yet, go ahead and click Yes there.  You will now see your home directory on your Ubuntu box and your Windows box.  You can now drag files back and forth, and better yet, encrypted.</p>
<h2>Something More?</h2>
<p>As a programmer, one thing I need is a great editor.  I happen to use <strong>VIM</strong> to code everything I make.  VIM through SSH is ok, but one problem I have is I can&#8217;t use any of the <a href="http://www.reddit.com/r/programming/comments/760yt/ask_reddit_help_me_find_a_vim_color_scheme/.mobile">really</a> <a href="http://stackoverflow.com/questions/524585/what-is-your-favorite-colorscheme-for-programming-in-vim/524727">cool</a> <a href="http://dengmao.wordpress.com/2007/01/22/vim-color-scheme-wombat/">color</a> schemes out there, as PuTTY is limited to 256 colors.  There are some plugins out there which are supposed to convert the color schemes, but none works reliably for me.  Luckily, <strong>GVIM</strong> is available for windows, so I went to their download page: <a href="http://www.vim.org/download.php">http://www.vim.org/download.php</a> and downloaded / installed it.</p>
<p>This was great, but for <strong>Django</strong> development I really wanted to edit the files in place, via a shared folder, instead of using WinSCP every 10 seconds (I use test driven development, as in I may change a file 5 times a minute).  How do we go about using our SSH server as a shared folder under Windows? We can use the free / open source program <strong>Dokan</strong>.</p>
<p>Visit their download page, and retrieve the &#8220;Dokan library&#8221; and &#8220;Dokan SSHFS&#8221;.   Their download page is at <a href="http://dokan-dev.net/en/download/">http://dokan-dev.net/en/download/</a>.  Install the Dokan Library first.  After installing that, install Dokan SSHFS.  Once installed, Dokan SSHFS will appear under your start menu.  Go ahead and run it:</p>
<p><img src="http://www.sharms.org/blog/wp-content/uploads/dokan.jpg" alt="dokan" title="dokan" width="375" height="395" class="aligncenter size-full wp-image-479" /></p>
<p>This should be a familiar pattern by now.  Go ahead and set the &#8220;Host&#8221; file to the ip of your Ubuntu system.  You will also need to provide a username and password.  In the screenshot above you can see that my SSH server will be mounted as my N: drive now.</p>
<p>With SSHFS up and running, I can now edit files directly on my Ubuntu server.  Combining that with GVIM, I can use an editor that provides excellent syntax highlighting:</p>
<p><img src="http://www.sharms.org/blog/wp-content/uploads/gvim.jpg" alt="gvim" title="gvim" width="855" height="600" class="aligncenter size-full wp-image-480" /></p>
<p>In this screen shot I am using the Wombat theme for GVIM, and the Microsoft font Consolas.  Consolas is freely available for Windows XP if you download the Office 2007 compatibility pack, or PowerPoint Viewer.</p>


<p>Related posts:<ol><li><a href='http://www.sharms.org/blog/2008/05/resize-windows-xp-partition-in-vmware/' rel='bookmark' title='Permanent Link: Resize Windows XP Partition in VMWARE'>Resize Windows XP Partition in VMWARE</a></li>
<li><a href='http://www.sharms.org/blog/2009/04/dropbox-on-ubuntu/' rel='bookmark' title='Permanent Link: Dropbox on Ubuntu'>Dropbox on Ubuntu</a></li>
<li><a href='http://www.sharms.org/blog/2008/06/supporting-legacy-windows-applications-through-linux/' rel='bookmark' title='Permanent Link: Supporting legacy windows applications through Linux'>Supporting legacy windows applications through Linux</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.sharms.org/blog/2009/07/connecting-to-ubuntu-from-windows/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

