<?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>AlferSoft Blog &#187; linux</title>
	<atom:link href="http://www.alfersoft.com.ar/blog/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alfersoft.com.ar/blog</link>
	<description>Explaining this blog in a few words since 1999</description>
	<lastBuildDate>Wed, 01 Feb 2012 22:36:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Ubuntu Linux: How to Convert from HTML to JPG</title>
		<link>http://www.alfersoft.com.ar/blog/2011/03/30/ubuntu-linux-how-to-convert-from-html-to-jpg/</link>
		<comments>http://www.alfersoft.com.ar/blog/2011/03/30/ubuntu-linux-how-to-convert-from-html-to-jpg/#comments</comments>
		<pubDate>Wed, 30 Mar 2011 15:03:41 +0000</pubDate>
		<dc:creator>fvicente</dc:creator>
				<category><![CDATA[Linux FAQ]]></category>
		<category><![CDATA[Software Applications]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[jpeg]]></category>
		<category><![CDATA[jpg]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.alfersoft.com.ar/blog/?p=202</guid>
		<description><![CDATA[Here is an easy way to convert from HTML to JPG. Actually, I&#8217;m converting the HTML to PDF and then from PDF to JPG. First, install the following packages: sudo apt-get install python-pisa imagemagick python-imaging Then simply: xhtml2pdf report.html convert report.pdf report.jpg Note: if you receive an error message in python &#8220;AttributeError: &#8216;NoneType&#8217; object has [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.alfersoft.com.ar/blog/wp-content/uploads/2011/03/100px-Orange_Icon_Picture.svg_.png"><img src="http://www.alfersoft.com.ar/blog/wp-content/uploads/2011/03/100px-Orange_Icon_Picture.svg_.png" alt="" title="Orange_Icon_Picture" width="100" height="100" class="alignleft size-full wp-image-210" /></a> Here is an easy way to convert from HTML to JPG. Actually, I&#8217;m converting the HTML to PDF and then from PDF to JPG.<br />
<span id="more-202"></span><br />
First, install the following packages:<br />
<code>sudo apt-get install python-pisa imagemagick python-imaging</code></p>
<p>Then simply:<br />
<code>xhtml2pdf report.html<br />
convert report.pdf report.jpg</code></p>
<p><strong>Note:</strong> if you receive an error message in python &#8220;AttributeError: &#8216;NoneType&#8217; object has no attribute &#8216;bands&#8217;&#8221; while trying to use the xhtml2pdf command, then you will need to apply this patch: http://hg.effbot.org/pil-2009-raclette/changeset/fb7ce579f5f9<br />
In other words, edit Image.py and move line 1501 &#8220;self.load()&#8221; to 1497, just before the &#8220;if self.im.bands == 1:&#8221;<br />
<a href="http://www.alfersoft.com.ar/blog/wp-content/uploads/2011/03/Image_py_fix.png"><img src="http://www.alfersoft.com.ar/blog/wp-content/uploads/2011/03/Image_py_fix.png" alt="Image.py fix" title="Image_py_fix" width="450" height="104" class="alignleft size-medium wp-image-203" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.alfersoft.com.ar/blog/2011/03/30/ubuntu-linux-how-to-convert-from-html-to-jpg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building ffmpeg in Debian (Lenny)</title>
		<link>http://www.alfersoft.com.ar/blog/2010/11/01/building-ffmpeg-in-debian-lenny/</link>
		<comments>http://www.alfersoft.com.ar/blog/2010/11/01/building-ffmpeg-in-debian-lenny/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 15:11:53 +0000</pubDate>
		<dc:creator>fvicente</dc:creator>
				<category><![CDATA[Linux FAQ]]></category>
		<category><![CDATA[Software Applications]]></category>
		<category><![CDATA[aac]]></category>
		<category><![CDATA[codec]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[lame]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mp3]]></category>

		<guid isPermaLink="false">http://www.alfersoft.com.ar/blog/?p=153</guid>
		<description><![CDATA[I&#8217;ve adapted the instructions from this Ubuntu thread for Debian Lenny. The original idea was to build ffmpeg with AAC support, but then I&#8217;ve found some other problems with mp3 codec, so I needed to apply a patch and rebuild everything. So, I&#8217;m writing all the procedures in this post in a few steps, hoping [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve adapted the instructions from <a href="http://ubuntuforums.org/showthread.php?t=786095">this Ubuntu thread</a> for Debian Lenny.<br />
The original idea was to build ffmpeg with AAC support, but then I&#8217;ve found some other problems with mp3 codec, so I needed to apply a patch and rebuild everything.<br />
<span id="more-153"></span>So, I&#8217;m writing all the procedures in this post in a few steps, hoping that I&#8217;m not forgetting anything. I know that some steps could be avoided (e.g. building ffmpeg twice), but I&#8217;ll just transcribe everything the way that worked for me (as I remember). </p>
<p><br/><br />
<strong>First try</strong></p>
<p>1. First edit your aptitude sources list</p>
<pre>alfersoft:~# nano /etc/apt/sources.list</pre>
<p>2. Add the following repositories</p>
<pre>deb http://www.debian-multimedia.org stable main
deb http://www.backports.org/debian lenny-backports main contrib non-free</pre>
<p>3. Update</p>
<pre>sudo apt-get update</pre>
<p>4. Remove current ffmpeg (if installed)</p>
<pre>sudo apt-get remove ffmpeg x264 libx264-dev</pre>
<p>5. Install necessary packages for the build. Note that I&#8217;ve removed libvpx-dev from the original Ubuntu thread.</p>
<pre>sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html \
    libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev \
    libtheora-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev \
    zlib1g-dev</pre>
<p>6. Build and install x264.</p>
<pre>cd
git clone git://git.videolan.org/x264.git
cd x264
./configure
make
sudo checkinstall --pkgname=x264 --pkgversion "2:0.`grep X264_BUILD x264.h -m1 | \
    cut -d' ' -f3`.`git rev-list HEAD | wc -l`+git`git rev-list HEAD -n 1 | \
    head -c 7`" --backup=no --deldoc=yes --fstrans=no --default</pre>
<p>7. Build and install ffmpeg. Note that I&#8217;ve removed the option &#8211;enable-libtheora and &#8211;enable-libvpx from the original Ubuntu thread.</p>
<pre>cd
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
    --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
    --enable-libopencore-amrwb --enable-libvorbis \
    --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`LANG=C svn info | \
    grep Revision | awk '{ print $NF }'`" --backup=no --deldoc=yes --fstrans=no \
    --default
hash x264 ffmpeg ffplay</pre>
<p><br/><br />
<strong>Almost there</strong></p>
<p>Ok, everything works perfectly until I try to convert a video and I get the following error:<br />
&#8220;lame: output buffer too small&#8221;<br />
After a bit of googling, I&#8217;ve found a patch in <a href="https://roundup.ffmpeg.org/issue803">this post</a>, with an interesting discussion regarding to whom should fix the problem (ffmpeg vs. lame). It is also suggested to downgrade the lame library, but I&#8217;ve tried that and didn&#8217;t worked for me, so in summary, let&#8217;s simply apply this ffmpeg patch and everything will be fine.</p>
<p>1. Go to the ffmpeg source directory and get the patch</p>
<pre>cd
cd ffmpeg
wget --no-check-certificate https://roundup.ffmpeg.org/file831/ffmpeg-lame-flush.patch3</pre>
<p>2. Apply the patch</p>
<pre>patch < ffmpeg-lame-flush.patch3
## (when the file name is required enter: libavcodec/libmp3lame.c)</pre>
<p>3. Build and install ffmpeg again</p>
<pre>make
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`LANG=C svn info | \
    grep Revision | awk '{ print $NF }'`" --backup=no --deldoc=yes --fstrans=no \
    --default</pre>
<p>And now you're ready to go!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alfersoft.com.ar/blog/2010/11/01/building-ffmpeg-in-debian-lenny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create two wired virtual serial ports on Linux?</title>
		<link>http://www.alfersoft.com.ar/blog/2010/02/19/how-to-create-two-wired-virtual-serial-ports-on-linux/</link>
		<comments>http://www.alfersoft.com.ar/blog/2010/02/19/how-to-create-two-wired-virtual-serial-ports-on-linux/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 18:18:32 +0000</pubDate>
		<dc:creator>fvicente</dc:creator>
				<category><![CDATA[Linux FAQ]]></category>
		<category><![CDATA[Programming FAQ]]></category>
		<category><![CDATA[bridged]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[null-modem]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[rs-232]]></category>
		<category><![CDATA[serial]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtual]]></category>
		<category><![CDATA[wired]]></category>

		<guid isPermaLink="false">http://www.alfersoft.com.ar/blog/?p=134</guid>
		<description><![CDATA[To create two bridged virtual serial ports use the following command: socat -d -d pty,raw,echo=0 pty,raw,echo=0 The output will show you which are the virtual ports (or pseudo terminals) created, e.g.: 2010/02/19 16:16:33 socat[9662] N PTY is /dev/pts/3 2010/02/19 16:16:33 socat[9662] N PTY is /dev/pts/4 2010/02/19 16:16:33 socat[9662] N starting data transfer loop with FDs [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" title="FAQ" src="http://www.alfersoft.com.ar/files/question.png" alt="" width="48" height="48" /></p>
<p>To create two bridged virtual serial ports use the following command:<br />
<code><br />
socat -d -d pty,raw,echo=0 pty,raw,echo=0<br />
</code></p>
<p>The output will show you which are the virtual ports (or pseudo terminals) created, e.g.:<br />
<code><br />
2010/02/19 16:16:33 socat[9662] N PTY is /dev/pts/3<br />
2010/02/19 16:16:33 socat[9662] N PTY is /dev/pts/4<br />
2010/02/19 16:16:33 socat[9662] N starting data transfer loop with FDs [3,3] and [5,5]<br />
</code></p>
<p>Note: if you are using Ubuntu and you do not have this command, try:<br />
<code><br />
sudo apt-get install socat<br />
</code></p>
<h6><a title="Lock" href="http://commons.wikimedia.org/wiki/File:Gnome-dialog-question.svg" target="_blank">Image source</a></h6>
]]></content:encoded>
			<wfw:commentRss>http://www.alfersoft.com.ar/blog/2010/02/19/how-to-create-two-wired-virtual-serial-ports-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to calculate the space used by files in Linux?</title>
		<link>http://www.alfersoft.com.ar/blog/2010/02/19/how-to-calculate-the-space-used-by-files-in-linux/</link>
		<comments>http://www.alfersoft.com.ar/blog/2010/02/19/how-to-calculate-the-space-used-by-files-in-linux/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 18:09:26 +0000</pubDate>
		<dc:creator>fvicente</dc:creator>
				<category><![CDATA[Linux FAQ]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[calculate]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[occupied]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[space]]></category>
		<category><![CDATA[sum]]></category>
		<category><![CDATA[used]]></category>

		<guid isPermaLink="false">http://www.alfersoft.com.ar/blog/?p=131</guid>
		<description><![CDATA[Suppose that you want to calculate the space used by all the png files in current directory and all its subdirectories. From a terminal type: find . -name '*.png' -exec du -ab {} \; &#124; awk '{total+=$0}END{print total}' Image source]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" title="FAQ" src="http://www.alfersoft.com.ar/files/question.png" alt="" width="48" height="48" /></p>
<p>Suppose that you want to calculate the space used by all the png files in current directory and all its subdirectories. From a terminal type:<br />
<code><br />
find . -name '*.png' -exec du -ab {} \; | awk '{total+=$0}END{print total}'<br />
</code></p>
<h6><a title="Lock" href="http://commons.wikimedia.org/wiki/File:Gnome-dialog-question.svg" target="_blank">Image source</a></h6>
]]></content:encoded>
			<wfw:commentRss>http://www.alfersoft.com.ar/blog/2010/02/19/how-to-calculate-the-space-used-by-files-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How do I compare two binary files on Linux?</title>
		<link>http://www.alfersoft.com.ar/blog/2010/02/19/how-do-i-compare-two-binary-files-on-linux/</link>
		<comments>http://www.alfersoft.com.ar/blog/2010/02/19/how-do-i-compare-two-binary-files-on-linux/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 17:51:00 +0000</pubDate>
		<dc:creator>fvicente</dc:creator>
				<category><![CDATA[Linux FAQ]]></category>
		<category><![CDATA[Programming FAQ]]></category>
		<category><![CDATA[binaries]]></category>
		<category><![CDATA[binary]]></category>
		<category><![CDATA[compare]]></category>
		<category><![CDATA[diff]]></category>
		<category><![CDATA[hexdump]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[meld]]></category>

		<guid isPermaLink="false">http://www.alfersoft.com.ar/blog/?p=128</guid>
		<description><![CDATA[The easiest way I found is dumping the binaries into text files using hexdump and then comparing them with your favourite program (diff, Meld, etc.). E.g.: hexdump -C a.bin >a.txt hexdump -C b.bin >b.txt diff a.txt b.txt Image source]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" title="FAQ" src="http://www.alfersoft.com.ar/files/question.png" alt="" width="48" height="48" /></p>
<p>The easiest way I found is dumping the binaries into text files using hexdump and then comparing them with your favourite program (diff, Meld, etc.). E.g.:<br />
<code><br />
hexdump -C a.bin >a.txt<br />
hexdump -C b.bin >b.txt<br />
diff a.txt b.txt<br />
</code></p>
<h6><a title="Lock" href="http://commons.wikimedia.org/wiki/File:Gnome-dialog-question.svg" target="_blank">Image source</a></h6>
]]></content:encoded>
			<wfw:commentRss>http://www.alfersoft.com.ar/blog/2010/02/19/how-do-i-compare-two-binary-files-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How do I add VNC to Terminal Server Client in Ubuntu?</title>
		<link>http://www.alfersoft.com.ar/blog/2010/02/19/how-do-i-add-vnc-to-terminal-server-client-in-ubuntu/</link>
		<comments>http://www.alfersoft.com.ar/blog/2010/02/19/how-do-i-add-vnc-to-terminal-server-client-in-ubuntu/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 17:45:14 +0000</pubDate>
		<dc:creator>fvicente</dc:creator>
				<category><![CDATA[Linux FAQ]]></category>
		<category><![CDATA[add]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[terminal server client]]></category>
		<category><![CDATA[tsc]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vnc]]></category>

		<guid isPermaLink="false">http://www.alfersoft.com.ar/blog/?p=123</guid>
		<description><![CDATA[From a terminal type: sudo apt-get install xtightvncviewer Image source]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" title="FAQ" src="http://www.alfersoft.com.ar/files/question.png" alt="" width="48" height="48" /></p>
<p>From a terminal type:<br />
<code><br />
sudo apt-get install xtightvncviewer<br />
</code></p>
<h6><a title="Lock" href="http://commons.wikimedia.org/wiki/File:Gnome-dialog-question.svg" target="_blank">Image source</a></h6>
]]></content:encoded>
			<wfw:commentRss>http://www.alfersoft.com.ar/blog/2010/02/19/how-do-i-add-vnc-to-terminal-server-client-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

