<?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>hatsuseno&#039;s blog &#187; gentoo</title>
	<atom:link href="http://blog.hatsuseno.org/index.php/tag/gentoo/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hatsuseno.org</link>
	<description>rantings on tech</description>
	<lastBuildDate>Tue, 12 Jul 2011 09:26:26 +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>Android 2.2 USB Tethering on a Gentoo box</title>
		<link>http://blog.hatsuseno.org/index.php/android-2-2-usb-tethering-on-a-gentoo-box/</link>
		<comments>http://blog.hatsuseno.org/index.php/android-2-2-usb-tethering-on-a-gentoo-box/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 12:57:58 +0000</pubDate>
		<dc:creator>hatsuseno</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[froyo]]></category>
		<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://blog.hatsuseno.org/?p=224</guid>
		<description><![CDATA[Why not use the WiFi Hotspot Recently HTC rolled out the Android 2.2 upgrade for my Desire, finally enabling USB Tethering out of the box. Often enough I used the WiFi hotspot feature on my previous phone to enable my laptop to have internet on the go. Android&#8217;s got this feature as well nowadays, but [...]]]></description>
			<content:encoded><![CDATA[<h2>Why not use the WiFi Hotspot</h2>
<p>Recently HTC rolled out the Android 2.2 upgrade for my Desire, finally enabling USB Tethering out of the box. Often enough I used the WiFi hotspot feature on my previous phone to enable my laptop to have internet on the go. Android&#8217;s got this feature as well nowadays, but I don&#8217;t really like it because it really, and I mean *really*, puts the drain on your phone&#8217;s battery. USB Tethering seems like a much better solution.</p>
<h2>Setup for Android</h2>
<p>This is by far the easiest part, just hook up your phone, drag down the status bar and instead of charge only, or whatever mode it is in at that time, set it to USB Tethering.</p>
<h2>Setup for Gentoo</h2>
<p>This part is a bit trickier, especially when you roll your own kernel. Open up <code>menuconfig</code> for your kernel and enable these options</p>

<div class="wp_syntax"><div class="code"><pre class="none" style="font-family:monospace;">Device Drivers ---&gt;
  [*] Network device support ---&gt;
    USB Network Adapters ---&gt;
      [*] Multi-purpose USB Networking Framework
        &lt;*&gt; CDC Ethernet support
        &lt;*&gt; CDC EEM support
        &lt;*&gt; Simple USB Network Links (CDC Ethernet subset)
          [*] Embedded ARM Linux links
  [*] USB Support ---&gt;
    &lt;*&gt; USB Modem (CDC ACM) support
    &lt;*&gt; USB Wireless Device Management support</pre></div></div>

</p>
<p>Now build your kernel as usual and reboot. When you now plug in your Android phone when it&#8217;s in USB Tethering mode, if all is well, you should be able to see a new network interface, <code>usbX</code>, X usually being 0. The link might be down, so check it with the command</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">ifconfig</span> <span style="color: #660033;">-a</span></pre></div></div>

<p>Which will output something like this</p>

<div class="wp_syntax"><div class="code"><pre class="none" style="font-family:monospace;">usb0      Link encap:Ethernet  HWaddr 26:10:72:ab:38:0e  
            BROADCAST MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000 
            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)</pre></div></div>

<p>Which means it all worked. Now all you have to do is run a DHCP request on that interface, and Android will handle the rest. You can set up a init.d script for this interface much the same way you would for a normal interface. Just make a symlink from <code>/etc/init.d/net.lo</code> to <code>/etc/init.d/net.usb0</code> and run that script whenever you want. </p>
<h2>Beautifying the whole thing</h2>
<p>Running around on the console starting bootscripts like that doesn&#8217;t suit everyone, including me when I&#8217;m just on the road and stuff needs to work. I recommend using something like <a href='http://wicd.sourceforge.net/'>wicd</a> or <a href='http://projects.gnome.org/NetworkManager/'>NetworkManager</a> to handle it for you. Using wicd it&#8217;s pretty easy to make it automagically use the <code>usb0</code> interface when it appears, so you&#8217;ll only have to plug it on for it to work.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hatsuseno.org/index.php/android-2-2-usb-tethering-on-a-gentoo-box/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gentoo, awesome and themes</title>
		<link>http://blog.hatsuseno.org/index.php/gentoo-awesome-and-themes/</link>
		<comments>http://blog.hatsuseno.org/index.php/gentoo-awesome-and-themes/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 03:53:23 +0000</pubDate>
		<dc:creator>hatsuseno</dc:creator>
				<category><![CDATA[Gentoo errors]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[custom-scripts]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[wallpaper]]></category>

		<guid isPermaLink="false">http://blog.hatsuseno.org/?p=126</guid>
		<description><![CDATA[I&#8217;ve been a Gentoo user since forever, and for some time I&#8217;ve been using awesome for a window manager instead of the desktop environments Gnome or KDE. One thing I never got around to change was the wallpaper. My terminals are pseudo-transparent, and I never disliked the default &#8216;awesome&#8217; wallpaper. @ZackLeonhart&#8216;s bitching and moaning changed [...]]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="http://hammerfest.hatsuseno.org/~crashmatrix/awesome_logo.png" title="Awesome logo" class="alignleft" width="64" height="64" />
<p>I&#8217;ve been a Gentoo user since forever, and for some time I&#8217;ve been using awesome for a window manager instead of the desktop environments Gnome or KDE. One thing I never got around to change was the wallpaper. My terminals are pseudo-transparent, and I never disliked the default &#8216;awesome&#8217; wallpaper. <a href='http://twitter.com/ZackLeonhart'>@ZackLeonhart</a>&#8216;s bitching and moaning changed that.</p>
<p>Turns out that aside from editing the system-wide theme script, by default located in <code>/usr/share/awesome/themes/*</code> (which I consider to be a BadThink&#8482;), there is no straight forward way of doing it nicely in the Gentoo provided default setup. So here&#8217;s what you do.</p>
<p><ol>
<li>Create yourself a lua.rc in <code>${HOME}/.config/awesome</code><br /><code>$ cp /etc/xdg/awesome/rc.lua ~/.config/awesome</code></li>
<li>Recursively copy all themes from the system-wide dirs to your local configdir.<br /><code>$ cp -rvf /usr/share/awesome/themes ~/.config/awesome</code></li>
<li>In your copy of lua.rc you will find a variable called <code>theme_path</code>, change it to <code>theme_path = os.getenv("HOME") .. "/.config/awesome/themes/path/to/theme.lua"</code></li>
<li>Edit the variable <code>theme.wallpaper_cmd</code> to contain the string <code>"eval `cat ~/.fehbg`"</code></li>
<li>Choose a wallpaper you like, execute <code>$ feh --bg-scale /path/to/wallpaper.jpg</code></li>
</ol>
<p>And you&#8217;re done! If you want to change your wallpaper, simply use <code>feh</code> again with a random other file, and make sure the file is readable when awesome is starting up, and it&#8217;ll set it up automagically. Basically, awesome&#8217;s &#8216;beautiful&#8217; library takes your typed out command and executes that in order to set the wallpaper, feh has a convenient way of storing the default wallpaper by simply dumping the command that was used to set it up in the first place in a configuration file in your home directory, hence the <code>eval `cat whatever`</code> trick.
</p>
<div class="wp-caption alignnone" style="width: 450px"><a href='http://hammerfest.hatsuseno.org/~crashmatrix/screencap_250210.jpg'><img alt="Screenshot of my new wallpaper in Awesome" src="http://hammerfest.hatsuseno.org/~crashmatrix/screencap_250210.jpg" title="Screenshot" width="440" /></a><p class="wp-caption-text">Screenshot of my new wallpaper in Awesome</p></div>
<p>P.S.: Don&#8217;t think you can leave out the call to os.getenv() in step 3, awesome doesn&#8217;t expand the tilde (&#8216;~&#8217;), so the path it&#8217;ll try to access will be invalid.</p>
<p>P.P.S.: This is more of a note for me, in case I ever lose my epic new wallpaper. It can be found <a href='http://upload.wikimedia.org/wikipedia/commons/e/ec/LodalenPano.jpg'>here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hatsuseno.org/index.php/gentoo-awesome-and-themes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

