<?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>The Stata Things &#187; UNIX</title>
	<atom:link href="http://enoriver.net/index.php/tag/unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://enoriver.net</link>
	<description>computing for fun and profit</description>
	<lastBuildDate>Mon, 07 May 2012 13:43:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Your Linux VM can talk to your Windows PC</title>
		<link>http://enoriver.net/index.php/2010/07/05/your-linux-vm-can-talk-to-your-windows-pc/</link>
		<comments>http://enoriver.net/index.php/2010/07/05/your-linux-vm-can-talk-to-your-windows-pc/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 18:56:57 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://enoriver.net/?p=1296</guid>
		<description><![CDATA[If you run a virtual Linux machine as a VMware appliance, and you have VMWare Tools installed, you can let it write to folders accessible from the Windows host. This takes two steps. First, in VMware Player (as of 3.0) you edit the virtual machine settings -- enable Shared Folders in the Options tab, and [...]]]></description>
			<content:encoded><![CDATA[<p>If you run a virtual Linux machine as a VMware appliance, and you have VMWare Tools installed, you can let it write to folders accessible from the Windows host. This takes two steps.</p>
<p>First, in VMware Player (as of 3.0) you edit the virtual machine settings -- enable Shared Folders in the Options tab, and add a host path there -- say C:\data\share_with_vm. You can add several distinct Windows paths here. </p>
<p>Next, you add this line to /etc/rc.local right before the "exit 0" line:<br />
<code>
<pre>
mount -t vmhgfs .host:/ /home/user/Shares
</pre>
<p></code><br />
Your Linux virtual computer will see any of the Windows folders you shared at the first step as children of the ~/Shares directory. Adding this line to /etc/rc.local makes Shares available to you as soon as you start the VM.</p>
<p>This is how I do Linux on my work computer now, after I first tried Cygwin, then had a dual-boot setup for a while.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2010/07/05/your-linux-vm-can-talk-to-your-windows-pc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xkill it</title>
		<link>http://enoriver.net/index.php/2009/05/08/xkill-it/</link>
		<comments>http://enoriver.net/index.php/2009/05/08/xkill-it/#comments</comments>
		<pubDate>Fri, 08 May 2009 20:19:28 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[xkill]]></category>

		<guid isPermaLink="false">http://enoriver.net/?p=705</guid>
		<description><![CDATA[I'm messing around with Ubuntu Hardy on a Dell Latitude D400 that got a new lease on life with a refurbished keyboard, battery, hard drive, an extra 1G of RAM and new rubber feet. Hey, the rubber feet are important. The times may be tough, and this little box may be old, but I won't [...]]]></description>
			<content:encoded><![CDATA[<p>I'm messing around with Ubuntu Hardy on a Dell Latitude D400 that got a new lease on life with a refurbished keyboard, battery, hard drive, an extra 1G of RAM and new rubber feet. Hey, the rubber feet are important. The times may be tough, and this little box may be old, but I won't send it out into the world unkempt. It's served me very well since 2004, I owe it that much.</p>
<p>Anyway, so far Ubuntu's been great, but things occasionally do seize up on it. Frozen processes that refuse to obey a regular shutdown order -- you know, the click on the x button in the upper right corner -- can be killed the Unix way: with xkill. The details are <a href="http://cubicledenizen.blogspot.com/2008/02/kill-frozen-x-application-under-ubuntu.html">here</a>. Other solutions -- some gentler, some harsher -- are also described, but this is my favorite.</p>
<p>So, my recap: in the "Run Application" dialog box that opens in response to Alt+F2, or in an open terminal, type <code>xkill</code>. This turns the mouse into the x of death. Move it over the non-responsive window and click it. It's very satisfying.</p>
<p>Speaking of resurrecting old gear: if you have such designs, and you're a fellow Dell customer, consider <a href="http://www.renwerxtech.com/">Renwerx Tech</a>. They may refurbish and sell parts for other brands too, but I know that their Dell section is superbly laid out. I gave Dell first dibs, seeing how they had a record of what equipment I owned, and thought they'd match my parts searches properly. I only went looking for alternatives when they blithely tried to sell me a French Canadian keyboard.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2009/05/08/xkill-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stata and Samba, BFF</title>
		<link>http://enoriver.net/index.php/2009/04/22/stata-and-samba-bff/</link>
		<comments>http://enoriver.net/index.php/2009/04/22/stata-and-samba-bff/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 17:21:12 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Stata]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[UNIX]]></category>

		<guid isPermaLink="false">http://enoriver.net/?p=659</guid>
		<description><![CDATA[What can a Stata user do with a Samba server? Pretty much the same thing you would do with any computer. My Stata is installed on my Windows PC. Now Samba allows me to store either do-files or data on the remote FreeBSD server and access them easily. Suppose that the remote box were called [...]]]></description>
			<content:encoded><![CDATA[<p>What can a Stata user do with a Samba server? Pretty much the same thing you would do with any computer. My Stata is installed on my Windows PC. Now Samba allows me to store either do-files or data on the remote FreeBSD server and access them easily.</p>
<p>Suppose that the remote box were called myUnix. Also suppose that I had a folder there with do-files, called myDofiles and another, with data sets, called myDtafiles.</p>
<p>This is how I would make Stata run a do-file saved on the server:<br />
<code><br />
run \\myUnix\myDofiles\myFile.do<br />
</code><br />
And this is how I can load into the PC's memory a .dta file stored on the FreeBSD hard drive:<br />
<code><br />
use \\myUnix\myDtafiles\myFile.dta<br />
</code></p>
<p>If one of these days I can find the time to experiment with how Stata could hook up with R and to what profit, I will do that across the two computers, for a bit of extra educational benefit. But I can't be bothered right now.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2009/04/22/stata-and-samba-bff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Key files for OpenSSH</title>
		<link>http://enoriver.net/index.php/2008/09/03/key-files-for-openssh/</link>
		<comments>http://enoriver.net/index.php/2008/09/03/key-files-for-openssh/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 03:04:12 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[key file]]></category>
		<category><![CDATA[OpenSSH]]></category>
		<category><![CDATA[PuTTY]]></category>
		<category><![CDATA[UNIX]]></category>

		<guid isPermaLink="false">http://host1.tld/?p=24</guid>
		<description><![CDATA[My home server runs FreeBSD 7.0. I administer it from my Windows XP laptop, in the air-conditioned comfort of my home office, over wi-fi. The server runs OpenSSH. The laptop runs PuTTY. I wanted the added security of using SSH key files instead of password authentication. Google and the helpful bunch at the PC-BSD Forum [...]]]></description>
			<content:encoded><![CDATA[<p>My home server runs <a title="The FreeBSD Project" href="http://www.freebsd.org">FreeBSD</a> 7.0. I administer it from my Windows XP laptop, in the air-conditioned comfort of my home office, over wi-fi. The server runs <a href="http://www.openssh.com/">OpenSSH</a>. The laptop runs <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a>. I wanted the added security of using SSH key files instead of password authentication. Google and the helpful bunch at the <a href="http://forums.pcbsd.org/">PC-BSD Forum</a> hooked me up in no time. Below is a FreeBSD-specific documentation of the process.</p>
<p>There are two encrypted key files. One is public and resides on the server. The other is private and is saved on the laptop's hard drive. On the server, from the command prompt of your user account you type</p>
<p><code>&gt; ssh-keygen -t dsa</code></p>
<p>This will generate two DSA-encrypted key files, one called id_dsa and the other id_dsa.pub. The process is interactive. You can choose where to save them and whether you want to associate them with a passphrase (click Enter twice for the default directory  <code>/usr/home/user/.ssh </code>and no passphrase).</p>
<p>OpenSSH, which I installed following the instructions in <a href="http://nostarch.com/freebsdserver.htm">this book</a>, has a configuration file that on a FreeBSD system goes by <code>/etc/ssh/sshd_config</code>. On a Linux machine it might be saved somewhere equally logical, but different. Anyway, that configuration file, by default, expects the file id_dsa.pub to be a line in the file <code> /usr/home/user/.ssh/authorized_keys</code>. So, the first time you set this up, just do this:</p>
<p><code>&gt; cd /usr/home/user/.ssh<br />
&gt; mv id_dsa.pub authorized_keys</code></p>
<p>You may have another computer you would like to log into the server from, but don't want to use the same private key. You can repeat this ssh-keygen process and append the new id_dsa.pub file to the existing authorized_keys file like so</p>
<p><code>&gt; cat authorized_keys id_dsa.pub &gt; authorized_keys<br />
</code><br />
The order matters. With authorized_keys first in the cat queue, all of its content will be preserved and that of id_dsa.pub will be appended to it, as it should be. If you reversed the order, id_dsa.pub would be written on top of the beginning of authorized_keys. You don't want that.</p>
<p>Now that you have id_dsa.pub copied into authorized_keys file, you turn to id_dsa. This file needs to be on the client computer. You definitely don't want to e-mail it. You can save it to a USB stick and take it there or you can transfer it securely with <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">pscp.exe</a>, but explaining the workings of that would take another post. Anyway, once you got your id_dsa saved on the Win XP client computer you're still not done.</p>
<p>PuTTY cannot read OpenSSH key files directly. You must download <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">puttygen.exe</a> and have it translate id_dsa to id_dsa.ppk. The complete instructions for doing that are <a href="http://linux-sxs.org/networking/openssh.putty.html">here</a>. You will notice that they were originally written for running OpenSSH on a Linux server. They worked for me.</p>
<p>The best way to test your setup is to go back to <code>/etc/ssh/sshd_config</code>, set</p>
<p><code>PasswordAuthentication no</code></p>
<p>and save over. Then, as super-user, do</p>
<p><code>#/etc/rc.d/sshd restart</code></p>
<p>and try to connect via PuTTY. If your key file is recognized and you didn't set a passphrase you will be let right in, without being prompted for any password. Your connection is both secure and convenient.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2008/09/03/key-files-for-openssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

