<?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>High Corral Development</title>
	<atom:link href="http://www.highcorral.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.highcorral.com</link>
	<description>Freelance PHP Development</description>
	<lastBuildDate>Fri, 01 Jul 2011 16:27:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>find, xargs, and filenames with spaces</title>
		<link>http://www.highcorral.com/find-xargs-and-filenames-with-spaces</link>
		<comments>http://www.highcorral.com/find-xargs-and-filenames-with-spaces#comments</comments>
		<pubDate>Fri, 01 Jul 2011 16:22:22 +0000</pubDate>
		<dc:creator>Scott Stanger</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.highcorral.com/?p=59</guid>
		<description><![CDATA[Although I don&#8217;t typically name a file with the space, such as &#8220;my cool file&#8221; it is nonetheless possible to do so in linux.  However, this causes problems when using tools such as the find command and the xargs command.
The other day I rsync&#8217;d one of my folders to back up the documents to [...]]]></description>
			<content:encoded><![CDATA[<p>Although I don&#8217;t typically name a file with the space, such as &#8220;my cool file&#8221; it is nonetheless possible to do so in linux.  However, this causes problems when using tools such as the find command and the xargs command.</p>
<p>The other day I rsync&#8217;d one of my folders to back up the documents to an external harddrive.  Later, I copied the files back (not using rsync &#8212; but cp).</p>
<p>The permissions on the files changed, setting the executable bit on all the files.  Now, when I open a file in gedit I am asked if I want to display the contents or run the file.  Obviously it is text file, but because the executable bit is set linux treats it differently.</p>
<p>It is easy enough to change a few files:</p>
<blockquote><p>
$ chmod 644 *
</p></blockquote>
<p>To recursively change all of the files, I would use this set of commands:</p>
<blockquote><p>
$ find . -type f | xargs chmod 644
</p></blockquote>
<p>This works great&#8230;unless there are filenames which contain spaces in their names.  In this case, the output from find will break up the filename into several pieces (separated by the space) and send each one over to xargs.</p>
<p>To prevent we use use the -print0 flag on find and the -0 flag on xargs:</p>
<blockquote><p>
$ find . -type f -print0 | xargs -0 chmod 644
</p></blockquote>
<p>Try it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.highcorral.com/find-xargs-and-filenames-with-spaces/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install NVIDIA drivers in Ubuntu</title>
		<link>http://www.highcorral.com/how-to-install-nvidia-drivers-in-ubuntu</link>
		<comments>http://www.highcorral.com/how-to-install-nvidia-drivers-in-ubuntu#comments</comments>
		<pubDate>Thu, 27 Jan 2011 16:20:15 +0000</pubDate>
		<dc:creator>Scott Stanger</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.highcorral.com/?p=54</guid>
		<description><![CDATA[I run a dual monitor desktop with Ubuntu 10.04.  Every so often after system update (via Update Manager) I am forced to restart.  This doesn&#8217;t happen very often &#8212; but when it does every now and then I run into an issue with my graphics.
So what happens?  Well, there is a library conflict which causes [...]]]></description>
			<content:encoded><![CDATA[<p>I run a dual monitor desktop with Ubuntu 10.04.  Every so often after system update (via Update Manager) I am forced to restart.  This doesn&#8217;t happen very often &#8212; but when it does every now and then I run into an issue with my graphics.</p>
<p>So what happens?  Well, there is a library conflict which causes my desktop to revert to a low-graphics, single-monitor mode.  Yuck.</p>
<p>Fortunately, it is easy to correct.</p>
<p><strong>Step 1. After booting up, open up a command prompt</strong></p>
<p><strong>Step 2.  Stop the gdm (x-windows) daemon.</strong></p>
<blockquote><p>$ sudo service gdm stop</p></blockquote>
<p>Enter your root password and x-windows will stop and you revert to a terminal login.</p>
<p><strong>Step 3.  Login.</strong></p>
<p><strong>Step 4.  You have to be root to install the driver so go ahead and change to root.</strong></p>
<blockquote><p>$ sudo su -</p></blockquote>
<p>Enter your root password</p>
<p><strong>Step 5.  Now, at some point you would have already downloaded the NVIDIA driver.  Hopefully you kept it laying around somewhere.  Change to the directory containing the driver.  In my case, it is the Downloads directory.<br />
</strong></p>
<blockquote><p># cd /home/scott/Downloads</p></blockquote>
<p>My NVIDIA driver is named <em>NVIDIA-Linux-x86-173.14.25-pkg1.run</em></p>
<p><strong>Step 6. As root, install the driver</strong></p>
<blockquote><p># ./NVIDIA driver is named NVIDIA-Linux-x86-173.14.25-pkg1.run</p></blockquote>
<p>This starts the installer.  Follow the onscreen instructions.  The installer will detect that the driver is already installed.  Select &#8216;Yes&#8217; to continue.</p>
<p>It will report an error (which is what caused the problem in the first place!)</p>
<p><em>ERROR: File &#8216;/usr/lib/xorg/modules/extensions/libglx.so&#8217; is not a symbolic link.</em></p>
<p>Accept the error and continue.</p>
<p>You will then get a prompt asking you if you want to run <em>nvidia-xconfig</em> to automatically update your X configuration.  I select <strong>No</strong>.</p>
<p>Installation of the graphics driver is complete!</p>
<p><strong>Step 7. Exit root</strong></p>
<blockquote><p># exit</p></blockquote>
<p><strong>Step 8. Restart X-Windows</strong></p>
<blockquote><p>$ sudo service gdm start</p></blockquote>
<p>Enter your root password</p>
<p>Congratulations!  Your NVIDIA graphics driver is (re) installed and your dual-head display is back the way it was.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.highcorral.com/how-to-install-nvidia-drivers-in-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Password-less SSH Login</title>
		<link>http://www.highcorral.com/password-less-ssh-login</link>
		<comments>http://www.highcorral.com/password-less-ssh-login#comments</comments>
		<pubDate>Tue, 17 Aug 2010 15:04:27 +0000</pubDate>
		<dc:creator>Scott Stanger</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.highcorral.com/?p=35</guid>
		<description><![CDATA[I manage several linux server to which I must login on a daily basis using SSH.  Each server has different credentials.
Not only do I use SSH, but I often use SCP (secure copy) to copy files from one server to another.  Both commands require a password.
There is a way, however, to create a [...]]]></description>
			<content:encoded><![CDATA[<p>I manage several linux server to which I must login on a daily basis using SSH.  Each server has different credentials.</p>
<p>Not only do I use SSH, but I often use SCP (secure copy) to copy files from one server to another.  Both commands require a password.</p>
<p>There is a way, however, to create a unique key pair so that you can login to a remote server without having to enter a password.</p>
<h3>SSH Without a Password</h3>
<p>The steps are simple and straightforward.</p>
<p>1.  On the client run the following commands:</p>
<blockquote><p>$ mkdir -p $HOME/.ssh</p>
<p>$ chmod 0700 $HOME/.ssh</p>
<p>$ ssh-keygen -t dsa -f $HOME/.ssh/id_dsa -P &#8221;</p></blockquote>
<p><strong>NOTE:  Those are a pair of single quotes after the -P, which will set an empty password.</strong><br />
This will create two keys, a private key and a public key, the .ssh folder.</p>
<p>2.  Copy $HOME/.ssh/id_dsa.pub to the remote server.</p>
<p>3.  Log in to the remote server and run the following commands:</p>
<blockquote><p>$ cat id_dsa.pub &gt;&gt; .ssh/authorized_keys</p>
<p>$ chmod 0600 .ssh/authorized_keys</p></blockquote>
<p>That&#8217;s it!  You can log out of the remote server then log in using SSH and will not be prompted for a password.</p>
<blockquote><p>scott@blackjack:~$ ssh-keygen -t dsa -f $HOME/.ssh/id_dsa -P &#8221;<br />
Generating public/private dsa key pair.<br />
Your identification has been saved in /home/scott/.ssh/id_dsa.<br />
Your public key has been saved in /home/scott/.ssh/id_dsa.pub.<br />
The key fingerprint is:<br />
a5:3c:b6:e9:13:85:62:34:ee:6f:56:47:46:6f:dd:8b scott@blackjack<br />
The key&#8217;s randomart image is:<br />
+&#8211;[ DSA 1024]&#8212;-+<br />
|                 |<br />
|      o     .    |<br />
|     o . &#8230; . ..|<br />
|      +..o. o o o|<br />
|     o .S. o .. .|<br />
|      &#8230;+. .E . |<br />
|       .oo .     |<br />
|       .=        |<br />
|       o..       |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+<br />
scott@blackjack:~$ cd .ssh<br />
scott@blackjack:~/.ssh$ ll<br />
total 24<br />
drwx&#8212;&#8212;  2 scott scott 4096 2010-08-17 09:01 ./<br />
drwxr-xr-x 55 scott scott 4096 2010-08-17 08:58 ../<br />
-rw&#8212;&#8212;-  1 scott scott  668 2010-08-17 09:01 id_dsa<br />
-rw-r&#8211;r&#8211;  1 scott scott  605 2010-08-17 09:01 id_dsa.pub<br />
-rw-r&#8211;r&#8211;  1 scott scott 4714 2010-06-25 14:55 known_hosts<br />
scott@blackjack:~/.ssh$ scp id_dsa.pub sstanger@midnight:/home/sstanger/<br />
sstanger@midnight&#8217;s password:<br />
id_dsa.pub                                                                                                      100%  605     0.6KB/s   00:00<br />
scott@blackjack:~/.ssh$ ssh sstanger@midnight<br />
sstanger@midnight&#8217;s password:<br />
[sstanger@midnight ~]$ cat id_dsa.pub &gt;&gt; .ssh/authorized_keys<br />
[sstanger@midnight ~]$ chmod 0600 .ssh/authorized_keys<br />
[sstanger@midnight ~]$ exit<br />
Connection to midnight closed.<br />
scott@blackjack:~/.ssh$ cd<br />
scott@blackjack:~$<br />
scott@blackjack:~$ ssh sstanger@midnight<br />
[sstanger@midnight ~]$</p></blockquote>
<p>NOTE:  On some systems the ssh policies may not allow this.  If this is the case then you can make this change on the remote host:</p>
<blockquote><p>
[sstanger@midnight ~]$ mv .ssh/authorized_keys .ssh/authorized_keys2<br />
[sstanger@midnight ~]$ chmod 700 .ssh<br />
[sstanger@midnight ~]$ chmod 640 .ssh/authorized_keys2
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.highcorral.com/password-less-ssh-login/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to mount a USB flash drive</title>
		<link>http://www.highcorral.com/how-to-mount-a-usb-flash-drive</link>
		<comments>http://www.highcorral.com/how-to-mount-a-usb-flash-drive#comments</comments>
		<pubDate>Mon, 05 Apr 2010 13:42:52 +0000</pubDate>
		<dc:creator>Scott Stanger</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.highcorral.com/?p=16</guid>
		<description><![CDATA[The other day I wanted to transfer some files to a USB flash drive on my Ubuntu 9.10 deskktop and noticed the USB drive did not automount.
Manually mounting a USB drive is achieved with a few simple steps in a terminal window:
First we need to know what the name of the file system is.  [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I wanted to transfer some files to a USB flash drive on my Ubuntu 9.10 deskktop and noticed the USB drive did not automount.</p>
<p>Manually mounting a USB drive is achieved with a few simple steps in a terminal window:</p>
<p>First we need to know what the name of the file system is.  With the device plugged in we use the <strong>fdisk</strong> command.</p>
<blockquote><p>
scott@blackjack:~$ sudo fdisk -l<br />
[sudo] password for scott:</p>
<p>Disk /dev/sda: 400.1 GB, 400088457216 bytes<br />
255 heads, 63 sectors/track, 48641 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes<br />
Disk identifier: 0&#215;6669894e</p>
<p>Device Boot      Start         End      Blocks   Id  System<br />
/dev/sda1   *           1       47888   384660328+  83  Linux<br />
/dev/sda2           47889       48641     6048472+   5  Extended<br />
/dev/sda5           47889       48641     6048441   82  Linux swap / Solaris<br />
Note: sector size is 2048 (not 512)</p>
<p>Disk /dev/sdb: 1016 MB, 1016858624 bytes<br />
16 heads, 32 sectors/track, 969 cylinders<br />
Units = cylinders of 512 * 2048 = 1048576 bytes<br />
Disk identifier: 0&#215;00000000</p>
<p>Device Boot      Start         End      Blocks   Id  System<br />
/dev/sdb1   *           1         969      992182    6  FAT16<br />
scott@blackjack:~$
</p></blockquote>
<p>The device is called <strong>sdb1</strong>, and it is this that we will mount. The sequence of commands to mount and then unmount are:</p>
<blockquote><p>
scott@blackjack:~$ cd /media<br />
scott@blackjack:/media$ sudo mkdir thing<br />
scott@blackjack:/media$ sudo mount /dev/sdb1 thing<br />
scott@blackjack:/media$ sudo umount thing<br />
scott@blackjack:/media$ sudo rmdir thing<br />
scott@blackjack:/media$
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.highcorral.com/how-to-mount-a-usb-flash-drive/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

