James Willcox2023-01-04T15:38:37+00:00http://snorp.netJames Willcoxsnorp@snorp.netDIY motorized blinds for $402016-05-20T10:00:00+00:00http://snorp.net/2016/05/20/blinds-controller<p>I have some 2” wooden blinds in my house that I’ve been wanting to motorize. Why? I’m lazy and I thought it would be cool to have.</p>
<p>The best commercial solution for retrofitting existing blinds seems to be <a href="https://www.somfysystems.com/">Somfy</a>. They have wireless battery-powered systems and fancy-looking remotes. For new motorized blinds, <a href="http://www.baliblinds.com/">Bali</a> seems to be popular, and they use Somfy for the motorization. There are also some kickstarter things (<a href="http://www.teptron.com/">MOVE</a>, <a href="http://www.mysmartblinds.com/">MySmartBlinds</a>), but the last time I looked those didn’t really do what I want. Somfy likely has a good product, but it’s very expensive. It looks like it would cost about $150 per blind, which is just way too much for me. They want <a href="http://www.automatedshadestore.com/shop/product-info.php?Somfy_12V_DC-Volt_Reloadable_Battery_Tube_Wand-pid328.html">$30 just for the plastic wand</a> that holds the batteries (8 x AA). We’re talking about a motor and a wireless controller to tell it what to do. It’s not rocket surgery, so why should it cost $150?</p>
<p>My requirements are:</p>
<ul>
<li>Ability to tilt the blinds to one of three positions (up, middle, down) remotely via some wireless interface. I don’t care about raising or lowering the entire blind.</li>
<li>There must be some API for the wireless interface such that I can automate them myself (close at night, open in morning)</li>
<li>Tilt multiple blinds at the same time so they look coordinated.</li>
<li>Be power efficient – one set of batteries should last more than a year.</li>
</ul>
<p>Somfy satisfies this if I also buy their <a href="http://www.amazon.com/Somfy-Universal-Interface-Channel-1810872/dp/B00OD3CCUQ%3FSubscriptionId%3DAKIAILSHYYTFIVPWUY6Q%26tag%3Dduckduckgo-ffab-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB00OD3CCUQ">“Universal RTS Interface”</a> for $233, but that only makes their solution even more expensive. For the 6 blinds I wanted to motorize, it would cost about $1200. No way.</p>
<p>I’ve been meaning to get into microcontrollers for a while now, and I thought this would be the perfect project for me to start. About a year ago I bought a <a href="http://redbearlab.com/blenano">RedBear BLE Nano</a> to play with some Bluetooth stuff, so I started with that. I got a <a href="https://www.sparkfun.com/products/11965">hobby servo</a> and a bunch of other junk (resistors, capacitors, etc) from <a href="https://sparkfun.com">Sparkfun</a> and began flailing around while I had some time off around Christmas. The Arduino environment on the BLE Nano is a little weird, but I got things cobbled together relatively quickly. The servo was very noisy, and it’s difficult to control the speed, but it worked. Because I wanted to control multiple devices at once, BLE was not a really great option (since AFAIK there is no way to ‘broadcast’ stuff in a way that is power-efficient for the listeners), and I started looking at other options. Eventually I ran across the <a href="https://lowpowerlab.com/shop/Moteino/moteino-r4">Moteino</a>.</p>
<p>The Moteino is an Arduino clone paired with a RFM69W wireless radio, operating at either 915Mhz or 433Mhz. It also has a very efficient voltage regulator, making it suitable for battery powered applications. The creator of the board (Felix Rusu) has put in a lot of work to create libraries for the Moteino to make it useful in exactly my type of application, so I gave it a try. The <a href="https://github.com/LowPowerLab/RFM69">RFM69 library</a> is lovely to work with, and I was sending messages between my two Moteinos in no time. The idea is to have one Moteino connected via USB to a Linux box (I already have a <a href="http://beagleboard.org/black">BeagleBone Black</a>) as a base station which will relay commands to the remote devices. I got my servo working again with the Moteino quickly, as most of the code Just Worked.</p>
<p>I started out with a hobby servo because I knew it would be easy to control, but the noise and lack of speed control really bothered me. I needed to try something else. I considered higher quality servos, a gear motor with encoder or limit switches, stepper motors, worm gear motors, etc. I was going to end up building 6 of these things to start with, so cost was definitely a big factor. I ended up settling on the 28BYJ-48 stepper motor because it is extremely cheap (about $2), relatively quiet, and let me control the speed of rotation very precisely. There is a great Arduino library for stepper motors, <a href="http://www.airspayce.com/mikem/arduino/AccelStepper/">AccelStepper</a>, which lets you configure acceleration/deceleration, maximum speed, etc. It also has an easy-to-use API for positioning the motor. I found a <a href="http://www.ebay.com/itm/21Size-D19L25-Flexible-Shaft-Coupling-CNC-Stepper-Motor-Coupler-Connector-4-10mm-/381412205587?var=&hash=item58cdf06413:m:matJKF7ONfwQKgTUkCL-55A">5mm x 8mm aluminum motor coupling</a> to connect the motor to the blinds shaft. I then used a zip tie and a piece of rubber to secure the motor to the blinds rail. This doesn’t look very professional, but it’s not something you really see (my blinds have a valance that covers the rail). A better solution involving some kind of bracket would be great, but would increase the cost and require a lot more time. Using the stepper, I was able to smoothly, quietly, and cost-effectively control the blinds.</p>
<p>I then started to look into power consumption. If you don’t do put anything to sleep, the power usage is pretty high. The <a href="https://github.com/LowPowerLab/LowPower">LowPower</a> library from Felix makes it easy to put the CPU to sleep, which helps a lot. When sleeping, the CPU uses very little power (about 3µA I think), and the radio will wake you up via interrupt if a message arrives. The radio uses roughly 17mA in receive mode, however, so that means we’d only get about a week of battery life if we used a set of high-quality AAs (<code class="language-plaintext highlighter-rouge">3000mAh / 17mA = 176h</code>). We need to do a lot better.</p>
<p>The RFM69 has a useful feature called Listen Mode that some folks on the LowPowerLabs <a href="https://lowpowerlab.com/forum/index.php/board,7.0.html">forums</a> have figured out how to use. In this mode, you can configure the radio to cycle between sleeping and receiving in order to reduce power consumption. There are a lot of options here, but it was discovered that you only need to be in the RX phase for 256µS in order for a message to be detected. When the radio is asleep it uses about 4µA. So if you sleep for 1s and receive for 256µS, that means your average power consumption for the radio is about 12µA. This is a dramatic improvement, and it means that the device can still respond in roughly one second, which is certainly adequate for my application. Of course, you can always trade even more responsiveness for power efficiency, and people using this method on coin cell batteries certainly do that. There is one user on the forums who has an application with an expected battery life of over 100 years on a single coin cell! I have an extension of the RFM69 library, <a href="https://github.com/snorp/RFM69_WL">RFM69_WL</a>, which collected some of the other listen mode code that was floating around and extends it so you can set your own sleep/RX durations.</p>
<p>I’ve measured/calculated my average power consumption to be about 46µA if I run the motor for 12s per day. That comes out to <em>over 7 years of life on a set of 4 AA batteries</em> (Energizer Ultimate Lithium), which is an almost unbelievable number. There are several factors I am not really considering, however, such as RF noise (which wakes the radio causing increased power consumption), so the real life performance might not be very close to this. Still, if I can get 2 years on a set of 4 AAs I’ll be pretty happy.</p>
<p>Usually when you buy a 28BYJ-48 it will include a driver board that has a <a href="http://www.ti.com/product/uln2003a">ULN2003A</a>, some connectors, and a set of LEDs for showing which phase of the stepper is active. This is fine for testing and development, but it was going to be pretty clunky to use this in a final solution. It was time to design my first PCB!</p>
<p>I found out early on that it was pretty difficult to talk to other people about problems with your project without having a schematic, so I made one of those. I started with <a href="http://fritzing.org/home/">Fritzing</a>, but moved to <a href="http://www.cadsoftusa.com/">EAGLE</a> when it was time to do the PCB. It seemed to be the standard thing to use, and it was free. EAGLE has a pretty steep learning curve, but some <a href="https://learn.sparkfun.com/tutorials/using-eagle-schematic">tutorials</a> from Sparkfun helped a lot. I also got some help from the folks on the LowPowerLabs forums (TomWS, perky), who I suspect do this kind of thing for a living. You can get the EAGLE schematic and board design <a href="https://github.com/snorp/BlindsControl/tree/master/PCB">here</a>.</p>
<blockquote class="imgur-embed-pub" lang="en" data-id="aK5LqnU"><a href="//imgur.com/aK5LqnU">View post on imgur.com</a></blockquote>
<script async="" src="//s.imgur.com/min/embed.js" charset="utf-8"></script>
<blockquote class="imgur-embed-pub" lang="en" data-id="bustGg8"><a href="//imgur.com/bustGg8">View post on imgur.com</a></blockquote>
<script async="" src="//s.imgur.com/min/embed.js" charset="utf-8"></script>
<p>I ordered my first batch of boards from <a href="http://seeedstudio.com/fusion_pcb.html">Seeed Studio</a>, as well as a bunch of supporting components from <a href="http://www.digikey.com/">Digikey</a>. The PCB orders typically take a little over two weeks, which is quite a bit more waiting than I’m accustomed to. I was pretty excited when they arrived, and started checking things out. I soon realized I had made a mistake. The component I had in my design for the motor connector (which is a <a href="http://www.digikey.com/product-detail/en/jst-sales-america-inc/B5B-XH-A\(LF\)\(SN\)/455-2270-ND/1530483">JST-XH 5-pin</a>) was the wrong pitch and size, so the socket I had didn’t fit. Whoops. The hardware world does not play well with my “just try some stuff” mentality from working with software. I found an EAGLE library for the JST-XH connectors, used the correct part, and ordered another batch of PCBs. This time I actually printed out my board on paper to make sure everything matched up. I had run across <a href="http://pcbshopper.com/">PCBShopper</a> while waiting for my first batch of boards, so I decided to use a different fabricator this time. I chose <a href="http://makerstudio.cc/">Maker Studio</a> for the second order, since I could pay about the same amount and get red boards instead of green. Another two weeks went by, and finally last week I received the boards. I assembled one last weekend using my fancy (and cheap!) new <a href="http://www.amazon.com/Aoyue-Variable-Soldering-Station-Removable/dp/B00MCVCHJM?ie=UTF8&psc=1&redirect=true&ref_=oh_aui_detailpage_o00_s00">soldering station</a>. It didn’t work! Shit! The Moteino was working fine, but the motor wasn’t moving. Something with the motor driver or connection was hosed. After probing around for a pretty long time, I finally figured out that the socket was installed backwards. It seems the pins in the EAGLE part I found were reversed. Ugh. With a lot of hassle, I was able to unsolder the connector from the board and reverse it. The silkscreen outline doesn’t match up, but whatever. It works now, which was a big relief.</p>
<blockquote class="imgur-embed-pub" lang="en" data-id="4X1vFAO"><a href="//imgur.com/4X1vFAO">View post on imgur.com</a></blockquote>
<script async="" src="//s.imgur.com/min/embed.js" charset="utf-8"></script>
<p>I thought about putting the board in some kind of plastic enclosure, but it was hard to find anything small enough to fit inside the rail while also being tall enough to accomodate the Moteino on headers. I’m planning to just use some extra-wide heat shrink to protect the whole thing instead, but haven’t done that yet.</p>
<p>Below are some photos and videos, as well as the entire list of parts I’ve used and their prices. Each device costs about $40, which is a pretty big improvement over the commercial options (except maybe the kickstarter stuff). Also important is that there are no wires or electronics visible, which was critical for the Wife Acceptance Factor (and my own, honestly).</p>
<p>I’m sure a real EE will look at this and think “pfft, amateur!”. And that’s fine. My goals were to learn and have fun, and they were definitely accomplished. If I also produced something usable, that’s a bonus.</p>
<blockquote class="imgur-embed-pub" lang="en" data-id="6y5y8fg"><a href="//imgur.com/6y5y8fg">View post on imgur.com</a></blockquote>
<script async="" src="//s.imgur.com/min/embed.js" charset="utf-8"></script>
<blockquote class="imgur-embed-pub" lang="en" data-id="asrs8x3"><a href="//imgur.com/asrs8x3">View post on imgur.com</a></blockquote>
<script async="" src="//s.imgur.com/min/embed.js" charset="utf-8"></script>
<blockquote class="imgur-embed-pub" lang="en" data-id="LEehhZg"><a href="//imgur.com/LEehhZg">View post on imgur.com</a></blockquote>
<script async="" src="//s.imgur.com/min/embed.js" charset="utf-8"></script>
<div>
<iframe width="315" height="315" src="https://www.youtube.com/embed/l3H9lPdafEg?list=PLbksjsxwAq-dJseSDi6oBmee6cvs_IarQ&index=1" frameborder="0" allowfullscreen=""></iframe>
</div>
<h3 id="bill-of-materials">Bill of Materials</h3>
<table>
<tr><td><a href="http://www.ebay.com/itm/Stepper-Motor-ULN2003-5-Line-4-Phase-5V-12V-28BYJ-48-Drive-Test-Module-Board-/291527657122?hash=item43e06706a2:g:3KAAAOSwHnFVuvJm">28BYJ-48-12V</a></td><td>$2.08</td></tr>
<tr><td><a href="http://www.digikey.com/product-detail/en/on-shore-technology-inc/ED16DT/ED3046-5-ND/4147596">DIP socket</a></td><td>$0.19</td></tr>
<tr><td><a href="http://www.ebay.com/itm/21Size-D19L25-Flexible-Shaft-Coupling-CNC-Stepper-Motor-Coupler-Connector-4-10mm-/381412205587?var=&hash=item58cdf06413:m:matJKF7ONfwQKgTUkCL-55A">Motor Coupling, 5mm x 8mm</a></td><td>$1.26</td></tr>
<tr><td><a href="http://www.digikey.com/product-detail/en/rubycon/35ZLH100MEFC6.3X11/1189-1300-ND/3134256">Electrolytic Capacitor, 100µF</a></td><td>$0.30</td></tr>
<tr><td><a href="http://www.digikey.com/product-detail/en/vishay-bc-components/K104K10X7RF5UH5/BC2665CT-ND/2356879">Ceramic Capacitor, 0.1µF (2)</a></td><td>$0.24</td></tr>
<tr><td><a href="http://www.digikey.com/product-detail/en/cui-inc/PJ-002B/CP-002B-ND/96965">DC Barrel Jack, PJ-002B</a></td><td>$0.93</td></tr>
<tr><td><a href="http://www.digikey.com/product-detail/en/cui-inc/PP3-002B/CP3-1001-ND/992137">DC Barrel Jack Plug, PP3-002B</a></td><td>$1.36</td></tr>
<tr><td><a href="http://www.digikey.com/product-detail/en/stackpole-electronics-inc/CF14JT2M00/CF14JT2M00CT-ND/1830429">2M Resistor</a></td><td>$0.04</td></tr>
<tr><td><a href="http://www.digikey.com/product-detail/en/yageo/CFR-25JB-52-2M7/2.7MQBK-ND/687">2.7M Resistor</a></td><td>$0.06</td></tr>
<tr><td><a href="http://www.digikey.com/product-detail/en/jst-sales-america-inc/B5B-XH-A(LF)(SN)/455-2270-ND/1530483">Motor Plug Socket</a></td><td>$0.21</td></tr>
<tr><td><a href="http://www.digikey.com/product-detail/en/te-connectivity-alcoswitch-switches/2-1825910-7/450-1642-ND/1632528">Tactile Button</a></td><td>$0.10</td></tr>
<tr><td><a href="http://www.seeedstudio.com/service/index.php?r=pcb">PCB</a></td><td>$0.99</td></tr>
<tr><td><a href="https://lowpowerlab.com/shop/moteino-r4">Moteino</a></td><td>$22.95</td></tr>
<tr><td><a href="http://www.digikey.com/product-detail/en/BH14AAW/BH14AAW-ND/66735">AA Holder</a></td><td>$1.24</td></tr>
<tr><td><a href="http://www.amazon.com/Energizer-Ultimate-Lithium-Batteries-Original/dp/B01C4PP8FK/ref=sr_1_6?ie=UTF8&qid=1459464495&sr=8-6&keywords=energizer+l91">Energizer Ultimate AA (4)</a></td><td>$6.00</td></tr>
<tr><td><strong>Total</strong></td><td>$37.95</td></tr>
</table>
<p>In order to talk to the devices from a host computer, you’ll also need a Moteino USB ($27). To program the non-USB Moteinos you’ll need a FTDI adapter. LowPowerLabs sells one of those for $15, but you may be able to find a better deal elsewhere.</p>
MP4 improvements in Firefox for Android2014-10-23T14:00:00+00:00http://snorp.net/2014/10/23/mediacodec-in-fennec<p>One of the things that has always been a bit of a struggle in Firefox for Android is getting reliable video decoding for H264. For a couple of years, we’ve been shipping an implementation that went through <a href="http://bluishcoder.co.nz/2012/06/02/h264-aac-mp3-support-for-b2g.html">great heroics</a> in order to use libstagefright directly. While it does work fine in many cases, we consistently get reports of videos <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1005436">not playing</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1026423">not displayed correctly</a>, or just <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=845729">crashing</a>.</p>
<p>In Android 4.1, Google added the <a href="http://developer.android.com/reference/android/media/MediaCodec.html"><code class="language-plaintext highlighter-rouge">MediaCodec</code></a> class to the SDK. This provides a blessed interface to the underlying libstagefright API, so presumably it will be far more reliable. This summer, my intern Martin McDonough worked on adding a decoding backend in Firefox for Android that uses this class. I expected him to be able to get something that sort of worked by the end of the internship, but he totally shocked me by having video on the screen inside of two weeks. This included some time spent modifying our JNI bindings generator to work against the Android SDK. You can view Martin’s intern presentation on <a href="https://air.mozilla.org/intern-presentations-19/">Air Mozilla</a>.</p>
<p>While the API for MediaCodec seems relatively straightforward, there are several details you need to get right or the whole thing falls apart. Martin constantly ran into problems where it would throw IllegalStateException for seemingly no valid reason. There was no error message or other explanation in the exception. This made development pretty frustrating, but he fought through it. It looks like Google has improved both the documentation and the error handling in the API as of Lollipop, so that’s good to see.</p>
<p>As Martin wrapped up his internship he was working on handling the video frames as output by the decoder. Ideally you would get some kind of sane YUV variation, but this often is not the case. Qualcomm devices frequently output in their own proprietary format, <code class="language-plaintext highlighter-rouge">OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka</code>. You’ll notice this doesn’t even appear in the list of possibilities according to <a href="http://developer.android.com/reference/android/media/MediaCodecInfo.CodecCapabilities.html"><code class="language-plaintext highlighter-rouge">MediaCodecInfo.CodecCapabilities</code></a>. It does, however, appear in the OMX <a href="http://androidxref.com/4.4.4_r1/xref/frameworks/native/include/media/openmax/OMX_IVCommon.h#162">headers</a>, along with a handful of other proprietary formats. Great, so Android has this mostly-nice class to decode video, but you can’t do anything with the output? Yeah. Kinda. It turns out we actually have code to handle this format for B2G, because we run on QC hardware there, so this specific case had a possible solution. But maybe there is a better way?</p>
<p>I know from my work on supporting Flash on Android that we use a <a href="http://developer.android.com/reference/android/graphics/SurfaceTexture.html"><code class="language-plaintext highlighter-rouge">SurfaceTexture</code></a> there to render video layers from the plugin. It worked really well most of the time. We can use that with <code class="language-plaintext highlighter-rouge">MediaCodec</code> too. With this output path we don’t ever see the raw data; it goes straight into the <code class="language-plaintext highlighter-rouge">Surface</code> attached to the <code class="language-plaintext highlighter-rouge">SurfaceTexture</code>. You can then composite it with OpenGL and the crazy format conversions are done by the GPU. Pretty nice! I think handling all the different YUV conversions would’ve been a huge source of pain, so I was happy to eliminate that entire class of bugs. I imagine the GPU conversions are probably faster, too.</p>
<p>There is one problem with this. Sometimes we need to do something with the video other than composite it onto the screen with OpenGL. One common usage is to draw the video into a canvas (either 2D or WebGL). Now we have a problem, because the only way to get stuff out of the <code class="language-plaintext highlighter-rouge">SurfaceTexture</code> (and the attached <code class="language-plaintext highlighter-rouge">Surface</code>) is to draw it with OpenGL. Initially, my plan to handle this was to ask the compositor to draw this single <code class="language-plaintext highlighter-rouge">SurfaceTexture</code> separately into a temporary FBO, read it back, and give me those bits. It worked, but boy was it ugly. There has to be a better way, right? There is, but it’s still not great. <code class="language-plaintext highlighter-rouge">SurfaceTexture</code>, as of Jelly Bean, allows you to attach and detach a GL context. Once attached, the <code class="language-plaintext highlighter-rouge">updateTexImage()</code> call updates whatever texture you attached. Detaching frees that texture, and makes the <code class="language-plaintext highlighter-rouge">SurfaceTexture</code> able to be attached to another texture (or GL context). My idea was to only attach the compositor to the <code class="language-plaintext highlighter-rouge">SurfaceTexture</code> while it was drawing it, and detach after. This would leave the <code class="language-plaintext highlighter-rouge">SurfaceTexture</code> able to be consumed by another GL context/texture. For doing the readback, we just attach to a context created specifically for this purpose on the main thread, blit the texture to a FBO, read the pixels, detach. Performance is not great, as <code class="language-plaintext highlighter-rouge">glReadPixels()</code> always seems to be slow on mobile GPUs, but it works. And it doesn’t involve IPC to the compositor. I had to resort to a little hack to make some of this work well, though. Right now there is no way to create a <code class="language-plaintext highlighter-rouge">SurfaceTexture</code> in an initially detached state. You must always pass a texture in the constructor, so I pass <code class="language-plaintext highlighter-rouge">0</code> and then immediately call <code class="language-plaintext highlighter-rouge">detachFromGLContext()</code>. Pretty crappy, but it should be relatively safe. I filed an <a href="https://code.google.com/p/android/issues/detail?id=34412">Android bug</a> to request a no-arg constructor for SurfaceTexture more than two years ago, but nothing has happened. I’m not sure why Google even allows people to file stuff, honestly.</p>
<p><strong>tl;dr:</strong> Video decoding should be much better in Firefox for Android as of today’s <a href="https://nightly.mozilla.org">Nightly</a> if you are on Jelly Bean or higher. Please give it a try, especially if you’ve had problems in the past. Also, <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox%20for%20Android">file bugs</a> if you have issues!</p>
Flash on Android 4.4 KitKat2013-12-11T12:30:00+00:00http://snorp.net/2013/12/11/flash-on-kitkat<p>There has been some some talk recently about the Flash situation on Android 4.4. While it’s no secret that Adobe discontinued support for Flash on Android <a href="http://blogs.adobe.com/conversations/2011/11/flash-focus.html">a while back</a>, there are still a lot of folks using it on a daily basis. The Firefox for Android team consistently gets feedback about it, so it didn’t take long to find out that things were amiss on KitKat.</p>
<p>I looked into the problem a few weeks ago in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=935676">bug 935676</a>, and found that some reserved functions were <a href="http://androidxref.com/4.4_r1/xref/system/core/libpixelflinger/codeflinger/tinyutils/VectorImpl.h#103">made virtual</a>, breaking binary compatibility. I initially wanted to find a workaround that involved injecting the missing symbols, but that seems to be a bit of a dead end. I ended up making things work by unpacking the Flash APK with <a href="http://code.google.com/p/android-apktool/">apktool</a>, and modifying libflashplayer.so with a hex editor to replace the references to the missing symbols with something else. The functions in question aren’t actually being called, so changing them to anything that exists works (I think I used <code class="language-plaintext highlighter-rouge">pipe</code>). It was necessary to pad each field with null characters to keep the size of the symbol table unchanged. After that I just repacked with apktool, installed, and everything seemed to work.</p>
<p>There is apparently an APK floating around that makes Flash work in other browsers on KitKat, but not Firefox. The above solution should allow someone to make an APK that works everywhere, so give it a shot if you are so inclined. I am not going to publish my own APK because of reasons.</p>
Using direct textures on Android2011-12-16T12:30:00+00:00http://snorp.net/2011/12/16/android-direct-texture<p>I’ve been working at <a href="http://mozilla.com">Mozilla</a> on <a href="http://www.mozilla.org/en-US/mobile/">Firefox Mobile</a> for a few months now. One of the goals of the new <a href="http://lucasr.org/2011/11/15/native-ui-for-firefox-on-android/">native UI</a> is
to have liquid smooth scrolling and panning at all times. Unsurprisingly, we do this by drawing into an OpenGL texture and moving it around on the screen. This is pretty fast until you run out of content
in the texture and need to update it. Gecko runs in a separate thread and can draw to a buffer there without blocking us, but uploading that data into the texture is where problems arise. Right now
we use just one very large texture (usually 2048x2048), and glTexSubImage2D can take anywhere from 25ms to 60ms. Given that our target is 60fps, we have about 16ms to draw a frame. This means we’re guaranteed to miss at least one frame every time we upload, but likely more than that. What we need is a
way of uploading texture data asynchronously (and preferably quicker). This is where direct textures can help.</p>
<p>If you haven’t read Dianne Hackborn’s recent posts on the Android graphics stack, you’re missing out (<a href="https://plus.google.com/105051985738280261832/posts/2FXDCz8x93s">part 1</a>, <a href="https://plus.google.com/u/0/105051985738280261832/posts/XAZ4CeVP6DC">part 2</a>). The window compositing system she describes (called SurfaceFlinger) is particularly interesting because it is close to the problem we have in Firefox. One of the pieces Android uses to to draw windows is the gralloc module. As you may have guessed, gralloc is short for ‘graphics alloc’. You can see the short and simple API for it <a href="https://github.com/android/platform_hardware_libhardware/blob/master/include/hardware/gralloc.h">here</a>. Android has a wrapper class that encapsulates access to this called <code class="language-plaintext highlighter-rouge">GraphicBuffer</code>. It has an even nicer API, found <a href="https://github.com/android/platform_frameworks_base/blob/master/include/ui/GraphicBuffer.h">here</a>. Usage is very straightforward. Simply create the <code class="language-plaintext highlighter-rouge">GraphicBuffer</code> with whatever size and pixel format you need, lock it, write your bits, and unlock. One of the major wins here is that you can use the <code class="language-plaintext highlighter-rouge">GraphicBuffer</code> instance from any thread. So not only does this reduce a copy of your image, but it also means you can upload it without blocking the rendering loop!</p>
<p>To get it on the screen using OpenGL, you can create an <code class="language-plaintext highlighter-rouge">EGLImageKHR</code> from the <code class="language-plaintext highlighter-rouge">GraphicBuffer</code> and bind it to a texture:</p>
<figure class="highlight"><pre><code class="language-c--" data-lang="c++"><span class="cp">#define EGL_NATIVE_BUFFER_ANDROID 0x3140
#define EGL_IMAGE_PRESERVED_KHR 0x30D2
</span>
<span class="n">GraphicBuffer</span><span class="o">*</span> <span class="n">buffer</span> <span class="o">=</span> <span class="k">new</span> <span class="nf">GraphicBuffer</span><span class="p">(</span><span class="mi">1024</span><span class="p">,</span> <span class="mi">1024</span><span class="p">,</span> <span class="n">PIXEL_FORMAT_RGB_565</span><span class="p">,</span>
<span class="n">GraphicBuffer</span><span class="o">::</span><span class="n">USAGE_SW_WRITE_OFTEN</span> <span class="o">|</span>
<span class="n">GraphicBuffer</span><span class="o">::</span><span class="n">USAGE_HW_TEXTURE</span><span class="p">);</span>
<span class="kt">unsigned</span> <span class="kt">char</span><span class="o">*</span> <span class="n">bits</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
<span class="n">buffer</span><span class="o">-></span><span class="n">lock</span><span class="p">(</span><span class="n">GraphicBuffer</span><span class="o">::</span><span class="n">USAGE_SW_WRITE_OFTEN</span><span class="p">,</span> <span class="p">(</span><span class="kt">void</span><span class="o">**</span><span class="p">)</span><span class="o">&</span><span class="n">bits</span><span class="p">);</span>
<span class="c1">// Write bitmap data into 'bits' here</span>
<span class="n">buffer</span><span class="o">-></span><span class="n">unlock</span><span class="p">();</span>
<span class="c1">// Create the EGLImageKHR from the native buffer</span>
<span class="n">EGLint</span> <span class="n">eglImgAttrs</span><span class="p">[]</span> <span class="o">=</span> <span class="p">{</span> <span class="n">EGL_IMAGE_PRESERVED_KHR</span><span class="p">,</span> <span class="n">EGL_TRUE</span><span class="p">,</span> <span class="n">EGL_NONE</span><span class="p">,</span> <span class="n">EGL_NONE</span> <span class="p">};</span>
<span class="n">EGLImageKHR</span> <span class="n">img</span> <span class="o">=</span> <span class="n">eglCreateImageKHR</span><span class="p">(</span><span class="n">eglGetDisplay</span><span class="p">(</span><span class="n">EGL_DEFAULT_DISPLAY</span><span class="p">),</span> <span class="n">EGL_NO_CONTEXT</span><span class="p">,</span>
<span class="n">EGL_NATIVE_BUFFER_ANDROID</span><span class="p">,</span>
<span class="p">(</span><span class="n">EGLClientBuffer</span><span class="p">)</span><span class="n">buffer</span><span class="o">-></span><span class="n">getNativeBuffer</span><span class="p">(),</span>
<span class="n">eglImgAttrs</span><span class="p">);</span>
<span class="c1">// Create GL texture, bind to GL_TEXTURE_2D, etc.</span>
<span class="c1">// Attach the EGLImage to whatever texture is bound to GL_TEXTURE_2D</span>
<span class="n">glEGLImageTargetTexture2DOES</span><span class="p">(</span><span class="n">GL_TEXTURE_2D</span><span class="p">,</span> <span class="n">img</span><span class="p">);</span></code></pre></figure>
<p>The resulting texture can be used as a regular one, with one caveat. Whenever you manipulate pixel data, the changes will be reflected on the screen immediately after <code class="language-plaintext highlighter-rouge">unlock</code>. You probably want
to double buffer in order to avoid problems here.</p>
<p>If you’ve ever used the Android NDK, it won’t be surprising that <code class="language-plaintext highlighter-rouge">GraphicBuffer</code> (or anything similar) doesn’t exist there. In order to use any of this in your app you’ll need to resort to
<code class="language-plaintext highlighter-rouge">dlopen</code> hacks. It’s a pretty depressing situation. Google uses this all over the OS, but doesn’t seem to think that apps need a high performance API. But wait, it gets worse. Even after jumping
through these hoops, some gralloc drivers don’t allow regular apps to play ball. So far, testing indicates that this is the case on Adreno and Mali GPUs. Thankfully, PowerVR and Tegra allow it, which covers a fair number of devices.</p>
<p>With any luck, I’ll land the patches that use this in Firefox Mobile today. The result should be a much smoother panning and zooming experience on devices where gralloc is allowed to work.</p>
Android = Linux-on-anything-with-a-screen2011-02-10T15:24:05+00:00http://snorp.net/2011/02/10/android-is-linux<p>Here we are in 2011. Obviously, the year of the Linux desktop, right? You’d hope so. It’s not like there hasn’t been plenty of time to make it happen. <a href="http://redhat.com">Red Hat</a>, <a href="http://canonical.com">Canonical</a>, <a href="http://novell.com">Novell</a>, and many other companies and individuals have been working hard on it for quite a while. And yet, very few inroads have been made. Sure, <a href="http://dell.com/ubuntu">Dell</a> has been selling Ubuntu on some netbooks with limited success, but that is hardly a victory.</p>
<p>In 2007, <a href="http://google.com">Google</a> unveiled the Linux-based Android smartphone platform. The first phone wasn’t released until a year later in 2008, along with the Android source code. Now, in Q4 2010, Android is the <a href="http://uk.reuters.com/article/2011/01/31/oukin-uk-google-nokia-idUKTRE70U1YT20110131">best-selling smartphone operating system in the world</a>, surpassing Symbian, BlackBerry, Windows Mobile, and yes even iOS. In 2 years, it went from zero to total domination, with no signs of slowing down. Not everyone agrees that Android is the best smartphone OS (<em>ahem</em>, <a href="http://daringfireball.net">Gruber</a>), but it’s impossible to say that it isn’t a success. And it uses Linux. In fact, I believe you could say that Android is the most successful and widely deployed Linux product ever. So why haven’t we standardized on it for other non-smartphone uses? It would require some work, but at least there is <em>some</em> chance it could work out.</p>
<p>Initially I was going to try to call out all of the infuriating things about developing on desktop Linux, but I got tired. All of that has been said elsewhere by people smarter than me. The main reason I’m really behind Android is that it dramatically reduces the amount of fragmentation. It’s just not possible for a hardware vendor like AMD or NVIDIA to support the multitude of distros out there. If you told those guys they only had to support a couple versions of Android, they would be able to deliver much higher quality of support.</p>
<p>The Eclipse IDE, Dalvik VM, and Android application framework are all great assets and deliver a far superior development experience over standard Linux. You get that for free. If Java isn’t your bag, though, you can always use the <a href="http://developer.android.com/sdk/ndk/index.html">Native Development Kit</a> to write in C, C++, <a href="http://monodroid.net/">C#</a>, or whatever you want. I would love to see Clutter on Android, for instance. And Node.js/gjs. Or any number of other great projects.</p>
<p>It’s already possible to run Android on a PC via the <a href="http://www.android-x86.org/">Android-x86</a> project. They’ve added basic mouse support, as well as hardware accelerated OpenGL ES2 via Mesa (on Intel hardware). I have a Cr-48 running it here, and it works amazingly well. Even wifi works.</p>
Yeah, I'm a Rails fanboy now2009-04-27T00:00:00+00:00http://snorp.net/2009/04/27/yeah,-i'm-a-rails-fanboy-now<p>A lot of my day job now involves working with <a href="http://rubyonrails.org">Ruby on Rails</a>. At first I wasn’t sure how much I would like Rails or ruby, given that I had been doing a lot of C#/C/whatever desktop work before. Not surprisingly, though, I’ve become quite addicted. The test-driven nature of development is a welcome change — most desktop apps I worked on didn’t even have tests. The Rails community has done a great job of banging automated testing into people’s heads. Almost every tutorial, book, or random blog post I’ve seen emphasizes the importance of good automated tests. Hopefully it has helped decrease the instances of ‘snorpage’, but perhaps my co-workers would disagree :)</p>
<p>Anyway, I love Rails so much that I’ve converted my blog from <a href="http://www.wordpress.org">Wordpress</a> to <a href="http://www.enkiblog.com">Enki</a>. Enki is more of a create-your-own-blog construction kit than a turn-key solution like Wordpress. That was one of the main reasons I chose it over <a href="http://typosphere.org">Typo</a> or <a href="http://mephistoblog.com">Mephisto</a> — I wanted to be able to easily hack on it.</p>
<p>I wrote a quick and dirty script to help me import the Wordpress posts into Enki. Any fellow Enki hackers can grab it <a href="http://github.com/snorp/enki/raw/0a3a9692f6ccc849a42a1c979641bcb7b386d6ba/import-wp">here</a>.</p>
Fun with Studio2009-02-13T00:00:00+00:00http://snorp.net/2009/02/13/fun-with-studio<p>I’ve been working on a new project now for a while called <a href="http://susestudio.com"><span class="caps">SUSE</span> Studio</a>. Essentially it is a web interface which allows you to build your own customized version of <span class="caps">SUSE</span>. You can select packages, do some configuration, and even add your own branding.</p>
<p>I created a media center appliance to see how hard it would be. The appliance is based on <a href="http://www.opensuse.org">openSUSE</a> 11.1, and boots right into the excellent <a href="http://elisa.fluendo.com/">Elisa Media Center</a>. You can download the image <a href="http://snorp.net.nyud.net/files/Elisa_Media_Center-0.0.1.oem.tar.gz">here</a>. The tarball contains one file, which you can ‘dd’ to a <span class="caps">USB</span> storage device. We’re working on writing a small application to make this part easier.</p>
<p>On the first boot it will do some one-time setup like repartition and resize the disk, install <a href="http://www.nvidia.com"><span class="caps">NVIDIA</span></a> or <a href="http://ati.amd.com"><span class="caps">ATI</span></a> video drivers (if appropriate), and setup X.</p>
<p><a href="http://snorp.net.nyud.net/files/Elisa_Media_Center-0.0.1.oem.tar.gz"><img src="http://susestudio.com/images/built-with-web.png"></a><br />
<a href="http://snorp.net.nyud.net/files/Elisa_Media_Center-0.0.1.oem.tar.gz">Download Elisa Media Center Appliance</a></p>
New Job2008-12-15T00:00:00+00:00http://snorp.net/2008/12/15/new-job<p>For quite a while I had been working on <a href="http://www.novell.com/products/thinclient/"><span class="caps">SUSE</span> Linux Enterprise Thin Client</a>, which is Novell’s diskful Thin Client solution. It had a lot of challenging aspects, not least of which was fitting a minimal <span class="caps">GNOME</span> environment + apps onto 128MB of flash. That work is mostly wrapping up, though, and I’ve moved to a new team.</p>
<p>At the beginning of the month I started working on <a href="http://susestudio.com"><span class="caps">SUSE</span> Studio</a>, which is a web-based appliance builder for <span class="caps">SUSE</span>. I wanted to get out of my comfort zone a little, and it hasn’t disappointed there. We’re using RoR, which I am really enjoying so far. Ruby was ridiculously easy to pick up. Rails confused me at first with the amount of magic that it does behind-the-scenes, but there is a lot of information on how that works so getting up to speed wasn’t too bad. I bought <a href="http://pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition"><em>Agile Web Development with Rails</em></a> which has been very helpful as well.</p>
Slashdot looking for open proxies?2008-08-25T00:00:00+00:00http://snorp.net/2008/08/25/slashdot-looking-for-open-proxies?<p>I saw the following somewhat-strange line in my web server logs today:</p>
<p><code>
216.34.181.45 - - [25/Aug/2008:10:23:51 -0500] "GET http://tech.slashdot.org/ok.txt HTTP/1.0" 401 523 "-" "libwww-perl/5.812"
</code></p>
<p>That web server is running on the IP of my home router. The requesting IP appears to be a Slashdot machine. My guess is that they are trying to find out who accesses their site through an open proxy. But why? Is there another reason they might send a request like that? Do they ban proxies if they find one?</p>
<p><strong><span class="caps">UPDATE</span>:</strong> Apparently, they do in fact ban open proxies (according to <a href="http://linux.slashdot.org/faq/com-mod.shtml">this</a>). Supposedly a lot of comment spam comes from them. I wonder if it would help blogs at all to do something similar?</p>
novell-bugzilla.user.js updates2008-08-25T00:00:00+00:00http://snorp.net/2008/08/25/novell-bugzilla.user.js-updates<p>I’ve updated the Novell Bugzilla Autologin greasemonkey script again. Just click <a href="http://www.snorp.net/files/novell-bugzilla.user.js">here</a> to upgrade your current version or install it for the first time. You of course need greasemonkey installed.</p>
<p>I’ve removed the “go to login page” step. It now just logs in directly via <span class="caps">AJAX</span> and refreshes your current page. It has also been rewritten to use jQuery (and jQuery.blockUI) which cleaned things up a bit and gives a nicer “please wait” message :)</p>
More Mango2008-07-11T00:00:00+00:00http://snorp.net/2008/07/11/more-mango<p>A while back I <a href="http://www.snorp.net/log/2008/02/26/mango-lassi/">posted</a> about <a href="http://0pointer.de/blog/projects/mango-lassi.html">Mango Lassi</a> and how awesome it was compared to synergy. I still think it is awesome, but every now and then something would freak it out and cause the association between machines to drop. I’ve fixed at least one cause of that problem now and published it in a git repo here: <a href="http://www.snorp.net/git/mango-lassi.git/">http://www.snorp.net/git/mango-lassi.git/</a></p>
<p><span class="caps">BTW</span>, thanks for all of the great comments on the <a href="http://www.snorp.net/log/2008/07/04/nas-for-home/"><span class="caps">NAS</span></a> situation. I’m looking at several of the options mentioned there along with a couple others. I think I’ve ruled out rolling my own, though, as I don’t want yet another linux box to maintain.</p>
NAS for Home2008-07-04T00:00:00+00:00http://snorp.net/2008/07/04/nas-for-home<p>Dear Lazyweb,</p>
<p>Does anyone have suggestions on what to use for centralized storage at home? I have a lot of music/photos here piling up and would like to put them on some energy-efficient <span class="caps">NAS</span> box. Ideally it would have some sort of of built-in backup solution as well. A lot of the <span class="caps">NAS</span>-in-a-box solutions seem to have <span class="caps">RAID</span> 1, but that really only helps for HA. I am more concerned with never ever losing this stuff than having it available 24/7.</p>
2 + 12008-06-12T00:00:00+00:00http://snorp.net/2008/06/12/2-+-1<div align="center"><a href="http://www.flickr.com/photos/snorp/2545725182/"><img src="http://www.snorp.net/images/alex-thumb.jpg" alt="Alexander, 15 minutes old" /></a><br />
<i>Alexander James, 30 minutes old</i></div>
Out-weaseling Firefox2008-05-21T00:00:00+00:00http://snorp.net/2008/05/21/out-weaseling-firefox<p>There has been a lot of buzz lately about the Firefox 3 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=421482">fsync issue</a>. The work I’m doing these days has me doing a lot of long-running disk-bound activies, so this one hurts me pretty bad. Firefox would stop responding for 30-40s at a time while my job was running in the background, which I think is pretty unacceptable. I have worked around it in the (hopefully) short-term with a LD_PRELOAD hack. I’ve posted it <a href="http://www.snorp.net/files/ff3-sucks.tar.bz2">here</a> in case anyone else finds it useful. Just unpack, cd to the directory, and ‘make && make install’ (not as root). A word of warning, though: if it breaks you get to keep both pieces. Kudos to <a href="http://www.abock.org/">Aaron</a> for adding the ‘make install’ bits to the Makefile :)</p>
Some things do change...2008-05-16T00:00:00+00:00http://snorp.net/2008/05/16/some-things-do-change/some-things-do-change...<p>Ever since zypper came along I hated it. It was slow, buggy, and used a ton of resources.</p>
<p>Well, I installed <a href="http://en.opensuse.org/Development_Version">openSUSE 11.0b3</a> yesterday and the zypper/libzypp there is <strong>massively</strong> improved. I don’t think it’s possible to overstate just how much of an improvement it really is. Normally I just make rcd/rug work on whatever new release comes along and continue using that. Zypper and PackageKit are so good now that I’m giving that up. So congratulations to the zypp team — I know they caught a lot of flack in the past, but I think this release will finally put a lot of that to rest.</p>
Mango Lassi2008-02-26T00:00:00+00:00http://snorp.net/2008/02/26/mango-lassi<p>The other day I looked into switching away from synergy to <a href="http://0pointer.de/blog/projects/mango-lassi.html">Mango Lassi</a>. I only use it between two machines, so I figured my use case was simple enough that it should work at this stage. I was not disappointed. I was getting some very strange behavior with synergy and vmware, and Mango Lassi has none of that. Plus it gives an <a href="http://www.snorp.net/files/screenshots/mango-lassi-osd.png"><span class="caps">OSD</span></a> telling you which machine the mouse/keyboard are being used on, which is a nice perk.</p>
<p>Anyway, I was so happy with it that I made packages for openSUSE. You can get it from my build service <a href="http://download.opensuse.org/repositories/home:/snorp/openSUSE_10.3/">repository</a>.</p>
Application Usage Monitoring2008-01-18T00:00:00+00:00http://snorp.net/2008/01/18/application-usage-monitoring<p>Recently I’ve had a couple of ideas for a project (like I need another one of those). The goal would be to make a library which allows applications to easily track their user’s interactions and log them in a central location. Project maintainers/contributors could then look at the collected data to help them make decisions about what they should be spending time on. For instance, a media player might log what types of files are played or if it was synced to an iPod-like device.</p>
<p>As far as technical hurdles go, doing something like this is pretty easy. The main questions I have are around the kind of policies that should exist for such a thing. Obviously, participation should be opt-in. But should it be on a per-app basis, or per-user? Or both? If it is per-app, you would likely get bombarded with a prompt on the first run of every app that uses this system. If that is a small number it might be ok, but hopefully that wouldn’t be the case :). On the other hand, maybe you don’t want certain sensitive applications (email client?) ever sending info.</p>
<p>Then there’s the question of who should have access to the data. My feeling is that the user should always be able to see everything that he has sent. But should he also be able to see everyone else’s individual data? What about the aggregated data? That leads me to the next question. Should there be a cookie that identifies a single user throughout all applications? Or even a cookie per-application? I think having a cookie across all applications would definitely make the data more useful, but I’m not sure if people would be opposed to such a thing. Of course, this leads to yet another question. How do we keep personal information out? I don’t believe there is a technical solution to keep things like this from making its way in. Developers will need to be very careful, and that kind of bothers me. If all of the data on the server is available to everyone then maybe public scrutiny will help keep things in check, but who knows.</p>
<p>These are just a few of the questions I have come up with, and I am sure others can think of plenty more. Is it possible to come up with something that benefits the development community without infringing on user’s privacy? Even so, would users participate? Comments are open.</p>
openSUSE LiveCD Installer2007-07-11T00:00:00+00:00http://snorp.net/2007/07/11/opensuse-livecd-installer<p>I was out of town for part of hack week, so I didn’t participate fully like my colleagues. I did get a couple evenings to mess around with something, though. I wrote an installer for <a href="http://kiwi.berlios.de/"><span class="caps">KIWI</span></a>-generated LiveCDs.</p>
<div align="center">
<p><img src="http://www.snorp.net/files/screenshots/suse-live-installer/page1.png" alt="First page of live installer" /><br/><br />
<i>First page of live installer</i></div></p>
<p>It’s still in early development and has lots of hacks to make things work, but it does manage to install a working system onto your machine. The installation itself is really pretty simple. The LiveCD data is in a compressed squashfs image on the CD, and the installer just copies all of that to the disk. Then it just writes out an fstab, installs grub, etc.</p>
<p>As usual, however, the devil is in the details. Things like sound and video card detection are normally done by the YaST installer, so other methods must be used. It might be possible to invoke the relevant bits of YaST from the LiveCD installer to achieve the same effect, but I haven’t looked into it yet. I have everything checked into svn (svn://snorp.net/trunk/opensuse-live), so if you want to try and build a CD everything is there. I will also upload an <span class="caps">ISO</span> soonish.</p>
<p><b>Update:</b> You can download a full <span class="caps">ISO</span> based on openSUSE Alpha 5 <a href="http://www.snorp.net/files/livecd/opensuse-live-system.i686-1.3.2.iso">here</a>.</p>
RPM Transaction Enhancements2007-05-04T00:00:00+00:00http://snorp.net/2007/05/04/rpm-transaction-enhancements<p>One of the reasons I wanted to revive rcd was so that I could use it to play with some package management ideas I’ve been kicking around. One of these ideas is a way to reliably rollback changes made during an <span class="caps">RPM</span> transaction. That is, actually make <span class="caps">RPM</span> transactions transactional.</p>
<p>Recently, a colleague introduced me to <a href="http://sourceware.org/dm/">device-mapper</a>, a kernel system used for block device redirection. There is a really cool thing that uses it called dm-snapshot, which allows you to redirect all writes to a device into a separate device. What I would like to do is use this to store all of the changes made during an rpm transaction. I think it would just need a bit of patching so that it only stores the changes made by the rcd/rpm process (and children). If anything goes wrong, you can just trash the snapshot data and things are exactly as they were in the beginning. Of course, if it succeeds without problelms, you need to merge the snapshot changes into the original device. This is where things get fuzzy, as dm-snapshot does not have this ability. However, Mark McLoughlin has created a set of <a href="http://fedoraproject.org/wiki/StatelessLinuxCachedClient">patches</a> that add this feature as part of the Stateless Linux project. Sadly, the patches do not appear to be a high priority for the kernel guys right now, so I guess this approach will have to be put on hold.</p>
<p>In any case, a system for performing this rollback stuff would be ridiculously useful in general — not just for package management. It looks like it will be a little more than I can do by myself in a weekend hack, though, so hopefully someone else will carry the torch? :)</p>
Return of The Carpet2007-04-26T00:00:00+00:00http://snorp.net/2007/04/26/return-of-the-carpet<p>Red Carpet, that is. Yes, <a href="http://en.wikipedia.org/wiki/Red_Carpet">that</a> Red Carpet. I’ve taken some time lately to give some love to our old friends rcd and rug (the original rug, not the rewritten one). First I got everything building on a modern distro (openSUSE 10.2). This took more effort than I thought it would, but eventually things worked well. After that, I set out to make rcd more usable with yum services. Here is a list of the main changes:<br />
<ul><br />
<li><b>Add native yum support</b>. I removed the ‘helix’ service support and replaced it with something that understands yum metadata. This means you can just do ‘rug sa repo_url name’ for any yum service. I used the excellent yum parser that Tambet wrote for the libredcarpet backend of zmd to accomplish this.</li><br />
<li><b>Remove channel subscriptions</b>. Since yum services don’t provide multiple channels, subscriptions aren’t really necessary. They have been replaced with the ability to disable a service.</li><br />
<li><b>Add sleep ability</b>. One of the main complaints against rcd was that it used too much memory. This was mostly because over time the heap would become fragmented. The ‘sleep’ feature avoids this by running the main rcd daemon only when necessary. After a period of inactivity (3 minutes by default), the main daemon replaces itself with a smaller daemon. This smaller daemon simply waits until a request comes in and launches the full daemon to respond.</li></p>
</ul>
<p>With the above changes, rcd is once again a joy to use. I would like to get the <span class="caps">GUI</span> working again, but there is some kind of threading problem preventing it from running. I would also like to add ftp support, but that is not a top priority.</p>
<p>I know there are probably <span class="caps">SUSE</span> users reading this asking “Ok, sounds fine, but is it <b>fast</b>?”. While it may not be the fastest thing out there, I think you will be surprised at the results (I was). Here are a few simple benchmarks from normal usage scenarios:</p>
<p>First, lets look at the number of services I currently have added:<br />
<blockquote><pre><br />
% rug sl</p>
<ol>
<li>| Service <span class="caps">URI</span> | Name <br />
<del>—+</del>———————————————————————————+——————<br />
1 | http://go-mono.com/download-stable/suse-102-i586?r… | mono <br />
2 | http://software.opensuse.org/download/<span class="caps">FATE</span>/openSUS… | fate <br />
3 | http://ftp.suse.com/pub/suse/update/10.2/?name=upd… | updates <br />
4 | http://download.opensuse.org/distribution/10.2/rep… | suse-nonoss<br />
5 | http://download.opensuse.org/distribution/10.2/rep… | suse-oss <br />
6 | http://packman.inode.at/suse/10.2?remote_only=1;na… | packman <br />
7 | http://software.opensuse.org/download/home:/cybero… | cyborg <br />
8 | http://software.opensuse.org/download/X11:/<span class="caps">XGL</span>/ope… | xgl <br />
9 | http://software.opensuse.org/download/Beagle/openS… | beagle <br />
10 | http://software.opensuse.org/download/games:/actio… | games <br />
11 | http://software.opensuse.org/download/Virtualizati… | virt <br />
12 | http://software.opensuse.org/download/home:/kraxel… | kvm<br />
</pre></blockquote><br />
So 12 services, and the package count is almost 21000. 22500 if you also count the ones in the rpm database. How long does it take to load all of those?</li>
</ol>
<p>Cold filesystem cache, daemon is sleeping:<br />
<blockquote><pre>% time rug ping > /dev/null<br />
rug ping 0.17s user 0.02s system 1% cpu 13.735 total</p>
<p></blockquote></pre><br />
14 seconds to respond isn’t terrible, considering the cold filesystem cache. Now that the kernel has it cached, though, how long does it take?</p>
<p>Warm filesystem cache, daemon is sleeping:<br />
<blockquote<pre>% time rug ping >/dev/null<br />
rug ping > /dev/null 0.14s user 0.02s system 3% cpu 4.465 total<br />
</pre></blockquote><br />
4.5, not bad. Definitely in the tolerable range, I’d say. Of course after the daemon is awake, commands respond immediately. That is maybe the only good thing about rcd being a daemon — subsequent commands are instant, where other tools (yum, smart, etc) have to load the package metadata again. Memory usage after rcd wakes up is about 28MB, so that is not too bad either (it is a little over 1MB when sleeping).</p>
<p>Packages for recent <span class="caps">SUSE</span> distros are available in the <a href="http://software.opensuse.org/download/home:/snorp/">build service</a>. It has had a hard time keeping up recently, though, so you may run into a problem or two with rug. Sources can be found in gnome svn in the <a href="http://svn.gnome.org/viewcvs/rcd/branches/yummy/">yummy branch</a> of the various modules (rcd, rug, libredcarpet).</p>
<p>Also, yes, I am sick sick person.</p>
Banshee and AWN2007-02-28T00:00:00+00:00http://snorp.net/2007/02/28/banshee-and-awn<p>I just tried out <a href="http://code.google.com/p/avant-window-navigator/">Avant Window Navigator</a> for the first time, after seeing Neil’s latest blog <a href="http://njpatel.blogspot.com/2007/02/to-quote-destinys-child.html">entry</a>. It’s pretty slick, and worth trying if you have xgl/aiglx/whatever. I also wrote a Banshee plugin which makes the current track cover appear in the dock.<br />
<div align="center"><img src="http://www.snorp.net/files/screenshots/awn-banshee.png"><br/><i>Banshee playing “Stadium Arcadium”</i></div></p>
<p>You can get the plugin <a href="http://www.snorp.net/files/banshee-awn-plugin.tar.gz">here</a>. Just drop the dll into ~/.gnome2/banshee/plugins.</p>
Monster Truck Lloyd2007-02-10T00:00:00+00:00http://snorp.net/2007/02/10/monster-truck-lloyd<p><a href="http://www.flickr.com/photos/snorp/385705610/" title="photo sharing"><img src="http://farm1.static.flickr.com/138/385705610_4d9771fef4_m.jpg" alt="" style="border: solid 2px #000000;" /></a><br />
<br /><br />
<span style="font-size: 0.9em; margin-top: 0px;"><a href="http://www.flickr.com/photos/snorp/385705610/">Monster Truck Lloyd</a> <br />
<br /><br />
Originally uploaded by <a href="http://www.flickr.com/people/snorp/">snorp</a>.<br />
</span><br />
<br clear="all" /><br />
<p>Saw this while getting some food this morning. Only in Kansas…</p></p>
Thoughts on Sincerity2007-02-07T00:00:00+00:00http://snorp.net/2007/02/07/thoughts-on-sincerity<p>Hi <a href="http://en.wikipedia.org/wiki/Steve_Jobs">Steve</a>,</p>
<p>Earlier today I read your <a href="http://www.apple.com/hotnews/thoughtsonmusic/">“Thoughts on Music”</a> post. Afterwards, my initial reaction was “That’s great! You get ’em Steve!”. It’s no secret that <span class="caps">DRM</span> is broken by design, but it’s nice to see one of the biggest users of it say so. However, I was quickly reminded by a colleague that Apple hardly seems interested in the “everything works with everything” utopia you describe. One specific example is the iTunes music sharing feature. Soon after it was released, some smart people figured out how it worked and developed software to be compatible with it. This let people access their iTunes-shared music from devices or operating systems that didn’t have iTunes. Soon after, Apple implemented a mechanism which prevented non-iTunes clients from doing this. Why? It wasn’t because of the record companies. The music purchased on the iTunes Music Store was still protected by FairPlay, so they had no reason to complain. The only conceivable reason you’d have for doing this is to force consumers into vendor lock in. Well, it didn’t work. Some more smart people defeated your mechanism and once again people were playing their iTunes-shared music using whatever software they liked best (be it iTunes or otherwise). But that didn’t stop Apple from re-implementing a similar protection scheme <b>again</b> in iTunes 7. This time you even <a href="http://www.rokulabs.com/forums/viewtopic.php?t=9026">knifed</a> some business partners in the process. This kind of behavior isn’t at all congruent with what you’re saying in your post. Have you changed your mind now? Will the next iTunes release remove this restriction? If your “Thoughts on Music” was sincere, I’d expect so.</p>
more vmx-manager stuff2006-12-18T00:00:00+00:00http://snorp.net/2006/12/18/more-vmx-manager-stuff<p>I’m still working hard on <a href="http://www.snorp.net/log/2006/12/08/im-in-ur-virtual-machines-managing-them/">vmx-manager</a>, and I think it’s coming along pretty well. I spent a good chunk of last week writing my own code for creating VMware Virtual Disks. The <span class="caps">VMDK</span> <a href="http://www.vmware.com/interfaces/vmdk.html">specification</a> is pretty straightforward, but implementing it proved to be more tedious than I expected (“the devil is in the details”). The end result seems to work pretty well, so now vmx-manager can create disks without relying on qemu or vmware-vdiskmanager. Soon I might try to add a couple more features in this area, such as the ability to grow an existing disk (which in theory should be easy — just add extents). I’ve made a <a href="http://www.snorp.net/files/screencasts/vmx-manager-demo.ogg">screencast</a> of the app as I put it through its paces, and you can find up-to-date screenshots <a href="http://www.snorp.net/files/screenshots/vmx-manager">here</a>.</p>
<p>When I was writing the flat extent support (used for pre-allocated disks), I wanted to do something different than just writing a bunch of zeros out to a file (which is slow). It seemed to me that it should be possible to ask the filesystem to quickly give me a file of a specific size. I didn’t care what was in it, so it should be able to just find a bunch of unused sectors (or whatever) and mark them as mine, right? I was able to find no such feature in ext3 or Linux in general, and I guess the reason is probably due to security concerns. You obviously don’t want to give people a way to read deleted data. It would be nice, though, if the fs could mark the data in such a way that it would be zeros until you write to it. Maybe that’s just too expensive, I don’t know. Anyway, if anyone knows how I could accomplish such a thing, please let me know.</p>
I'm in ur virtual machines, managing them2006-12-09T00:00:00+00:00http://snorp.net/2006/12/09/i'm-in-ur-virtual-machines,-managing-them<p>I’ve been working on an application recently which lets you create, configure, and run VMware virtual machines (it just forks out to VMware Player for the running part). It’s nearing usefulness now, so I thought I’d post some screenshots and stuff.</p>
<div align="center">
<p><img src="http://www.snorp.net/files/screenshots/vmx-manager-main.png"/><br />
<i>The main window</i></p>
<p><img src="http://www.snorp.net/files/screenshots/vmx-manager-config.png"/><br />
<i>The configuration window</i></p>
</div>
<p>You need either qemu or vmware-vdiskmanager installed in order to create new hard disks, and it probably fails pretty badly currently if you don’t. If I get a chance, I may write my own stuff to create the hard disks (the format is a public spec, woo!). Anyway, you can get it from the <code>vmx-manager</code> module in gnome <span class="caps">CVS</span>.</p>
Flaming Skulls!2006-10-20T00:00:00+00:00http://snorp.net/2006/10/20/flaming-skulls!<p><a href="http://www.flickr.com/photos/snorp/274601957/" title="photo sharing"><img src="http://static.flickr.com/63/274601957_ba31928c9e_m.jpg" alt="" style="border: solid 2px #000000;" /></a><br />
<br /><br />
<p>I did a jack-o-lantern this week for the first time in probably 15 years. I am happy with the result.</p></p>
Tangerine with Cocoa2006-10-13T00:00:00+00:00http://snorp.net/2006/10/13/tangerine-with-cocoa<p>Last weekend I spent some time porting <a href="http://www.snorp.net/log/tangerine">Tangerine</a> to Mac OS X. The actual music sharing daemon worked fine with no changes, except I had to modify the path to the xml database for the iTunes plugin. With that out of the way, I set out to create a native configuration <span class="caps">GUI</span> for it. I had never used Obj-C or Cocoa or anything like that before, so I thought it would be fun to learn all of that stuff. The Apple developer tools are pretty nice, and it wasn’t long before I had a semi-working preference pane. The last couple of nights I polished it up to the point where I think it’s releasable, so here we go.</p>
<div align="center"><img src="http://www.snorp.net/files/screenshots/tangerine-preferences-mac.png"/><br/><i>Tangerine’s Preference Pane on Mac OS X</i></div>
<p>I’m not an expert on Apple interfaces, so I’d welcome input from someone who has experience with this. It looks ok to me, though. The “automatic” selection uses Spotlight to find all of your music and share it. This is the same thing it does on Linux and Windows with Beagle and Google Desktop, respectively.</p>
<p><strong><a href="http://www.snorp.net/files/tangerine/tangerine-0.3.0.dmg">Download Now!</a></strong></p>
<p>My next post will be about my experience porting this app to Windows and Mac OS X, what they have that’s better/worse than Linux, etc.</p>
<p><b>Update:</b> To use Tangerine you’ll need the Mono framework installed. Get it <a href="http://www.mono-project.com/Downloads">here</a>.</p>
Maybe they're not as bad as I thought2006-09-18T00:00:00+00:00http://snorp.net/2006/09/18/maybe-they're-not-as-bad-as-i-thought<p>The <a href="http://www.snorp.net/log/2006/09/14/why-i-hate-apple-still/">iPod situation</a> is now mostly fixed. I was able to figure out how iTunes gets the iPod serial number (and other info) with the help of a <span class="caps">USB</span> monitoring tool and Matt Dharm (the usb-storage guy). After that, <a href="http://www.abock.org">Aaron</a> used the metric ton of SysInfo samples you guys sent in to get a serial number → model number mapping.</p>
<p>To get info about (recent) device, iTunes requests an xml <a href="http://www.snorp.net/ipod.xml">document</a> from it over <span class="caps">USB</span>. I saw this in the <span class="caps">USB</span> trace I had, but the data was nowhere on the disk exposed by <span class="caps">USB</span> Mass Storage. Puzzling. Not really knowing much about <span class="caps">USB</span> MC, I enlisted the help of Matt, who obviously knows a lot more. He informed me that it was requesting the data using a special <span class="caps">SCSI</span> <span class="caps">INQUIRY</span> command, and I could probably use <a href="http://sg.torque.net/sg/sg_io.html">SG_IO</a> to get it out. I ran <code>sg_inq</code> on my iPod with the right parameters, and out came the xml. Success! After that I wrote a hal method for libipoddevice to pull the info out (since you need to be root), and the rest was just parsing the xml and doing the serial → model mapping.</p>
<p>Even though it was a fairly painful couple of days trying to fix this, I’m pretty happy with the result. The xml from the device includes some really tasty stuff, including information on the image formats for cover art and photos. We are using this data now in ipod-sharp instead of the static table we had before, which will be really great for maintenance. New iPods with previously unknown image formats will Just Work! There is also data on the video formats, which I will soon use to add video support to <a href="http://www.snorp.net/log/dopi">Dopi</a></p>
Why I hate Apple (still)2006-09-14T00:00:00+00:00http://snorp.net/2006/09/14/why-i-hate-apple-still<p>For a while now I’ve been getting reports of people having a strange problem using their iPod with <a href="http://www.banshee-project.org">Banshee</a> or <a href="http://www.snorp.net/log/dopi">Dopi</a>. There is a file on the device that we use to get things like the model number, which tells us what sort of iPod we’re dealing with. That file has been removed or set to 0 length on newer firmwares, and I was just yesterday able to reproduce it after upgrading and restoring my iPod Video. Since it wasn’t stored on the filesystem anymore, I started poking around the firmware parition, and found several copies of it there. Unfortunately it seems to appear in different places depending on the device, so I haven’t yet found a reliable way of getting that stuff out. We’ll eventually figure it out, though, and at that point things should start working again. I have a totally gross solution which runs <code>strings(1)</code> on the partition, but I don’t think it will come to that :)</p>
Up to 10 times more sharing or more!2006-09-12T00:00:00+00:00http://snorp.net/2006/09/12/up-to-10-times-more-sharing-or-more!<p>I released a new version of <a href="http://www.snorp.net/log/tangerine">Tangerine</a> tonight. The biggest change is that you can now share the songs stored in your music player’s collection. So if you add some songs to your library in <a href="http://www.banshee-project.org">Banshee</a>, they will automatically be shared by Tangerine. Rhythmbox and Amarok are also supported.<br />
<div align="center"><img src="http://www.snorp.net/files/screenshots/tangerine-providers.png"/><br/><br />
<i>The config dialog allows you to select a music player</i></div></p>
Tangerine + Muine2006-09-12T00:00:00+00:00http://snorp.net/2006/09/12/tangerine-+-muine<p>Hot on the heels of the last release comes <a href="http://www.snorp.net/log/tangerine">Tangerine</a> 0.2.8, with the only major change being a new plugin for <a href="http://muine-player.org/wiki/Main_Page">Muine</a>.</p>
iTunes 72006-09-12T00:00:00+00:00http://snorp.net/2006/09/12/itunes-7<p><a href="http://www.apple.com/itunes/">iTunes 7</a> was announced today, which means more <a href="http://www.snorp.net/log/ipod-sharp">ipod-sharp</a> breakage. It doesn’t look like anything really changed except the database version, so I’ve bumped that and released 0.6.1. The music sharing stuff in iTunes hasn’t changed for ages, so <a href="http://www.snorp.net/log/tangerine">Tangerine</a> still works fine.</p>
YUMier Than Bacardi2006-09-06T00:00:00+00:00http://snorp.net/2006/09/06/yumier-than-bacardi<p>When I was in Boston last week, my cohorts and I whipped up something wonderful: a rug interface for yum. We call it ‘rum’, and it has nearly all the features of the original (used with rcd) rug. “zOMG!!! <span class="caps">WHY</span>?!!11”, you ask? Well, after using and working on rug/rcd/zmd for the past 3 or 4 years, we simply can’t use anything else. It’s a sickness. So what’s in it for you, the average yum user?<br />
<ul><br />
<li>The world-renowned, award-winning, ‘search’ command</li><br />
<li><span class="dquo">“</span>tilde” support (rum in foo bar ~baz), which allows you to add and remove packages at the same time</li><br />
<li>Easily add/remove/enable/disable repositories. Never edit a config file again!</li><br />
<li>Persistent package locks (known as ‘excludes’ in the yum world)</li><br />
<li>New commands are easily added. Just drop a python file in the appropriate place, and it is automatically added to the rum interface.</li></p>
</ul>
<p>You can download RPMs for <a href="http://www.snorp.net/files/rum/fc5-i386">FC5-i386</a>, <a href="http://www.snorp.net/files/rum/fc6-i386">FC6-i386</a>, and <a href="http://www.snorp.net/files/rum/suse-i586">SuSE 10.x-i586</a>. For you adventurous build-from-source types, a tarball is <a href="http://www.snorp.net/files/rum/rum-1.0.0.tar.gz">here</a>. Enjoy!</p>
blowing up Pluto2006-08-25T00:00:00+00:00http://snorp.net/2006/08/25/blowing-up-pluto<p><a href="http://hpj.blognaco.com/2006/08/24/blow-up-pluto/">hpj</a>: I am in favor of this idea. We could even use a few of the <a href="http://en.wikipedia.org/wiki/Nuclear_weapons_and_the_United_States">~10k nuclear weapons</a>!</p>
muthafuckin' tangerines on a muthafuckin' plane^Wwindows2006-08-20T00:00:00+00:00http://snorp.net/2006/08/20/muthafuckin'-tangerines-on-a-muthafuckin'-plane^wwindows<p>This weekend I spent some more time making <a href="http://www.snorp.net/log/tangerine">Tangerine</a> work on Windows. I built Bonjour from scratch so I could distribute the binaries, and polished up the Tangerine installer as well. I gave it a good deal of testing, but there might be something I missed still. The Windows version includes a plugin for finding songs automatically through <a href="http://desktop.google.com/index.html">Google Desktop</a>.</p>
<div align="center">
<p><img src="http://www.snorp.net/files/screenshots/tangerine-prefs-win32-new.png"/><br /><br />
<i>The preferences window for Tangerine (under Windows)</i></div><br /></p>
<p><strong><a href="http://www.snorp.net/files/tangerine/TangerineSetup-0.2.6.3.exe">Download Now!</a></strong></p>
<p><strong>Update:</strong> I just put up a new version which fixes a bunch of issues I found. It also adds the missing features to the config window and hopefully makes it look a little nicer. Updated screenshot above.</p>
<p><strong>Update 2:</strong> Another updated version up with more bug fixes. I don’t have a bug tracker set up, but if you guys hit any problems just email me (<a href="mailto:snorp@snorp.net">snorp@snorp.net</a>).</p>
Fruity2006-07-21T00:00:00+00:00http://snorp.net/2006/07/21/fruity<p>I released <a href="http://www.snorp.net/log/tangerine">Tangerine</a> 0.2.6, which includes some minor bug fixes. Also now that <a href="http://www.novell.com/products/desktop/"><span class="caps">SLED</span> 10</a> is out, I can do a screencast showing Tangerine running under it. So I did, and you can see it <a href="http://www.snorp.net/files/screencasts/tangerine.ogg">here</a>.</p>
<p><b>Update:</b> It was suggested to me that a screenshot might be needed too, so here you go :)<br />
<div align="center"><br />
<img src="http://www.snorp.net/files/screenshots/tangerine-properties.png"/><br /><br />
<i>The control panel for Tangerine</i></div></p>
photos and cover art in ipod-sharp2006-06-29T00:00:00+00:00http://snorp.net/2006/06/29/photos-and-cover-art-in-ipod-sharp<p>I’ve been working on <a href="http://www.snorp.net/log/ipod-sharp">ipod-sharp</a> recently to add cover art and photo support. It’s nearly complete now, and I can add and remove art and photos on my video iPod. Another person has tried it successfully on his Nano, so all that’s left to test is a regular iPod Photo. There might be some issues to work out yet with the camera adaptor too. A big thanks to <a href="http://primates.ximian.com/~lewing/blog/">Larry</a> who did the initial work and provided the scary image conversion code :)</p>
<p>I’ve added cover art support to <a href="http://www.snorp.net/log/dopi">Dopi</a> in svn. It uses Cover.jpg (or cover.jpg or folder.png, etc) if one is present next to the files when you add them. I suppose one of these days I should add a crappy “track properties” window so you can view/change the cover art there.</p>
<p>I’ve also created a <a href="http://www.snorp.net/files/banshee_ipod_cover_art_v2.diff">patch</a> for <a href="http://www.banshee-project.org">Banshee</a> to make it use the new ipod-sharp and sync cover art. To try it you’ll need ipod-sharp and libipoddevice from svn/cvs.</p>
<p>Oh I also converted ipod-sharp to use gmcs. Hooray for generics.</p>
Apple Sucks2006-06-18T00:00:00+00:00http://snorp.net/2006/06/18/apple-sucks<p>A couple weeks ago, I spent some time making <a href="http://www.snorp.net/log/tangerine">Tangerine</a> work on Windows. After I got it working, I started looking into creating an installer and all that stuff. <a href="http://www.abock.org">Aaron</a> recommended <a href="http://www.jrsoftware.org/isinfo.php">Inno Setup</a>, so I got that and went to work. I pretty quickly had a basic package working, but it needed to handle installing the various dependencies still.</p>
<p>Microsoft has a neat little bootstrapping utility which you can include in your installer to make sure various components (such as .<span class="caps">NET</span> 2.0) are installed, so that bit was easy.</p>
<p>The other dependency it needed to install was Apple’s <a href="http://www.apple.com/macosx/features/bonjour/">Bonjour</a>, so I start poking around on Apple’s site to see if they have some kind of cute installer for it. I discover that they do, but they require you to get some kind of <a href="http://developer.apple.com/softwarelicensing/agreements/pdf/bonjour4wincore.pdf">license</a> from Apple. Ok, how bad could it be? I start to look through it. There is the normal legal crap, blah blah blah, then I hit the real requirements. I am not a lawyer, but my understanding is that I would need to do the following things in order to distribute my Bonjour-using application (not just their installer):</p>
<ul>
<li>Provide Apple with 2 samples of the application, on physical media, delivered to them 4 weeks before each release.</li>
<li>Provide quarterly reports on the number of Bonjour copies distributed in the previous quarter.</li>
<li>Use the Bonjour logo on any manuals included with the application</li>
</ul>
<p>I am sure a more astute reader could probably find more nastiness. No wonder there aren’t any Windows apps out there using Bonjour. If Apple really doesn’t want people to use it, why don’t they just come out and say it? We need to port <a href="http://www.avahi.org">Avahi</a> to Windows and crush them into obsolescence.</p>
<p><b>Update:</b> <a href="http://www.tieguy.org">Luis</a> has added that they can also change the software or license at any point without warning and force me to use that. Nasty.</p>
allegedly very tasty2006-05-05T00:00:00+00:00http://snorp.net/2006/05/05/allegedly-very-tasty<p>Last night I did a lot of work on <a href="http://www.snorp.net/log/tangerine">Tangerine</a>, a standalone <span class="caps">DAAP</span> server of mine. I think it’s probably good enough for general use now, as I added a little control panel for enabling/configuring it.</p>
<div align="center"><img src="http://www.snorp.net/files/screenshots/tangerine-properties.png"/></div>
<p>The ‘automatic’ mode uses <a href="http://www.beagle-project.org">Beagle</a>, which was really fun to do. Aside from some kind of metadata extraction issue, it works really well.</p>
sleep at last2006-05-02T00:00:00+00:00http://snorp.net/2006/05/02/sleep-at-last<p>For the first time ever, I was able to successfully suspend my laptop (<span class="caps">IBM</span> T40p) to <span class="caps">RAM</span>. For the longest time I was having a problem where the disk would go completely insane upon resuming. Very annoying.</p>
<p>I found out recently that it was probably due to the <span class="caps">BIOS</span> re-enabling <span class="caps">HPA</span> (Host Protected Area) when coming out of sleep. Unfortunately, there didn’t appear to be any kind of workaround for it, but tonight I discovered that you can use the <a href="http://www.hitachigst.com/hdd/support/download.htm#FeatureTool">Hitachi Feature Tool</a> to disable it for good. It totally fixed my problem. Woo.</p>
daap-sharp on Windows2006-04-08T00:00:00+00:00http://snorp.net/2006/04/08/daap-sharp-on-windows<p>I rolled a new release of <a href="http://www.snorp.net/log/?page_id=61">daap-sharp</a> tonight, with the main new benefit being that it now runs on Windows. After <a href="http://www.abock.org/">Aaron</a> added Bonjour bindings, there wasn’t much stopping this from happening, so I fixed up the last couple of bugs. I also made an ultra-cheesy test <a href="http://www.snorp.net/files/DAAPBrowser.exe">application</a> using Windows Forms:<br /><br />
<div style="text-align:center"><img src="http://www.snorp.net/files/screenshots/daap-browser.jpg"/></div></p>
GNOME: 1, Slashdot: 02006-03-28T00:00:00+00:00http://snorp.net/2006/03/28/gnome:-1,-slashdot:-0<p>Recently, <a href="http://www.perkypants.org/blog">Jeff</a> asked the <a href="http://www.slashdot.org">Slashdot</a> guys to stop using GNOME’s 700 year old <a href="http://images.slashdot.org/topics/topicgnome.gif">logo</a> in favor of the <a href="http://live.gnome.org/LogoGuidelines">new one</a>. They have not changed it. I have a <a href="http://www.snorp.net/slashdot-gnome.user.js">solution</a>.</p>
Firefox Rules2005-12-01T00:00:00+00:00http://snorp.net/2005/12/01/firefox-rules<p>So Firefox 1.5 is out, sporting a new canvas tag. Hopefully we will see all kinds of sweet innovative stuff using it. Here is my contribution:</p>
<p><iframe src="http://www.snorp.net/canvas-test.html" frameborder="0" width="300" height="50" scrolling="no"></iframe></p>
<p><b>Update</b>: I also changed my little bugzilla greasemonkey script to work with Firefox 1.5. You can get that at the usual place, <a href="http://www.snorp.net/files/novell-bugzilla.user.js">here</a>.</p>
vengeance is mine2005-10-14T00:00:00+00:00http://snorp.net/2005/10/14/vengeance-is-mine<p>If you have ever used the Novell <a href="http://bugzilla.novell.com">Bugzilla</a> you no doubt noticed that it likes to log you out after a short while. Usually for me it’s at least two additional clicks after clicking on a bug link before I can actually see the bug. It annoyed me enough tonight that I wrote a greasemonkey script to ease the pain. You can get it <a href="http://www.snorp.net/files/novell-bugzilla.user.js">here</a>. Just log in once manually after loading the script so it can store your user/pass, and it should do it for you after that.</p>
<p><b>Update:</b> I just put a newer version of the script up. It will log you in even if the page you’re trying to view is not locked out to anonymous users. Also added some lame feedback so you know what it’s doing.</p>
avahi-sharp2005-09-08T00:00:00+00:00http://snorp.net/2005/09/08/avahi-sharp<p>I spent some time last night hacking up some Avahi bindings for C#, using the DBus <span class="caps">API</span>. The wrapper is <a href="http://www.snorp.net/Server.cs">here</a>, and a little test app is <a href="http://www.snorp.net/AvahiTest.cs">here</a>. The test app registers a ‘foobar’ service, and then lists all services in the default (I think?) domain. Obligatory ‘screenshot’ below. Unfortunately, I ran into some dbus-sharp bugs while doing this. You’ll need <a href="http://www.snorp.net/dbus_sharp_avahi_fixes_v1.diff">this</a> patch to dbus-sharp in order to use it. You can also grab a dll <a href="http://www.snorp.net/dbus-sharp.dll">here</a>.</p>
<p><code>
snorp@sackbut misc/avahi/avahi-sharp % mono test.exe
Service 'Living Room' at DVR-8477.local:80
Txt: TSN=54000000000000
Resolved DVR-8477.local to 192.168.1.105
Reverse resolved 192.168.1.105 to DVR-8477.local
Service 'Now Playing on Living Room' at DVR-8477.local:443
Txt: TSN=54000000000000
Resolved DVR-8477.local to 192.168.1.105
Reverse resolved 192.168.1.105 to DVR-8477.local
Service 'Now Playing on Living Room' at DVR-8477.local:443
Txt: TSN=54000000000000
Resolved DVR-8477.local to 192.168.1.105
Reverse resolved 192.168.1.105 to DVR-8477.local
Service 'iTunes_Ctrl_60AA03D0FEE58A7F' at homer.local:3689
Txt: DbId=10000
Resolved homer.local to 192.168.1.103
Reverse resolved 192.168.1.103 to homer.local
Service 'snorp’s Music' at homer.local:3689
Txt: Password=false
Resolved homer.local to 192.168.1.103
Reverse resolved 192.168.1.103 to homer.local
Service 'Remote Terminal on sackbut' at sackbut.local:22
Resolved sackbut.local to 192.168.1.101
Reverse resolved 192.168.1.101 to sackbut.local
Service 'sackbut [00:0d:60:36:95:4d]' at sackbut.local:9
Resolved sackbut.local to 192.168.1.101
Reverse resolved 192.168.1.101 to sackbut.local
Service 'foobar' at sackbut.local:8080
Txt:
Resolved sackbut.local to 192.168.1.101
Reverse resolved 192.168.1.101 to sackbut.local
</code></p>
Grumpy, Sneezy, Sleepy, ...2005-06-21T00:00:00+00:00http://snorp.net/2005/06/21/grumpy,-sneezy,-sleepy,-/grumpy,-sneezy,-sleepy,-...<p>Several people have asked for a little standalone app that uses ipod-sharp, since not everyone uses Muine and keeps all of their music on their PC. So this weekend I wrote Dopi.<br />
<div align="middle"><br />
<img src="http://www.snorp.net/files/screenshots/dopi.png"/><br /><br />
<i>Dopi, after adding the album ‘Mezmerize’</i></p>
</div>
<p>You simply DnD folders/files onto the song list there to add stuff. The delete key deletes (surprise!). To try it, you’ll need the latest ipod-sharp. It has been moved into Mono’s <a href="http://svn.myrealbox.com"><span class="caps">SVN</span></a>, so if you have the stuff from baz, that is out-of-date. Also, ipod-sharp depends on libipoddevice in <span class="caps">GNOME</span> <span class="caps">CVS</span>, so you’ll need that too. And lastly, Dopi itself is in my baz archive, <a href="http://www.snorp.net/bazaar/dopi--dev--0.0">here</a>.</p>
More muine burning2005-06-10T00:00:00+00:00http://snorp.net/2005/06/10/more-muine-burning<p>I worked some more on the muine-burn plugin. It should be far more stable now. So if you tried the last one and had problems, give this a shot. Tarballs are <a href="http://www.snorp.net/files/packages/libnautilus-burn-sharp-0.1.tar.gz">here</a> and <a href="http://www.snorp.net/files/packages/muine-burn-0.0.4.tar.gz">here</a>.</p>
CD burning for Muine2005-06-08T00:00:00+00:00http://snorp.net/2005/06/08/cd-burning-for-muine<p>I fixed up <a href="http://www.gnome.org/~fherrera/blog">fer</a>‘s muine-burn plugin recently. It now works with the latest muine, and recent libnautilus-burn. Surprisingly little was needed to get it into working condition again. <span class="caps">AFAIK</span>, the plugin wasn’t checked into version control anywhere, so I committed the changes into my baz <a href="http://www.snorp.net/bazaar">archive</a>. I also put up a tarball <a href="http://www.snorp.net/files/packages/muine-burn-0.0.2.tar.gz">here</a>.</p>
Utah2005-06-03T00:00:00+00:00http://snorp.net/2005/06/03/utah<p>I was in Utah last week for work. It was good to see people, put some faces with names, etc. Working from home has benefits, but it’s nice to do things in person sometimes. I was in the <a href="http://developer.novell.com/devres/slab/">SuperLab</a>, testing <a href="http://www.novell.com/products/zenworks">ZENworks</a> (of course). It was pretty cool, and I’m quite sure I’ve never seen more computers in a single place before.<br />
<div align="center"><a href="http://www.snorp.net/files/photos/superlab.jpg"><img src="http://www.snorp.net/files/photos/superlab-thumb.jpg" style="border:none"/></a><br />
<br><i>Novell SuperLab: one of a bajillion rows</i></div><br />
Haven’t done any hacking on Muine lately. Partially, because it won’t even run for me currently (some kind of lame gtk-sharp exception). One thing I was thinking of doing, is resurrecting fer’s CD burning plugin. I don’t usually take the iPod with me in the car on short trips, and I’ve wanted an easy way to burn stuff on a CD to use there.</p>
<p>Enjoyed reading <span class="caps">GUADEC</span>-goers blogs. Maybe one of these days I’ll be able to go. If there’s another Boston summit, I should definitely try to make it to that.</p>
Nokia/Maemo2005-05-25T00:00:00+00:00http://snorp.net/2005/05/25/nokiamaemo<p>Like <a href="http://planet.gnome.org">everyone</a> else, I am <i>totally</i> stoked about the new <a href="http://www.nokia.com/nokia/0,,75023,00.html">Nokia 770</a>. The hardware looks sweet, but the fact that it is coupled with a sane open development platform just makes it ridiculously attractive. Especially considering it’s based on a platform we all know relatively well :)</p>
<p>The screenshots look really great. One thing I wonder about, though, is how well the included apps deal with an unreliable network. I mean, if I stroll out of range from my wifi, will all kinds of errors and stuff show up, or will it deal gracefully? The <a href="http://www.maemo.org">development site</a> mentions some things about getting events like “low battery” over dbus. Hopefully “network is down” is the same kind of thing, and apps can just go into offline mode or whatever.</p>
<p>It would be really fabulous to get mono running on this thing. I wonder if something like a “compact edition” of it would be needed.</p>
more muine/iPod2005-05-20T00:00:00+00:00http://snorp.net/2005/05/20/more-muineipod<p>Martin Palma has gone to the work of packaging muine-ipod and ipod-sharp for Ubuntu hoary. You can get them <a href="http://www.antichaos.net/files/">here</a>.</p>
<p>Work progresses. I’ve still been getting used to <a href="http://bazaar.canonical.com">bazaar</a>, which I’m using for version control. Overall I really like it. I want to start learning some of the more advanced features, though.</p>
<p>The latest muine-ipod <a href="http://www.snorp.net/files/bazaar-snaps/muine-ipod-snapshot.tar.gz">snapshot</a> has support for optionally syncing only the current playlist to the iPod. I’ve been told this works pretty well for shuffle users. I still think we need some way to individually mark songs in the library for syncing (similar to what iTunes does I think?). iPod Mini users would especially benefit from this, since they probably can’t sync their entire library — and composing a playlist would just be a bit ridiculous (6gb of music in a playlist!).</p>
<p>Also, I sent a patch to muine-list this week that added a plugin for inotify support. It simply monitors the directories you’ve added to muine, and if something gets added/removed/changed it takes the appropriate action on the song library. I’ve wanted this kind of behavior in a music player for <b>years</b>, and now that inotify has come along it’s finally possible. I’ve been using rml’s inotify <a href="http://primates.ximian.com/~rml/kernel-rml/suse-93-i586/">kernel</a> for SuSE 9.3, and it’s working quite well. You can get the patch + plugin <a href="http://www.snorp.net/files/muine-inotify.tar.gz">here</a>.</p>
iPod syncing for Muine2005-05-11T00:00:00+00:00http://snorp.net/2005/05/11/ipod-syncing-for-muine<p>A while ago I started working on a plugin for Muine that syncs your library with an iPod. I worked on it a bit more lately and it seems to be coming along, so I’m trying to get people to test it. You need <a href="http://www.snorp.net/files/packages/ipod-sharp-0.0.3.tar.gz">this</a> and <a href="http://www.snorp.net/files/packages/muine-ipod-0.0.3.tar.gz">this</a>, to start.</p>
<p>Right now there is no <span class="caps">HAL</span> integration, as I’m having an incredibly difficult time figuring out the correct way to integrate with that stuff. What it will do, however, is mount/umount your iPod assuming it is setup correctly in fstab (correct device, ‘user’ option, etc). It defaults to /media/ipod for the mount point, but that is configurable through a gconf key (/apps/muine/ipod/mount_path).</p>
<p>I’ve been using it for the last few days with no serious problems. I do suggest you backup your iTunesDB file before giving it a shot, though, as corrupting that is the worst thing that can happen. You can find it at /media/ipod/iPod_Control/iTunes/iTunesDB. If you encounter problems, feel free to <a href="mailto:snorp@snorp.net">email me</a>.</p>
<p><b>Update:</b> You will need muine 0.8.3 or greater to use this plugin, as previous versions lack the necessary interface.</p>
<p><b>Another Update:</b> I’ve checked ipod-sharp and muine-ipod into arch at <a href="http://www.snorp.net/bazaar">http://www.snorp.net/bazaar</a>.</p>
rcd for fedora core 32005-03-30T00:00:00+00:00http://snorp.net/2005/03/30/rcd-for-fedora-core-3<p>A volunteer has packaged rcd/rug for fc3, and I have put the rpms <a href="http://www.snorp.net/files/packages/rcd-fc3/">here</a>. Enjoy.</p>
Hula Hula Hula2005-02-15T00:00:00+00:00http://snorp.net/2005/02/15/hula-hula-hula<p><a href="http://www.hula-project.org"><img border="0" src="http://linuxart.com/log/files/hula-logo-littlewaves.png"/></a></p>
<p>I didn’t want to be left out.</p>
ipod-sharp2005-01-25T00:00:00+00:00http://snorp.net/2005/01/25/ipod-sharp<p>I just committed ipod-sharp to <span class="caps">CVS</span>, a library for manipulating iTunesDBs. It’s written entirely in C#. Currently you can use it to add/remove songs, and manipulate any existing playlists. There is also a cheesy little tool that lists the songs/playlists in a given iTunesDB.</p>
<p>I mostly wrote it to add iPod syncing to Muine. I have a patch which does this, but it needs a lot of work still. I haven’t yet totally worked out how the <span class="caps">HAL</span> integration will happen, for instance. For starters, I patched gnome-volume-manager to mount the appropriate partition when it sees an iPod and invoke ‘muine —ipod-sync <mount_point>’. But that doesn’t cover unmounting. Also apparently you need to ‘eject’ the device for the iPod to put up the happy “ok to disconnect” screen.</p>
<p>You can get the code from the ‘ipod-sharp’ module in gnome <span class="caps">CVS</span>, or <a href="http://www.snorp.net/files/packages/ipod-sharp-0.0.1.tar.gz">here</a>. Hopefully I’ll get the Muine patch in a useable state soon.</mount_point></p>
zmd2004-09-02T00:00:00+00:00http://snorp.net/2004/09/02/zmd<p>In the last few months, Tambet and I have been working on the successor to rcd called zmd (ZENworks Management Daemon). It is written in C#. I did not choose the name.</p>
<p>Things are going pretty well, and a lot of stuff is starting to work. We have an xmlrpc compatability layer for implementing the old rcd methods (just enough to make the old <span class="caps">GUI</span> work), and a remoting layer for the new clients. The xmlrpc stuff is pretty much complete, and you can use the old rug/red-carpet apps with it to install packages, etc. Also we’re writing a new ‘rug’ in C#. You can see it in action <a href="http://www.snorp.net/files/screenshots/rug-transacting.png">here</a>. In that shot, it’s installing some stuff from the ‘funktronics’ aptrpm repository.</p>
<p>I don’t have any code to share yet, but hopefully that will happen soon.</p>
hmmm2004-08-31T00:00:00+00:00http://snorp.net/2004/08/31/hmmm<p>A month or two ago I was watching a (bogus) documentary about M. Night Shyamalan. This was the first time I’d ever seen what he looked like, and immediately, I realized something. I think maybe my boss is making blockbuster movies on the side. Here is my proof:</p>
<div align="center">
<p><img src="http://www.snorp.net/files/photos/shyamalan-small.png" alt="shymalan"/> <img src="http://www.snorp.net/files/photos/naresh-small.jpg" alt="not shyamalan"/></p>
</div>
<p>Tell me those are different people. Seriously.</p>
wedding photos2004-08-27T00:00:00+00:00http://snorp.net/2004/08/27/wedding-photos<p>So, we finally got some wedding photos back. I think this one is nice :)</p>
<div align="center"><a href="http://www.snorp.net/files/photos/bridal10.jpg"><img src="http://www.snorp.net/files/photos/bridal10-small.jpg" alt="amy in wedding gown"/></a></div>
whoa, deja vu2004-08-22T00:00:00+00:00http://snorp.net/2004/08/22/whoa,-deja-vu<p>I really wish they would stop <a href="http://insight.zdnet.co.uk/software/linuxunix/0,39020472,39164119-2,00.htm">saying </a> things like this:</p>
<p><i>Red Hat’s software technology is 100 percent open source. If you want to put us in a box, then the most obvious box is that Red Hat only, exclusively sells and supports open source — GPL’d software.</p>
<p>…</p>
<p>Quite frankly, if tomorrow we decided to release a closed piece of software, literally half the engineers would quit on principal that day.</i></p>
<p>That’s Paul Salazar, European Marketing Director for Red Hat. Can someone please mail me an <span class="caps">URL</span> to the source code for Satellite?</p>
THIS JUST IN2004-08-10T00:00:00+00:00http://snorp.net/2004/08/10/this-just-in<p>I hate Todd.</p>
whirl2il2004-07-20T00:00:00+00:00http://snorp.net/2004/07/20/whirl2il<p>Kris “released” his whir2il code today. I haven’t tried it yet, but the results he has had with it so far are very promising. PInvoke is great and all, but being able to actually compile existing C/C++ code to bytecode is just so freaking sweet.</p>
new place2004-07-16T00:00:00+00:00http://snorp.net/2004/07/16/new-place<p>I moved today. It went pretty well. Amy and her parents helped out a lot so that was good. Rupert is back online so that made people happy.</p>
<p>A guy (Darren Brierton) has been mailing me lately about rcd on fc2, and eventually he told me he wanted to get <a href="http://www.redhat.com/archives/fedora-list/2004-July/msg03182.html">rcd into fedora</a>. He totally rules.</p>
<p>9 days till wedding :)</p>
<p><b>Update:</b> I committed mono bindings for libredcarpet to <span class="caps">CVS</span> this week. Ph33r.</p>
GUADEC2004-06-29T00:00:00+00:00http://snorp.net/2004/06/29/guadec<p>I totally wanted to go to <span class="caps">GUADEC</span>, but couldn’t for various reasons (time and money, mostly). It was almost like being there, though, when I was able to make fun of <a href="http://primates.ximian.com/~dave/log">Dave</a> during his talk by proxy. Seriously. I think next year each room should have a projector showing a moderated <span class="caps">IRC</span> channel where people can ask questions.</p>
<p>Work has been going well lately, finally getting back into the groove after being pulled in different directions for a while.</p>
<p>Wedding plans are progressing, invitations went out last week. Really starting to hit home now :)</p>
You want me to give you what?!2004-06-18T00:00:00+00:00http://snorp.net/2004/06/18/you-want-me-to-give-you-what?!<p>There is this intersection near my apartment where quite frequently there will be someone begging for money or something. Usually they have a cardboard sign with stuff like “hungry need food” on it. Now, I’m all in favor of helping people if they really need it, but today there was a guy <span class="caps">LISTENING</span> TO A <span class="caps">GOD</span> <span class="caps">DAMN</span> <span class="caps">IPOD</span> <span class="caps">WHILE</span> <span class="caps">BEGGING</span> <span class="caps">FOR</span> <span class="caps">CASH</span>. Sigh.</p>
<p>So, I committed my yum support to rcd today. It rules. Snapshot builds will have them soon (tomorrow morning I guess). You can simply subscribe to the ‘rcd-snaps’ channel and do a ‘rug up’ to get it. The yum support works a lot like the apt support, so you need to use something like open-carpet.org to get access to yum repos. If people have some they would like to see in open-carpet.org, mail me and I’ll add it.</p>
<p>I also committed some performance improvements that will help a lot if you’re using a large package repository like open-carpet.org. Yay.</p>
Lightning sucks.2004-06-16T00:00:00+00:00http://snorp.net/2004/06/16/lightning-sucks/lightning-sucks.<p>Yesterday a thunderstorm passed through. There was lightning. Apparently some of it got close enough to fry some of my electrical things. Specifically, the stereo, gamecube, and wifi AP. Also, the laptop’s AC adapter was destroyed (but I have a new one thanks to <span class="caps">IBM</span> and all is well).</p>
<p>So today at lunch I went and bought a new wifi switch. I picked up a Linksys WRT54G, the one that has open firmware. So far it rules. No, I mean it totally rules. You should run, not walk, to the nearest Best Buy (or whatever). The open firmware lets you do local dns stuff. So you can have actual dns names for the machines on your <span class="caps">LAN</span>. This is the feature I have wanted most in these sort of boxes, and none of them appear to have it (except for this alternative firmware, from <a href="http://www.sveasoft.com">sveasoft</a>). Also supposedly the sveasoft firmware has other neat stuff like a <span class="caps">VPN</span> server.</p>
<p><b>Red Carpet</b></p>
<p>Also I’ve worked the rest of the bugs out of the yum <a href="http://www.snorp.net/files/patches/rcd_jwillcox_yum_and_speedup_v2.diff">support</a> for rcd. I think it’s pretty solid now. It even avoids downloading the headers you already have (much like yum itself does). I should commit it soon. I know Shaver and Vlad have been using rcd on FC2, so it might be nice to get some of the yum repos that don’t also have apt ones.</p>
<p>I’ve been thinking about writing a tool that creates an open carpet repo out of a yum or apt one. That way apt/yum repo maintainers can just run this magical script without having to do the (relatively painless) process of setting up an open-carpet repo ‘from scratch’. I wonder if something like this would help open-carpet adoption?</p>
<p>Oh, I forgot to blog about this earlier, but anyone that has seen the “rcd eats 99% of my cpu” bug will be happy to know that the latest release fixes it. If you use rcd and see this bug in the latest release <b>please <a href="http://bugzilla.ximian.com">report</a> it</b>. I promise I will hunt it down and kill it dead. Either that or I will get smart people like Tambet or <a href="http://primates.ximian.com/~danw/">Dan Winship</a> to do it for me (who fixed it in the first place).</p>
<p><b><span class="caps">GNOME</span></b></p>
<p>A long time ago (like a year or more) I worked on some code that allowed you to migrate windows from one display/screen to another. Basically it was just some X message passing stuff that ended up calling gtk_window_set_screen(). I wrote a spec for it and posted it to wm-spec-list, but nobody really seemed that interested. I’ve started working on it again, and I think I’ll give the spec/patch another go. There is lots of badness in gtk+ with closing displays, and that sucks. Also there doesn’t seem to be an async way of opening a display, so if you try to migrate a window to someplace that’s not listening on the right port or whatever, it blocks the <span class="caps">GUI</span>.</p>
FUD2004-05-21T00:00:00+00:00http://snorp.net/2004/05/21/fud<p>Apparently Red Hat’s <span class="caps">FUD</span> campaign extends to more than just mono. From a <a href="http://www.computing.co.uk/Analysis/1155278">computing.co.uk</a> interview with Matthew Szulik:<br />
<i -quote><br />
<b>Why Red Hat versus Novell-SuSE or Sun <span class="caps">JDS</span> on the desktop?</b></p>
<p>They’re all proprietary except us. They all have proprietary technology inside, not 100 per cent open source software. They continue to lock customers in to limit choice.</p>
<p>If you buy the Sun desktop, you’re going to buy into the proprietary Sun architecture. With SuSE there’s Red Carpet, integrated with other Novell technologies, still proprietary.<br />
</i></p>
<p>I’m sorry, did I miss something? Was <span class="caps">RHN</span> recently freed unto the world? Sigh.</p>
Updated Wireless Stuff2004-05-17T00:00:00+00:00http://snorp.net/2004/05/17/updated-wireless-stuff<p>I took some time today to update my wireless patches to latest <span class="caps">GNOME</span> <span class="caps">CVS</span>, and the latest development release of wireless-tools. If you would like to try it, here are instructions:</p>
<ol>
<li>Get the latest <a href="http://www.snorp.net/files/patches/gnome_applets_jwillcox_wireless_switching_v2.tar.gz">wireless-applet</a> and <a href="http://www.snorp.net/files/patches/iwlib_jwillcox_scanning_27pre22.diff">wireless-tools</a> patches</li>
<li>Get the latest <a href="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.27.pre22.tar.gz">wireless-tools</a> (version 27pre22) and apply iwlib_jwillcox_scanning_27pre22.diff to it, install it, etc.</li>
<li>Unpack the wireless-applets patch tarball thingy in the root of the gnome-applets tree. Apply the gnome_applets_jwillcox_wireless_v4.diff patch. Run autogen, make, etc.</li>
<li>Enjoy.</li></ol>
<p>This still only works on Red Hat systems due to the usage of consolehelper. You can fix that by putting appropriate root-getting-and-essid-setting-and-renew-dhcp-lease bits for your distro in the wireless-applet-helper script.</p>
<p><b>Update:</b></p>
<p><a href="http://www.snorp.net/files/screenshots/wireless-applet.png">Screenshot</a> for those of you who haven’t seen it.</p>
Down with The Man2004-05-17T00:00:00+00:00http://snorp.net/2004/05/17/down-with-the-man<p>So, I’ve ditched <a href="http://www.movabletype.org">MovableType</a> in favor of <a href="http://www.wordpress.org">WordPress</a>. I have to say I’m fairly impressed with it. The installation (including the MT import process) was incredibly simple and painless, save one problem with the dates for the imported entries which was hosing the <span class="caps">RSS</span> feed.</p>
<p>Hooray for Free Software.</p>
Hacking2004-05-15T00:00:00+00:00http://snorp.net/2004/05/15/hacking<p><b>Nautilus</b></p>
<p>I actually did some nautilus hacking recently. It had been a while, and it was pretty fun. I added desktop item editing to the property window.</p>
<div align="center"><img src="http://www.snorp.net/files/screenshots/ditem-launcher-edit.png"/></div>
<p>It’s pretty simple. Way better than the UI in gnome-desktop-item-edit, <span class="caps">IMO</span>. Anyway, Dave branched nautilus the other day and that’s now in <span class="caps">CVS</span>. Now someone needs to fix the UI for adding new launchers/links :)</p>
<p><b>Work</b></p>
<p>I also added yum support to the Red Carpet daemon this week. This should be particularly interesting to Fedora users, since there seem to be a lot of apt and yum repositories for that (and rcd supports both now). I haven’t committed the patch yet due to some other stuff going on, but if anyone wants to try it just mail me.</p>
<p>Also, Petreley sucks. That is all.</p>
Lots of Stuff2004-03-26T00:00:00+00:00http://snorp.net/2004/03/26/lots-of-stuff<p>So, haven’t blogged in a pretty long time. Lots has happened. Most notably, I got engaged to my long-time girlfriend, Amy! We set the date for July. I’m really happy! :)</p>
<p>Just got back from BrainShare. It was pretty cool. I took some pics, but I don’t have them pulled off the camera yet. I think we were all kind of in awe about the number of Large Monkey Buttons plastered all over :)</p>
<div align="center"><a href="http://www.snorp.net/files/photos/floor-button.png"><img src="http://www.snorp.net/files/photos/floor-button-thumb.png"/></a><br><i>the floor near the mono booth</i></div>
Yet More Wireless Applet Stuff2004-02-16T00:00:00+00:00http://snorp.net/2004/02/16/yet-more-wireless-applet-stuff<p>So, more wireless applet hacking today. This time I fixed the build so it installs all the nifty pam magic. Patches for all. Apply <a href="http://www.snorp.net/files/patches/iwlib_jwillcox_scanning_v2.diff">this</a> patch to the latest wireless-tools development <a href="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.27.pre9.tar.gz">version</a>, and unpack/apply <a href="http://www.snorp.net/files/patches/gnome_applets_jwillcox_wireless_switching_v1.tar.gz">this</a> one to gnome-applets <span class="caps">CVS</span>. You’ll want to pass something like —sysconfdir=/etc to configure to get the pam stuff working.</p>
<p><b>[Disclaimer]</b> I have only tested this on my own machine, which is running Fedora Core 1. Other RedHat systems will probably work. Basically, “<span class="caps">ESSID</span>=<essid> /sbin/ifup <interface>” needs to work, and you need consolehelper.</p>
more wireless stuff2004-01-24T00:00:00+00:00http://snorp.net/2004/01/24/more-wireless-stuff<p>Spent some time today and yesterday hacking on the wireless applet some more. Now you can double-click a network to switch to it (sets the essid and gets a dhcp lease). I was thinking of what the applet should do while its in the process of switching. Getting a IP can take some time. For now, at least, I just made it insensitive with a “switching…” message.</p>
<div align="center"><img src="http://www.snorp.net/files/screenshots/wireless-switching.png"/></div>
<p>Anyway, I finally sent a patch to Jean today (the wireless-tools maintainer) for the scanning stuff. Hopefully it’ll make it into the next wireless-tools release. It’s a shame I didn’t get this stuff done before the feature freeze….</p>
<p>I also spent a few minutes on recent-files stuff this week. I reverted the (unstable and unfinished) changes I made last year, and applied a patch from bugzilla that fixed some <span class="caps">NFS</span> file locking issues. I think by gnome 2.8, dbus will have matured and maybe we’ll be able to rewrite recent-files as a dbus service instead of the file spec we have now….</p>
Untitled 12003-12-16T00:00:00+00:00http://snorp.net/2003/12/16/untitled-1<p>I’ve been hacking on the wireless applet a bit the last couple days. This is the result:<br />
<div align="center"><img src="http://www.snorp.net/files/screenshots/wireless-applet.png"/></div></p>
<p>Right now it just lists the access points and the quality. It would be sweet if you could switch to another essid from there, etc.</p>
<p>Paolo has been working on recent-files stuff. I feel guilty for not helping him yet, so maybe I’ll work on that tonight.</p>
car and stuff2003-12-04T00:00:00+00:00http://snorp.net/2003/12/04/car-and-stuff<p>My Dad’s old car (which I have been driving) was getting in pretty bad shape, so I bought a new (used) car on Saturday. It’s a green VW Passat. It’s totally sexy. I took pictures but don’t have them up anywhere.</p>
<p>Work isn’t taking as much of my time now, which is good I guess. Unfortunately, after hacking all day at work I have little desire to hack on <span class="caps">GNOME</span>, which is bad. The <span class="caps">API</span>/<span class="caps">ABI</span> freeze is on Monday and recent-files <span class="caps">STILL</span> isn’t ready to go in. Paolo has been working hard on a new document model and other good stuff, though, so maybe we’ll make it. OO.o has its own implementation, though, so we need to coordinate with those guys on what is happening…</p>
Chema2003-11-10T00:00:00+00:00http://snorp.net/2003/11/10/chema<p>Wow, talk about some shocking news. Chema Celorio died last night after a skydiving accident.</p>
<p>Chema was the person who got me involved with <span class="caps">GNOME</span>. I saw his <a href="http://mail.gnome.org/archives/gnome-love/2001-October/msg00008.html">post</a> to the gnome-love mailing list, and decided I wanted to help out. He was more than willing to guide me along, often sinking quite a bit of time into answering my questions, etc. I met him for the first time in real life this summer on my first trip to Boston after being hired. He was staying at the company apartment in between sales trips. One night we were bored and watched a bunch of video he had recorded from his jumps. Chema lived life to the max, and he will certainly be missed.</p>
what's that on your face?2003-09-19T00:00:00+00:00http://snorp.net/2003/09/19/what's-that-on-your-face?<p>See, I knew I wouldn’t keep this thing updated.</p><p>
<p>Going to Boston again on Sunday. Mucho trabajo to do. Things have been going pretty well, though.</p><p><br />
A week or so ago I was messing around with creating panel applets in C#. Originally, I tried to wrap PanelApplet, but that didn’t go so well. I ended up writing some super hacky C glue to do the job. It worked pretty well. I think if I get a chance I might look at trying to wrap PanelApplet again. It really shouldn’t be that hard. After all, PanelApplet is pretty much a standard GObject.</p><p><br />
I started on a tutorial on writing nautilus context menus and property pages in python. I’ve wanted to do this for a while now. These components are super easy to write in python. Plus you can do hella cool stuff with them, so I think it may be attractive to newbies.</p></p>
take my word for it2003-09-19T00:00:00+00:00http://snorp.net/2003/09/19/take-my-word-for-it<p>Do not, under any circumstances, see the movie “Cabin Fever”. Worst. Movie. Ever.</p><p>
<p>If you’re feeling brave, you should totally check out the latest red carpet client. It supports apt rpm repositories and multiple servers now. It’s very sweet. There is a fairly recent one in the ‘rcd-snaps’ channel if you want to try it.</p></p>
titles suck2003-09-05T00:00:00+00:00http://snorp.net/2003/09/05/titles-suck<p>Yeah, so, it took me a while to get the metaWeblog support working with Seth’s blogger applet (as some of the planet gnome readers may have noticed). Seems to be working well now though.</p><p>
<p></p><p><br />
<span class="caps">GNOME</span> 2.4 is coming out soon. Best <span class="caps">GNOME</span> Ever. I don’t think I did anything, though, except fix a couple bugs. School really had me busy during the end…</p><p></p>
<p></p><p><br />
PyGTK 2.0 was released! This is great news! I have some libwnck bindings laying around that I’m going to try to get in now. I originally made them so I could easily test the window migration extensions to gtk/wnck I was working on. That kind of flopped though (I am lazy, plus the community did not seem very interested in it).</p><p></p>
<p></p><p><br />
Someone filed this totally sweet bug <a href="http://bugzilla.gnome.org/show_bug.cgi?id=121455">report</a> against the recent-files stuff the other day.</p></p>
I'm trying out Seth's blogger2003-09-02T00:00:00+00:00http://snorp.net/2003/09/02/i'm-trying-out-seth's-blogger<p>I’m trying out Seth’s blogger applet. Testing 1..2..3….</p>
give credit where credit is due2003-08-17T00:00:00+00:00http://snorp.net/2003/08/17/give-credit-where-credit-is-due<p>I’ve been listening to music for like 12 hours straight now using the latest Rhythmbox from <span class="caps">CVS</span>. I’m happy to say that it hasn’t crashed even <span class="caps">ONCE</span> during this time. The UI feels snappy, and everything Just Works (with the exception of it not playing a couple of my mp3s, but whatever). <span class="caps">MAD</span> <span class="caps">PROPS</span> TO <span class="caps">WALTERS</span> <span class="caps">AND</span> <span class="caps">THE</span> <span class="caps">REST</span> OF <span class="caps">THE</span> <span class="caps">RHYTHMBOX</span> <span class="caps">TEAM</span>!</p>
<p>So, what I’m trying to say is, if you gave up on Rhythmbox back in the day, give it another chance. Oh, here’s a <a href="http://www.snorp.net/files/screenshots/rhythmbox.png">screenshot</a>.</p>
Wow, I'm lame2003-08-16T00:00:00+00:00http://snorp.net/2003/08/16/wow,-i'm-lame<p>A heckuvalot has happened since my last post, I suppose. Notably, Novell acquired Ximian. As <a href="http://primates.ximian.com/~dave/log">Dave</a> said, some people were able to access the intranet today (I was not one of them). However, the org chart on the site shows me as reporting directly to the Vice Chairman of Novell. I don’t think Dave will be calling me a dorkwad anymore (I demoted him once already today).</p>
<p>I haven’t done any gnome hacking lately, and unfortunately I don’t see any happening in the near future. Work is keeping me pretty busy. Hopefully I’ll have some time after this development cycle ends.</p>
<p>Had a great time in Boston while I was there. In the conference call(s) today, I realized that I was able to put a face to nearly every voice I heard, which was a nice change.</p>
<p>The Rio portable ogg <a href="http://www.digitalnetworksna.com/shop/_templates/item_main_Rio.asp?model=220&cat=53">player</a> which I’ve been salivating over for a while was finally anounced. I ordered one immediately. It’s going to kick <b>so much ass</b>. I’m a little worried about linux integration, though. Supposedly, the little bugger runs a webserver and has a java applet which you can use to transfer files to it. While this would probably work, what I would really like is a way to mount the drive or use a gnome-vfs module. The developers of the Karma are the same ones who made the empeg linux-based car mp3 player, so maybe they’ll be nice and release some code and/or specs.</p>
Update2003-08-01T00:00:00+00:00http://snorp.net/2003/08/01/update<p>I would like to retract the “except Ian” remark made on July 20th. That is all.</p>
I'm sorry, but it was funny.2003-08-01T00:00:00+00:00http://snorp.net/2003/08/01/i'm-sorry,-but-it-was-funny/i'm-sorry,-but-it-was-funny.<p>I’m in Boston again. Been here since Sunday. Things have been going fairly well I suppose. It seems I am starting to get my arms around red carpet now, as I was able to fix a few things today.</p>
<p>A lot of other remote guys are in town too, so that’s cool. I finally got to meet Tambet and Aidan.</p>
<p>I fixed a small bug in nautilus yesterday. I miss hacking on it. I guess there are big plans for 2.6, though, so maybe I can get in on that if I have time. It’s really great to see medusa getting some love. I haven’t tried it out yet, but I hear Curtis Hovey has been doing great things.</p>
<p>I’ve totally neglected dashboard this week. I have a little patch sitting on my machine at home that fixes up the epiphany frontend and turns it into a plugin. Hopefully it won’t be too out of date when I get back next week…..</p>
<p>I bought “Cat’s Cradle” by Kurt Vonnegut and read it on the trip to Boston. I was only expecting to get maybe half-way done with it, but it turns out I was able to read the whole thing due to my flight(s) taking so long. In Indianapolis, we sat on the tarmac for like 45 minutes waiting for a new flight plan (apparently there was some bad weather in the original route), so I was like an hour late to <span class="caps">JFK</span>. At <span class="caps">JFK</span>, we had to wait for a flight plan again. Then, they found out they lost the captain’s luggage so we had to wait on that. When we finally got out of the terminal, we were like 46th in line for takeoff, so we slowly taxiied around for a while. During the taxi, the cabin filled with smoke due to some trivial air-conditioning snafu. Everyone freaked out and we went back to the tarmac. Two hours later, or so, we were finally in the air.</p>
<p>Anyway, “Cat’s Cradle” was really good. I think I’m going to get another Vonnegut to read on the way back. Anyone have a suggestion?</p>
I am a moron2003-07-20T00:00:00+00:00http://snorp.net/2003/07/20/i-am-a-moron<p>I had a pretty nice week in Boston, generally. All the Ximian guys/gals were cool (except Ian :) ). I even managed to get some actual work done. So, things were going well up until Friday. That’s when I missed my plane, because I thought it was leaving on Saturday. Ugh. I called the travel agency, and managed to get another flight out at 6:00 AM. I ended up getting to Indy around 11 or so. Then, I discover that my car’s battery is dead. Nice. Eventually, I get a jump from the parking lot dudes, and I’m on my way. Pretty tired by the time I get home, having not slept for about 30 hours. Slept the rest of the day. Have to deal with the car today, and find out what ran the battery down. I pulled a fuse to what I thought was the culprit yesterday (there is a penny in the cigarette lighter — seems a likely cause), so we’ll see how it goes.</p>
let's get this party started2003-07-12T00:00:00+00:00http://snorp.net/2003/07/12/let's-get-this-party-started<p>I’m leaving tomorrow for my first trip to Boston. I’m pretty psyched about it.</p>
<p>Worked a bit on epiphany/dashboard today. Updated the frontend patch to work with the new <span class="caps">API</span>, and also built an <span class="caps">RPM</span> (<a href="http://www.snorp.net/files/packages/epiphany-0.7.3-2.i386.rpm">http://www.snorp.net/files/packages/epiphany-0.7.3-2.i386.rpm</a>). It requires mozilla from xd2 (sorry, it’s what I have).</p>
<p>It sounds like the dashboard demo at the o’reilly conference went pretty well. I suppose it will be getting even <b>more</b> attention now. Good stuff.</p>
back to work2003-07-07T00:00:00+00:00http://snorp.net/2003/07/07/back-to-work<p>I’m back home now. Had a great weekend at the lake, as usual. Went sailing on the catamaran, watched fireworks, ate, etc.</p>
<p>Some friends of the people I was visiting are moving, and they had an old desk they were trying to get rid of. Amazingly, I found a way to transport it back down to Bloomington, so now I have a desk. Sweet.</p>
<p>Looks like Nat (and his trusty sidekicks) made a bunch of progress on Dashboard over the weekend. I wonder if that guy sleeps. It appears my ephy patch to make it send cluepackets is outdated now, and needs some more work. I should find time to fix it.</p>
ok, ok, stop hounding me2003-07-03T00:00:00+00:00http://snorp.net/2003/07/03/ok,-ok,-stop-hounding-me<p>Tomorrow will end my first week as a Ximian employee. So far, I’m feeling pretty useless, having done exactly one productive thing the whole week. I’m sure I’ll get the hang of things eventually, but, you know, I’m impatient.</p>
<p>4th of July is on Friday. My family sort of has standing plans with some friends of ours who live on a lake. So, the girlfriend and I are heading up there tomorrow night. It’s always a great time, and I’m looking forward to it again this year.</p>
<p>Talked with a guy over email about the recent-files spec (he wondered why I was using <span class="caps">XML</span>), and then today with Federico on <span class="caps">IRC</span> (OO.o stuff). It has been a long time since I touched that code. I need to get it in shape so I don’t miss yet <b>another</b> opportunity to get it in the platform (2.6). Actually, by then maybe I’ll be able to redo it as a set of D-Bus messages instead of specifying the storage mechanism. Seems like it would be far better.</p>
<p>Everyone and their dog is hacking on <a href="http://www.nat.org/dashboard">dashboard</a>. It sounds pretty freaking cool.</p>
life.start()2003-06-26T00:00:00+00:00http://snorp.net/2003/06/26/life.start<p>I moved into my new apartment yesterday. It was a fairly painless experience all in all. I don’t have any furniture yet (it’s coming this weekend), so that kind of sucks. Sleeping on the floor last night especially sucked.</p>
<p>Today was officially my first day working for Ximian. It went pretty well I think. Hopefully, I’ll be able to get up to speed quickly and start making useful contributions soon. I was able to get a mostly working development version of <span class="caps">RCE</span> on my machine today, which was about the only semi-productive thing I did. It’s clear I have a lot to learn, but I’m looking forward to it. Also, my first trip to Boston was arranged today. I’m really looking forward to that too. It’ll be totally cool meeting all the [ex-]gnomies and hopefully getting a good handle on my job.</p>
New Site2003-06-16T00:00:00+00:00http://snorp.net/2003/06/16/new-site<p>I have snorp.net now. Hooray. Other than having <a href="mailto:snorp@snorp.net">snorp@snorp.net</a> and this blog, I’m not sure why I really want my own domain. I guess I’ll use the webspace for posting screenshots and stuff, like I did with the IU webspace. Of course, I haven’t updated my blog on <a href="http://www.advogato.org/person/snorp">Advogato</a> forever so I’ll probably end up ignoring this one too.</p>
<p>So, what’s been happening? I graduated in May. I’m pretty happy about that. I even found a job (!). I was able to land a 10 week contract job the week after I graduated. After I accepted it, though, another job fell in my lap. And not just any job, one at <a href="http://www.ximian.com">Ximian</a>! I accepted it just when I was planning on leaving for California (the location of the contract job). Luckily, the guy who hired me for the contract was really cool about it (he had told me before that if I found a permanent job, he would have no problem with me bailing). I start at Ximian in a week or so, working on <a href="http://www.ximian.com/products/redcarpet">Red Carpet</a>. Red Carpet is very cool, and I’m sure I’ll love working on it. <span class="caps">WOO</span>!!</p>
<p>In other news, I have been working on some code which lets users migrate windows to other screens or displays. So, for instance, if you have an app running on another machine you could simply pull it to your current display. A simpler usage might be to move a window between two screens on a non-xinerama multihead machine. I think it’s pretty cool. Nobody has said anything on xdg-list or wm-spec-list when I’ve posted about it, though, so maybe it’s not that cool? Anyway. I need to talk to Owen about it. Maybe he’ll let me put it in gtk+.</p>
<p>I finished the file monitoring system for the school project. It works ok for polling, but the dnotify backend is pretty buggy. If I can find some time to work on it, I think it may be ready in the <span class="caps">GNOME</span> 2.6 time frame.</p>
<p>Haven’t done much <span class="caps">GNOME</span> hacking generally, which pretty much sucks. I have been totally useless in the 2.4 cycle. I did fix a couple nautilus bugs (Yes Dave, <b>2</b> bugs!), so that’s good I guess. Still plenty of bug-fixing time to go, so maybe I’ll get my ass in gear one of these days.</p>