<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>A Random String of Bits &#187; tutorial</title>
	<atom:link href="http://stringofbits.net/tag/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://stringofbits.net</link>
	<description>Sequences of bytes about Technology, Programming, Gaming, Doctor Who, and more</description>
	<lastBuildDate>Sat, 28 Jan 2012 12:06:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='stringofbits.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>A Random String of Bits &#187; tutorial</title>
		<link>http://stringofbits.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://stringofbits.net/osd.xml" title="A Random String of Bits" />
	<atom:link rel='hub' href='http://stringofbits.net/?pushpress=hub'/>
		<item>
		<title>BitTorrent, the Linux way</title>
		<link>http://stringofbits.net/2011/05/26/bittorrent-the-linux-way/</link>
		<comments>http://stringofbits.net/2011/05/26/bittorrent-the-linux-way/#comments</comments>
		<pubDate>Thu, 26 May 2011 18:00:11 +0000</pubDate>
		<dc:creator>Anna Wiggins</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[bittorrent]]></category>
		<category><![CDATA[dropbox]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://stringofbits.net/?p=306</guid>
		<description><![CDATA[I use BitTorrent a lot. Most Linux distributions have torrents available, and I have gotten a lot of Creative Commons-licensed music, such as the work of Jonathan Coulton, via BitTorrent. It is a great way to deliver content. However, I have a problem with (most of) the available BitTorrent clients. Given what BitTorrent does, which [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringofbits.net&amp;blog=23443234&amp;post=306&amp;subd=stringofbits&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I use <a href="http://en.wikipedia.org/wiki/BitTorrent_%28protocol%29">BitTorrent</a> a lot. Most Linux distributions have torrents available, and I have gotten a lot of <a href="http://creativecommons.org/">Creative Commons</a>-licensed music, such as the work of <a href="http://www.jonathancoulton.com/">Jonathan Coulton</a>, via BitTorrent. It is a great way to deliver content.</p>
<p>However, I have a problem with (most of) the available BitTorrent clients. Given what BitTorrent <em>does</em>, which is allow you to download and subsequently seed content, it should really run like a service &#8211; quietly running in the background handling your torrents. However, most of the clients for Linux work like Windows applications. They sit in your system tray, giving you &#8220;helpful&#8221; popup notifications. More importantly, they die if you logout. Luckily, I have found a solution.</p>
<h3>Enter transmission-daemon</h3>
<p>Transmission is one of the bittorrent clients for Linux that works like I described above &#8211; it&#8217;s a desktop application. However, it comes with a variant, transmisison-daemon, that can run in the background, as a dedicated &#8216;transmission&#8217; user. This is much nicer.</p>
<p>Setting it up in fedora is pretty easy. Install the transmission-daemon package. Edit /etc/sysconfig/transmission-daemon to suit your needs. You can change TRANSMISSION_HOME to whatever directory you&#8217;d like your completed torrent files to live in (you <strong>do not</strong> need to modify the actual home directory of the transmission user, but do make sure TRANSMISSION_HOME is owned by that user).</p>
<p>Now, start transmission-daemon, then stop it again:</p>
<pre>service transmission-daemon start
service transmission-daemon stop</pre>
<p>That step created the transmission configuration files, which you can now find in $TRANSMISSION_HOME/.config/transmission-daemon/. The file you probably want to edit is settings.json. Edit this file to suit your needs, then start transmission again. To tell transmission to automatically start at boot, run:</p>
<pre>chkconfig transmission-daemon on</pre>
<h3>transmission-remote &#8211; for all your transmission-related needs</h3>
<p>So, now you have a daemonized BitTorrent client, running unobtrusively in the background. But how do you use it?</p>
<p>The answer is transmission-remote. This tool is an administrative front-end for transmission-daemon that lets you add, remove, start, stop, and view your torrents, and a lot more besides. To add a torrent, you can use &#8216;transmission-remote -a&#8217; on either a local .torrent file or a URL, like so:</p>
<pre>transmission-remote -a /path/to/file.torrent
transmission-remote -a http://example.com/file.torrent</pre>
<p>Once the torrent is added, it will automatically start. You can get information on all your torrents with &#8216;transmission-remote -l&#8217;. Note that each torrent has a numeric ID assigned to it; you use that ID with the &#8216;-t&#8217; option to tell transmission-remote to perform actions on the torrent. For example, to stop the torrent with ID 42, you could run:</p>
<pre>transmission-remote -t 42 -S</pre>
<p>transmission-remote can do a lot more; check its man page for details. In particular, the -s, -i, and &#8211;remove-and-delete are useful flags to know.</p>
<h3>Making things easier &#8211; the watch directory</h3>
<p>The problem with the approach I have described is that the command line, while great for interacting with your local torrents, is not the place most people go to look for torrents in the first place. More often, you find a .torrent file on the web, and having to open a terminal and run a command is an annoying extra step.</p>
<p>To make things easier, you can set up a watch directory; any .torrent files placed in that directory will automatically be added to transmission-daemon. To set up a watch directory, edit settings.json and add the following:</p>
<pre>watch-dir-enabled: "true",
watch-dir: "/path/to/watch/dir",</pre>
<p>(I have found it is best to always stop transmission-daemon before making changes to settings.json. It often overwrites settings at shutdown)</p>
<p>One caveat about the watch directory: when transmission-daemon is started, every .torrent file in there will be added. While this has no effect on torrents you are still downloading or seeding, torrents you have already removed will be re-added to transmission-daemon. For this reason, it is a good idea to routinely delete the files in your watch directory. You can use tmpwatch and/or cron to periodically delete the files.</p>
<h3>Torrents from anywhere &#8211; using Dropbox with transmission-daemon</h3>
<p><a href="http://dropbox.com">Dropbox</a> is a fantastic tool for always having access to important files. Any files you put in your dropbox directory get automatically synced to every machine you use dropbox on. There are also Android, iOS, and web interfaces, so you can really get to your files from anywhere.</p>
<p>What does this have to do with transmission? Well, you can put your watch directory inside your dropbox directory. Any .torrent file you add to that directory &#8211; from any computer or phone &#8211; will automatically be started on the computer running transmission-daemons. This means you can start your torrents whenever you come across them, no matter where in the world you happen to be.</p>
<p>And if you have multiple people in your household who might all like to use one machine for BitTorrent, you can simply share your dropbox watch directory with all of them.</p>
<h3>The way computers should behave &#8211; the world according to Anna</h3>
<p>User interface design is a complicated thing, and a lot of research has gone into it. What a lot of UI discussions miss, though, is that everyone has different needs and preferences. The setup I have described here works the way I personally like best. It is transparent; that is, it gets out of your way and just does what it is supposed to do, with no fuss. It is powerful and flexible. For a Linux power user who prefers to use the command line where she can, it is hard to imagine a better BitTorrent solution.</p>
<br />Filed under: <a href='http://stringofbits.net/category/technology/'>Technology</a> Tagged: <a href='http://stringofbits.net/tag/bittorrent/'>bittorrent</a>, <a href='http://stringofbits.net/tag/dropbox/'>dropbox</a>, <a href='http://stringofbits.net/tag/linux/'>linux</a>, <a href='http://stringofbits.net/tag/tutorial/'>tutorial</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stringofbits.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stringofbits.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stringofbits.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stringofbits.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stringofbits.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stringofbits.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stringofbits.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stringofbits.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stringofbits.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stringofbits.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stringofbits.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stringofbits.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stringofbits.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stringofbits.wordpress.com/306/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringofbits.net&amp;blog=23443234&amp;post=306&amp;subd=stringofbits&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stringofbits.net/2011/05/26/bittorrent-the-linux-way/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a6c6c99ccd3e2bbaec318a52fb3d43c?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">annabunches</media:title>
		</media:content>
	</item>
		<item>
		<title>Tutorial: Creating OpenSim terrain with Blender</title>
		<link>http://stringofbits.net/2009/09/08/tutorial-creating-opensim-terrain-with-blender/</link>
		<comments>http://stringofbits.net/2009/09/08/tutorial-creating-opensim-terrain-with-blender/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 02:18:19 +0000</pubDate>
		<dc:creator>Anna Wiggins</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[metaverse]]></category>
		<category><![CDATA[opensim]]></category>
		<category><![CDATA[second life]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://stringofbits.net/?p=152</guid>
		<description><![CDATA[This tutorial will explain how to create RAW terrain files for OpenSim and Second Life using Blender and the Gimp. Before we begin You will need the following software for this tutorial. All of this software is free and open source. Blender, a professional 3d modelling tool. Blender is powerful but complex, and basic blender [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringofbits.net&amp;blog=23443234&amp;post=152&amp;subd=stringofbits&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This tutorial will explain how to create RAW terrain files for <a href="http://opensimulator.org/wiki/Main_Page">OpenSim</a> and <a href="http://secondlife.com">Second Life</a> using <a href="http://blender.org">Blender</a> and the <a href="http://www.gimp.org/">Gimp</a>.<br />
<span id="more-152"></span></p>
<h3>Before we begin</h3>
<p>You will need the following software for this tutorial.  All of this software is free and open source.</p>
<ul>
<li><a href="http://blender.org">Blender</a>, a professional 3d modelling tool.  Blender is powerful but complex, and basic blender knowledge is assumed for this tutorial.  Blender will be used to actually create the heightmap.</li>
<li><a href="http://www.gimp.org/">The Gimp</a>, a powerful program for creating and editing raster (i.e. normal) image files.  The Gimp will be used for splitting the heightmap into RAW terrain files that OpenSim can use.</li>
<li><a href="http://dominodesigns.info/project/gimpterrain">gimpterrain</a>, a plug-in for The Gimp that allows it to open and save RAW terrain files.</li>
<li><a href="http://stringofbits.files.wordpress.com/2009/09/upload_terrain.pngterrainerizer/">terrainerizer</a> (optional), a bash script I created to automate splitting the heightmap into RAW files.  Terrainerizer only works on Linux, and still requires The Gimp and gimpterrain to be installed.  It also requires <a href="http://www.imagemagick.org/script/index.php">ImageMagick</a>.</li>
</ul>
<p>In addition to the above software, you will also need a blank RAW terrain file.  You could download a terrain file from OpenSim and transform it into a blank one (replace the Height layer with #ffffff, replace the factor layer with #808080), or you could just download <a href="http://stringofbits.files.wordpress.com/2009/09/upload_terrain.pngwp-content/blank.raw">this one</a> that I have created for you.</p>
<h3>Create a heightmap</h3>
<p>A good tutorial on creating a generic heightmap in Blender can be found <a href="http://wiki.blender.org/index.php/Doc:Tutorials/Textures/Maps/Creating_a_Heightmap_from_a_Plane">here</a>.</p>
<p>The tutorial above creates a heightmap that is 512&#215;512 pixels.  However, an OpenSim RAW terrain file is only 256&#215;256 pixels.  This means that the above tutorial will create terrain for 4 regions, arranged in a square.  If you need terrain for a different number of regions, you can modify the above tutorial to create different sized heightmaps.</p>
<p>For example, suppose you want to create an oblong island that is 2 regions by 4 regions in size.  To do that:</p>
<p>1. Create the plane, but instead of scaling it to 2&#215;2 blender units, scale it to 2&#215;4 blender units.  To do this, you can use this command sequence in blender:</p>
<ul>
<li>Right-click on the object to select it.</li>
<li>Change the mode to Edit mode.</li>
<li>Press &#8216;s&#8217;, &#8216;y&#8217;, &#8217;2&#8242;, &#8216;return&#8217;.</li>
<li>Press &#8216;s&#8217;, &#8216;x&#8217;, &#8217;4&#8242;, &#8216;return&#8217;.</li>
</ul>
<p>Now you should have a plane that is oblong instead of perfectly square.</p>
<p>2. When you configure the render settings, you will need to use different values.</p>
<ul>
<li>In the Scene settings (F10), SizeX and SizeY should be set to 256 * (number of regions).  In our case, we have 2 regions in the Y dimension, and 4 regions in the X dimension.  So, SizeX should be set to 1024, and SizeY should be set to 512.</li>
<li>In the camera settings, the scale needs to be adjusted to fit the plane precisely.  In our example, the scale should be set to 8.  To get it just right, select the camera, and press Numpad0 to switch to camera view.  You should see two concentric rectangles composed of dashed lines.  Now, press F9 to view the Editing options for the camera.  Now, adjust the Scale value until the outer dashed rectangle encompasses your plane completely, without including anything outside the plane.  If the dashed rectangle is not the same shape as your plane, then you still need to set SizeX and SizeY in the Render settings.</li>
</ul>
<h3>Creating RAW terrain files with the Gimp</h3>
<p>Now that you have a heightmap file, you still need to turn it into terrain files that can be uploaded into OpenSim.</p>
<p>Enter <a href="http://dominodesigns.info/">Domino Marama</a>, creator of <a href="http://dominodesigns.info/project/gimpterrain">gimpterrain</a>, an import/export plug-in for the Gimp that can handle the OpenSim RAW terrain format.  Download gimpterrain and install it into your gimp plug-ins directory.</p>
<p>Now, if you are running Linux, you can automate the rest of this section with my terrainerizer script.  See <a href="#easier">below</a>.</p>
<p>We also need the blank terrain file that I mentioned earlier.</p>
<p>Armed with these tools, we can open a terrain file in the gimp and combine it with a portion of our heightmap.</p>
<ol>
<li>Open your blank terrain file (blank.raw) and the heightmap in the Gimp.</li>
<li>Using the Rectangle Select tool, select a 256&#215;256 pixel section of the heightmap, starting in the upper-left corner.</li>
<li>Click Edit -&gt; Copy</li>
<li>Select the terrain file and make sure the Height layer is selected.</li>
<li>Click Edit -&gt; Paste.  You should see the section of the heightmap you copied appear as a floating layer.</li>
<li>Click Layer -&gt; Anchor Layer.  The Height layer should now look like the copied portion of the heightmap.</li>
<li>Click File -&gt; Save As and save this file as a new file with the .raw extension.</li>
</ol>
<p>Now, repeat this process for every 256&#215;256 pixel section in your original heightmap.</p>
<h3><a name="easier">Making it easier</a></h3>
<p>Performing the steps in the previous section is very tedious, especially given how long it takes to save the terrain files.  To make this easier, I have automated the process with the <a href="http://stringofbits.files.wordpress.com/2009/09/upload_terrain.pngterrainerizer/">terrainerizer</a> script.</p>
<p>If you are running Linux, simply put the terrainerizer script somewhere in your path.  Edit it and specify the path to your blank.raw file, then run:</p>
<blockquote><p><code>terrainerizer heightmap.png</code></p></blockquote>
<p>Replace &#8216;heightmap.png&#8217; with your heightmap file.  Now let terrainerizer work.  It will handle everything we did in the previous section automatically.  It may take a while, depending on how large your heightmap is.</p>
<p>When it is finished, terrainerizer will leave several files in your current directory, named with this scheme:</p>
<p><code>heightmap-nxm.raw</code></p>
<p>Where &#8216;n&#8217; and &#8216;m&#8217; are numbers starting at 0 that represent the column and row for that terrain file.  So, <code>0x0</code> is the top left region of your terrain, <code>0x1</code> is the next region (moving from top to bottom), and so on.  Just upload these terrain files and you&#8217;re done!</p>
<h3>Uploading the terrain files</h3>
<p>Now that you have the terrain files, you can upload these files into OpenSim.  There are two ways to do this.</p>
<p>1. From the OpenSim server console, you can simply:</p>
<blockquote><p><code>change region RegionName<br />
terrain load /path/to/terrain.raw</code></p></blockquote>
<p>Repeat this for each of your regions.</p>
<p>2. From a viewer connected to OpenSim (assuming you are using Hippo or a similar viewer):</p>
<ul>
<li>Move to the region you where you want to upload terrain.</i>
<li>Navigate to World -&gt; Region/Estate -&gt; Terrain</li>
<li>Click &#8220;Upload RAW Terrain&#8230;&#8221; and select the terrain file you created for this region.</li>
</ul>
<div id="attachment_190" class="wp-caption alignright" style="width: 310px"><a href="http://stringofbits.files.wordpress.com/2009/09/upload_terrain.png"><img src="http://stringofbits.files.wordpress.com/2009/09/upload_terrain.png?w=300&#038;h=218" alt="The Upload Terrain menu in Hippo" title="upload_terrain" width="300" height="218" class="size-medium wp-image-190" /></a><p class="wp-caption-text">The Upload Terrain menu in Hippo</p></div>
<p>Repeat these steps for each region where you want to upload terrain.</p>
<br />Posted in Technology Tagged: linux, metaverse, opensim, second life, tutorial <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stringofbits.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stringofbits.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stringofbits.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stringofbits.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stringofbits.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stringofbits.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stringofbits.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stringofbits.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stringofbits.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stringofbits.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stringofbits.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stringofbits.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stringofbits.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stringofbits.wordpress.com/152/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringofbits.net&amp;blog=23443234&amp;post=152&amp;subd=stringofbits&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stringofbits.net/2009/09/08/tutorial-creating-opensim-terrain-with-blender/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a6c6c99ccd3e2bbaec318a52fb3d43c?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">annabunches</media:title>
		</media:content>

		<media:content url="http://stringofbits.files.wordpress.com/2009/09/upload_terrain.png?w=300" medium="image">
			<media:title type="html">upload_terrain</media:title>
		</media:content>
	</item>
	</channel>
</rss>
