<?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>Strick&#039;s Ramblings &#187; desktop</title>
	<atom:link href="http://www.strickstuff.com/wp/tag/desktop/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.strickstuff.com/wp</link>
	<description>My Ramblings &#38; Random Thoughts</description>
	<lastBuildDate>Mon, 06 Sep 2010 20:05:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>sync&#8217;ing laptop &amp; desktop</title>
		<link>http://www.strickstuff.com/wp/2008/04/08/syncing-laptop-desktop/</link>
		<comments>http://www.strickstuff.com/wp/2008/04/08/syncing-laptop-desktop/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 10:52:55 +0000</pubDate>
		<dc:creator>James Strickland</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[etc]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[key]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.strickstuff.com/wp/?p=101</guid>
		<description><![CDATA[Recently got tired of having bookmarks on my my laptop and not on my desktop, podcasts on my desktop but not on my laptop and so on and so forth. So, I decided to use rsync to sync the two. I use my laptop most, so I started with that. I didn't want to rsync [...]]]></description>
			<content:encoded><![CDATA[<p>Recently got tired of having bookmarks on my my laptop and not on my desktop, podcasts on my desktop but not on my laptop and so on and so forth.  So, I decided to use rsync to sync the two.  I use my laptop most, so I started with that.  I didn't want to rsync my entire /home/user/ directory, so I just chose to sync the apps that I wanted to be the same on both computers.  So, I just wrote a simple bash script to sync the two.  First, I got rid of the passwords when I rsync or ssh to the desktop.  I used the command below.</p>
<p><code>ssh-keygen -t rsa</code></p>
<p>Do not enter password when prompted.  from there,</p>
<p><code>cd ~/.ssh/ &amp;&amp; cp id_rsa.pub laptop.key</code></p>
<p>Then put that key into authorized_key file on the remote computer.  I had an nfs share of my home computer, so I just did it that way.  You could use FTP, Thumbdrive, etc.</p>
<p><code>cat laptop.key &gt;&gt; authorized_keys</code></p>
<p>Once that is complete, repeat for both machines.  You should then have 2 way passwordless communication via rsync &amp; ssh.</p>
<p>here's the script I wrote.</p>
<pre class="bash"><span style="color: #808080; font-style: italic;">#-------------------------------</span>
<span style="color: #808080; font-style: italic;"># Laptop / Desktop <span style="color: #c20cb9; font-weight: bold;">sync</span> script</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># gi_james@strickstuff.com</span>
<span style="color: #808080; font-style: italic;">#-------------------------------</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Declare Variables</span>
<span style="color: #007800;">amark=</span><span style="color: #ff0000;">&quot;/home/james/.kde3.5/share/apps/amarok/&quot;</span>
<span style="color: #007800;">kopet=</span><span style="color: #ff0000;">&quot;/home/james/.kde3.5/share/apps/kopete/&quot;</span>
<span style="color: #007800;">firefx=</span><span style="color: #ff0000;">&quot;/home/james/.mozilla/&quot;</span>
<span style="color: #007800;">thunder=</span><span style="color: #ff0000;">&quot;/home/james/.thunderbird/&quot;</span>
<span style="color: #007800;">school=</span><span style="color: #ff0000;">&quot;/home/james/school/&quot;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Begin <span style="color: #c20cb9; font-weight: bold;">sync</span> ops</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Syncing Amarok&quot;</span>
rsync -arvuz <span style="color: #007800;">$amark</span> compaq:<span style="color: #007800;">$amark</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Syncing Firefox&quot;</span>
rsync -arvuz <span style="color: #007800;">$firefx</span> compaq:<span style="color: #007800;">$firefx</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Syncing Thunderbird&quot;</span>
rsync -arvuz <span style="color: #007800;">$thunder</span> compaq:<span style="color: #007800;">$thunder</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Syncing Kopete&quot;</span>
rsync -arvuz <span style="color: #007800;">$kopet</span> compaq:<span style="color: #007800;">$kopet</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Syncing School Folder&quot;</span>
rsync -arvuz <span style="color: #007800;">$school</span> compaq:<span style="color: #007800;">$school</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot; &quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot; &quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot; &quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;DONE!!!!!!!!!!!!!&quot;</span></pre>
<p>This script will sync the directories in the #delare variables section.  Change those around accordingly.  I know there are other methods, but this method is good enough for what I want to do.  Please feel free to email me with a better method.  I'm certainly not the most proficient bash scripter.</p>
<p>Oh, one more thing, before I started, I edited /etc/hosts and added the hostname of all computers on my network.  That way, all I have to do is type <em>ssh computername </em>instead of ssh ipaddy and no password is needed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strickstuff.com/wp/2008/04/08/syncing-laptop-desktop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
