<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Exploits of Plouj &#187; GNU/Linux</title>
	<atom:link href="http://www.plouj.com/blog/category/gnulinux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.plouj.com/blog</link>
	<description>A blog by Michael Ploujnikov</description>
	<lastBuildDate>Wed, 01 Sep 2010 17:05:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Google Earth trip video capture in GNU/Linux with Yukon/Seom</title>
		<link>http://www.plouj.com/blog/2009/07/15/google-earth-trip-video-capture-in-gnulinux-with-yukonseom/</link>
		<comments>http://www.plouj.com/blog/2009/07/15/google-earth-trip-video-capture-in-gnulinux-with-yukonseom/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 17:21:55 +0000</pubDate>
		<dc:creator>plouj</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[capture]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[googleearth]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[seom]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[yukon]]></category>

		<guid isPermaLink="false">http://www.plouj.com/blog/?p=385</guid>
		<description><![CDATA[This is documentation of how I used Yukon and Seom to video capture a Google Earth trip for a recent video project in Fedora 10. I used the official installation guide as a starting point. Compile the Seom library I choose to install both Seom and Yukon in a custom prefix /home/plouj/yukon, rather than the [...]]]></description>
			<content:encoded><![CDATA[<p>This is documentation of how I used <a href="https://devel.neopsis.com/projects/yukon/">Yukon and Seom</a> to video capture a <a href="http://earth.google.com/">Google Earth</a> <a href="http://earth.google.com/tour.html#v=4">trip</a> for a recent video project in <a href="http://fedoraproject.org/">Fedora</a> 10. I used the <a href="https://devel.neopsis.com/projects/yukon/wiki/HowTo/Install">official installation guide</a> as a starting point.</p>
<h2>Compile the Seom library</h2>
<p>I choose to install both Seom and Yukon in a custom prefix <em>/home/plouj/yukon</em>, rather than the system wide <em>/usr</em> or <em>/usr/local</em>.</p>
<pre>
$ svn co https://devel.neopsis.com/svn/seom/branches/packetized-stream seom
$ cd seom
$ ./configure --prefix=/home/plouj/yukon --arch="x86" --cflags="-W -Wall" &#038;&#038; \
make CC="gcc -m32" &#038;&#038; make install LIBDIR="lib"
</pre>
<p>Note that &#8220;&#8211;arch=&#8221;x86&#8243; and &#8220;-m32&#8243; are only necessary for me because my operating system is 64bit and I need 32bit versions of seom and yukon (to work with 32bit Google Earth).</p>
<h2>Compile and install Yukon</h2>
<pre>
$ svn co https://devel.neopsis.com/svn/yukon/branches/rewrite yukon
$ cd yukon
$ ./configure --prefix=/home/plouj/yukon/ --libdir="lib" --arch="x86" &#038;&#038; \
make CC="gcc -L/home/plouj/yukon/lib -I/home/plouj/yukon/include -m32" &#038;&#038; \
make install
</pre>
<h2>Install Google Earth for Linux</h2>
<p>Obviously get it here: <a href="http://earth.google.com/">http://earth.google.com/</a></p>
<h2>Modify the Google Earth startup script</h2>
<p>Since I chose <em>/home/plouj/bin/</em> as the &#8220;Binary path&#8221; for Google Earth I was editing <em>/home/plouj/bin/googleearth</em>. All I had to do was to add yukon/seom library and executable paths at the end of the script:</p>
<pre>
...
cd "${GOOGLEEARTH_DATA_PATH}/"
LD_LIBRARY_PATH=/home/plouj/yukon/lib/:$LD_LIBRARY_PATH \
PATH=/home/plouj/yukon/bin:$PATH exec yukon "./googleearth-bin" "$@"
</pre>
<p>instead of the original:</p>
<pre>
cd "${GOOGLEEARTH_DATA_PATH}/"
exec "./googleearth-bin" "$@"
</pre>
<h2>Capture</h2>
<p>Finally, the <a href="https://devel.neopsis.com/projects/yukon/wiki/HowTo/Capture">capture</a> process is well documented on the Yukon website.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.plouj.com/blog/2009/07/15/google-earth-trip-video-capture-in-gnulinux-with-yukonseom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO increase Blender&#8217;s memory cache limit for command line renders</title>
		<link>http://www.plouj.com/blog/2009/06/08/howto-increase-blenders-memory-cache-for-command-line-renders/</link>
		<comments>http://www.plouj.com/blog/2009/06/08/howto-increase-blenders-memory-cache-for-command-line-renders/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 03:23:37 +0000</pubDate>
		<dc:creator>plouj</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[blender]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[command-line]]></category>
		<category><![CDATA[commit]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[render]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://www.plouj.com/blog/?p=308</guid>
		<description><![CDATA[Blender sequencer gives the ability to optimize rendering of repeated frames by keeping the first result in memory cache and re-using it. Depending on the project, it might be necessary to increase this limit beyond the default 32MB. If the limit is surpassed while rendering a single frame, Blender clears the cache before proceeding to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.blender.org/">Blender</a> sequencer gives the ability to optimize rendering of repeated frames by keeping the first result in memory cache and re-using it. Depending on the project, it might be necessary to increase this limit beyond the default 32MB. If the limit is surpassed while rendering a single frame, Blender clears the cache before proceeding to the next frame and the re-renders everything from scratch.</p>
<p>Increasing the cache limit is easy to do in the UI:<br />
<img class="alignnone size-full wp-image-315" title="blender-cache-limit" src="http://www.plouj.com/blog/wp-content/uploads/2009/06/blender-cache-limit.png" alt="blender-cache-limit"/><br />
This setting is stored in the user&#8217;s preference file (<em>~/.B.blend</em> on Linux systems) and, therefore, applies to all projects. However, rendering from the command line requires using the <a href="http://wiki.blender.org/index.php/Doc:Manual/Render/Command_Line_Options">-b argument</a>, which explicitly ignores the user&#8217;s preference file. Apart from editing and re-compiling the Blender source code, I found only one way to increase the memory cache limit.</p>
<p>The trick is to use a Python script, like below, to change the user preferences before rendering the scene:</p>
<pre>import sys
import bpy

def main():
	bpy.config.sequenceMemCacheLimit=4096

if __name__ == '__main__':
	main()</pre>
<p>Add the script to the command line like this:</p>
<pre>./bin/blender -b sample-static-text.blend -P render_settings.py -a</pre>
<p>Note that the order of arguments matters because first we need to load the scene (with <em>-b</em>), then change settings through Pythons (using the <em>-P</em> option) and finally render the animation (with <em>-a</em>). Also, you need at least version <strong>2.49a</strong> of Blender for this to work.</p>
<p>For reference, here&#8217;s is the the source file which hardcodes the 32MB limit:</p>
<p><a href="http://projects.blender.org/plugins/scmsvn/viewcvs.php/branches/blender2.5/blender/intern/memutil/intern/MEM_CacheLimiterC-Api.cpp?annotate=17433&#038;root=bf-blender">intern/memutil/intern/MEM_CacheLimiterC-Api.cpp:</a></p>
<pre>...
static intptr_t &#038; get_max()
{
        static intptr_t m = 32*1024*1024;
        return m;
}
...</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.plouj.com/blog/2009/06/08/howto-increase-blenders-memory-cache-for-command-line-renders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenDNS in Fedora with corporate DHCP and DNS with NetworkManager</title>
		<link>http://www.plouj.com/blog/2009/04/20/opendns-in-fedora-with-corporate-dhcp-and-dns/</link>
		<comments>http://www.plouj.com/blog/2009/04/20/opendns-in-fedora-with-corporate-dhcp-and-dns/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 22:24:00 +0000</pubDate>
		<dc:creator>plouj</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[DHCP]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[nameserver]]></category>
		<category><![CDATA[networkmanager]]></category>
		<category><![CDATA[opendns]]></category>

		<guid isPermaLink="false">http://www.plouj.com/blog/?p=279</guid>
		<description><![CDATA[Here is how to configure a Fedora workstation to use OpenDNS nameservers in a network with corporate DNS and DHCP servers without loosing access to their services. This was done on a Fedora 9 machine with dnsmasq being the local DNS server. It should also work on newer Fedora versions and even other GNU/Linux distributions. [...]]]></description>
			<content:encoded><![CDATA[<p>Here is how to configure a Fedora workstation to use <a href="http://www.opendns.com/">OpenDNS</a> nameservers in a network with corporate DNS and DHCP servers without loosing access to their services.<br />
This was done on a Fedora 9 machine with <a href="http://www.thekelleys.org.uk/dnsmasq/doc.html">dnsmasq</a> being the local DNS server. It should also work on newer Fedora versions and even other GNU/Linux distributions.</p>
<p>The setup is actually very simple and unobtrusive. It is only necessary to properly configure a local DNS server and then force 127.0.0.1 to be used as the only nameserver instead of the corporate DNS servers.</p>
<p>First you need to configure dnsmasq as follows:</p>
<h2>/etc/dnsmasq.conf</h2>
<pre>
# don't use the /etc/resolv.conf file anymore
no-resolv

# OpenDNS nameservers:
server=208.67.222.222
server=208.67.220.220

# Force corporate nameservers for corporate.domain.com lookups
# OpenDNS wouldn't be able to answer such queries correctly
# adjust to suit your network
server=/corporate.domain.com/10.1.1.1
server=/corporate.domain.com/10.1.1.2

# only respond to queries from the local machine
listen-address=127.0.0.1
bind-interfaces

conf-dir=/etc/dnsmasq.d
</pre>
<p>Then you need to go into NetworkManager and set 127.0.0.1 as the DNS server to be used:<br />
<img src="http://www.plouj.com/blog/wp-content/uploads/2009/04/nm-localhost-dns-server.png" alt="nm-localhost-dns-server" title="nm-localhost-dns-server" width="439" height="522" class="alignnone size-full wp-image-423" /></p>
<p>This will result in the following important settings added to your network scripts:</p>
<pre>
DNS1=127.0.0.1
PEERDNS=no
</pre>
<p>I&#8217;ve noticed two minor problems with this setup:</p>
<ol>
<li>the corporate DNS server names are hardcoded in the configuration. Usually they are determined automatically by the DHCP client.</li>
<li>restarting the dnsmasq service sometimes shows this error:
<pre>dnsdomainname: Host name lookup failure</pre>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.plouj.com/blog/2009/04/20/opendns-in-fedora-with-corporate-dhcp-and-dns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lexmark E250DN IPP Printing in CUPS</title>
		<link>http://www.plouj.com/blog/2008/06/22/lexmark-e250dn-ipp-printing-in-cups/</link>
		<comments>http://www.plouj.com/blog/2008/06/22/lexmark-e250dn-ipp-printing-in-cups/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 01:14:24 +0000</pubDate>
		<dc:creator>plouj</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[cups]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[ipp]]></category>
		<category><![CDATA[lexmark]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[printing]]></category>

		<guid isPermaLink="false">http://www.plouj.com/blog/?p=19</guid>
		<description><![CDATA[I just finished setting up my newly purchased monochrome duplex network printer &#8211; Lexmark E250DN. It took me a while to figure out how to configure CUPS on my GNU/Linux/Fedora machines to communicate with this printer. The problem was that I just didn&#8217;t know what URI to use for the printer. Unsurprisingly, the PDF and [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished setting up my newly purchased monochrome duplex network printer &#8211; Lexmark E250DN. It took me a while to figure out how to configure CUPS on my GNU/Linux/Fedora machines to communicate with this printer. The problem was that I just didn&#8217;t know what URI to use for the printer. Unsurprisingly, the PDF and HTML documents that came with the printer didn&#8217;t mention such information. After all, why would Windows users need to know that if they can simply run the printer-specific utility to configure everything for them? Sheesh&#8230; Anyways. The CUPS manual was actually quite useful in listing <a href="http://localhost:631/help/network.html?QUERY=lexmark#TABLE1">common printer URIs</a>. It turned out that the Lexmark URI <code>lpd://printer-address/ps</code> and a Generic PostScript driver worked quite well. In fact, the &#8220;/ps&#8221; part seems to be irrelevant, so simply <code>lpd://printer.lan</code> worked for me. However, the CUPS manual also suggested <a href="http://localhost:631/help/network.html?QUERY=lexmark#LPD">avoiding the LPD protocol</a> if the printer supported other protocols. Using nmap I confirmed that my printer has at least something running on the IPP port (631):</p>
<pre>$ nmap printer.lan

Starting Nmap 4.53 ( http://insecure.org ) at 2008-06-22 20:39 EDT
Interesting ports on printer.lan (10.1.1.7):
Not shown: 1705 closed ports
PORT      STATE SERVICE
21/tcp    open  ftp
79/tcp    open  finger
80/tcp    open  http
515/tcp   open  printer
631/tcp   open  ipp
5001/tcp  open  commplex-link
8000/tcp  open  http-alt
9100/tcp  open  jetdirect
10000/tcp open  snet-sensor-mgmt

Nmap done: 1 IP address (1 host up) scanned in 0.396 seconds</pre>
<p>After a bit of trial and error, I discovered that simply using the <code>http://printer.lan:631</code> or <code>ipp://printer.lan</code> URI and a Generic PostScript driver worked without problems with E250DN.</p>
<p>Apart from these initial pains I am quite happy to be able to print double-sided black-and-white documents from all of my home computers.</p>
<h1>Side Note:</h1>
<p>During the investigation process, I noticed that Fedora&#8217;s system-config-printer utility prints the following information to the terminal when I tell it the IPP printer hostname:</p>
<pre>...
printer.lan: /usr/lib/cups/backend/snmp "${HOST}" 2&gt;/dev/null
printer.lan: hp-makeuri -c "${HOST}" 2&gt; /dev/null
No ID match for device ipp://printer.lan:
&lt;manufacturer&gt;Lexmark&lt;/manufacturer&gt;
  &lt;model&gt;E250dn 6216N4G LE.PM.P121 -- Part Number -&lt;/model&gt;
  &lt;description&gt;Lexmark E250dn 6216N4G LE.PM.P121 -- Part Number -&lt;/description&gt;
  &lt;commandset&gt;&lt;/commandset&gt;
Using textonly.ppd
...</pre>
<p>I wonder how I could get that XML-ish output myself. It doesn&#8217;t seem to come from hp-makeuri.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.plouj.com/blog/2008/06/22/lexmark-e250dn-ipp-printing-in-cups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
