<?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>miscellaneous.debris &#187; Linux</title>
	<atom:link href="http://www.miscdebris.net/blog/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.miscdebris.net/blog</link>
	<description>A blog about my research work, computer and internet stuff, personal life.</description>
	<lastBuildDate>Mon, 21 Jun 2010 21:28:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>cmake module to find Gnu Scientific Library, FindGSL.cmake</title>
		<link>http://www.miscdebris.net/blog/2010/06/21/cmake-module-to-find-gnu-scientific-library-findgsl-cmake/</link>
		<comments>http://www.miscdebris.net/blog/2010/06/21/cmake-module-to-find-gnu-scientific-library-findgsl-cmake/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 21:27:19 +0000</pubDate>
		<dc:creator>Werner</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MacOSX]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[cmake]]></category>
		<category><![CDATA[gsl]]></category>

		<guid isPermaLink="false">http://www.miscdebris.net/blog/?p=233</guid>
		<description><![CDATA[There is no official FindGSL.cmake module in the cmake distribution to &#8220;automagically&#8221; find the Gnu Scientific Library on Windows, Linux and Mac OS X. I have written such a module which works for my configurations, but might not cover all GSL installation on all OS. But you can modify it to fit your needs. Anyway, [...]]]></description>
			<content:encoded><![CDATA[<p>There is no official FindGSL.cmake module in the cmake distribution to &#8220;automagically&#8221; find the Gnu Scientific Library on Windows, Linux and Mac OS X. I have written such a module which works for my configurations, but might not cover all GSL installation on all OS. But you can modify it to fit your needs.</p>
<p><span id="more-233"></span></p>
<p>Anyway, below you&#8217;ll find the source code of my FindGSL.cmake module.</p>
<pre class="brush: plain;">
# Try to find gnu scientific library GSL
# See
# http://www.gnu.org/software/gsl/  and
# http://gnuwin32.sourceforge.net/packages/gsl.htm
#
# Based on a script of Felix Woelk and Jan Woetzel
# (www.mip.informatik.uni-kiel.de)
#
# It defines the following variables:
#  GSL_FOUND - system has GSL lib
#  GSL_INCLUDE_DIRS - where to find headers
#  GSL_LIBRARIES - full path to the libraries
#  GSL_LIBRARY_DIRS, the directory where the PLplot library is found.

#  CMAKE_GSL_CXX_FLAGS  = Unix compiler flags for GSL, essentially &quot;`gsl-config --cxxflags`&quot;
#  GSL_LINK_DIRECTORIES = link directories, useful for rpath on Unix
#  GSL_EXE_LINKER_FLAGS = rpath on Unix

set( GSL_FOUND OFF )
set( GSL_CBLAS_FOUND OFF )

# Windows, but not for Cygwin and MSys where gsl-config is available
if( WIN32 AND NOT CYGWIN AND NOT MSYS )
	# look for headers
  find_path( GSL_INCLUDE_DIR
    NAMES gsl/gsl_cdf.h gsl/gsl_randist.h
    )
  if( GSL_INCLUDE_DIR )
  	# look for gsl library
    find_library( GSL_LIBRARY
      NAMES gsl
    )
    if( GSL_LIBRARY )
      set( GSL_INCLUDE_DIRS ${GSL_INCLUDE_DIR} )
      get_filename_component( GSL_LIBRARY_DIRS ${GSL_LIBRARY} PATH )
      set( GSL_FOUND ON )
    endif( GSL_LIBRARY )

		# look for gsl cblas library
    find_library( GSL_CBLAS_LIBRARY
        NAMES gslcblas
      )
    if( GSL_CBLAS_LIBRARY )
      set( GSL_CBLAS_FOUND ON )
    endif( GSL_CBLAS_LIBRARY )

    set( GSL_LIBRARIES ${GSL_LIBRARY} ${GSL_CBLAS_LIBRARY} )
  endif( GSL_INCLUDE_DIR )

  mark_as_advanced(
    GSL_INCLUDE_DIR
    GSL_LIBRARY
    GSL_CBLAS_LIBRARY
  )
else( WIN32 AND NOT CYGWIN AND NOT MSYS )
  if( UNIX OR MSYS )
		find_program( GSL_CONFIG_EXECUTABLE gsl-config
			/usr/bin/
			/usr/local/bin
		)

		if( GSL_CONFIG_EXECUTABLE )
			set( GSL_FOUND ON )

      # run the gsl-config program to get cxxflags
      execute_process(
        COMMAND sh &quot;${GSL_CONFIG_EXECUTABLE}&quot; --cflags
        OUTPUT_VARIABLE GSL_CFLAGS
        RESULT_VARIABLE RET
        ERROR_QUIET
        )
      if( RET EQUAL 0 )
        string( STRIP &quot;${GSL_CFLAGS}&quot; GSL_CFLAGS )
        separate_arguments( GSL_CFLAGS )

        # parse definitions from cflags; drop -D* from CFLAGS
        string( REGEX MATCHALL &quot;-D[^;]+&quot;
          GSL_DEFINITIONS  &quot;${GSL_CFLAGS}&quot; )
        string( REGEX REPLACE &quot;-D[^;]+;&quot; &quot;&quot;
          GSL_CFLAGS &quot;${GSL_CFLAGS}&quot; )

        # parse include dirs from cflags; drop -I prefix
        string( REGEX MATCHALL &quot;-I[^;]+&quot;
          GSL_INCLUDE_DIRS &quot;${GSL_CFLAGS}&quot; )
        string( REPLACE &quot;-I&quot; &quot;&quot;
          GSL_INCLUDE_DIRS &quot;${GSL_INCLUDE_DIRS}&quot;)
        string( REGEX REPLACE &quot;-I[^;]+;&quot; &quot;&quot;
          GSL_CFLAGS &quot;${GSL_CFLAGS}&quot;)

        message(&quot;GSL_DEFINITIONS=${GSL_DEFINITIONS}&quot;)
        message(&quot;GSL_INCLUDE_DIRS=${GSL_INCLUDE_DIRS}&quot;)
        message(&quot;GSL_CFLAGS=${GSL_CFLAGS}&quot;)
      else( RET EQUAL 0 )
        set( GSL_FOUND FALSE )
      endif( RET EQUAL 0 )

      # run the gsl-config program to get the libs
      execute_process(
        COMMAND sh &quot;${GSL_CONFIG_EXECUTABLE}&quot; --libs
        OUTPUT_VARIABLE GSL_LIBRARIES
        RESULT_VARIABLE RET
        ERROR_QUIET
        )
      if( RET EQUAL 0 )
        string(STRIP &quot;${GSL_LIBRARIES}&quot; GSL_LIBRARIES )
        separate_arguments( GSL_LIBRARIES )

        # extract linkdirs (-L) for rpath (i.e., LINK_DIRECTORIES)
        string( REGEX MATCHALL &quot;-L[^;]+&quot;
          GSL_LIBRARY_DIRS &quot;${GSL_LIBRARIES}&quot; )
        string( REPLACE &quot;-L&quot; &quot;&quot;
          GSL_LIBRARY_DIRS &quot;${GSL_LIBRARY_DIRS}&quot; )
      else( RET EQUAL 0 )
        set( GSL_FOUND FALSE )
      endif( RET EQUAL 0 )

			MARK_AS_ADVANCED(
				GSL_CFLAGS
			)
			message( STATUS &quot;Using GSL from ${GSL_PREFIX}&quot; )
		else( GSL_CONFIG_EXECUTABLE )
			message( STATUS &quot;FindGSL: gsl-config not found.&quot;)
		endif( GSL_CONFIG_EXECUTABLE )
	endif( UNIX OR MSYS )
endif( WIN32 AND NOT CYGWIN AND NOT MSYS )

if( GSL_FOUND )
  if( NOT GSL_FIND_QUIETLY )
    message( STATUS &quot;FindGSL: Found both GSL headers and library&quot; )
  endif( NOT GSL_FIND_QUIETLY )
else( GSL_FOUND )
  if( GSL_FIND_REQUIRED )
    message( FATAL_ERROR &quot;FindGSL: Could not find GSL headers or library&quot; )
  endif( GSL_FIND_REQUIRED )
endif( GSL_FOUND )
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.miscdebris.net/blog/2010/06/21/cmake-module-to-find-gnu-scientific-library-findgsl-cmake/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use curl to download a file from sourceforge (mirror)</title>
		<link>http://www.miscdebris.net/blog/2010/04/06/use-curl-to-download-a-file-from-sourceforge-mirror/</link>
		<comments>http://www.miscdebris.net/blog/2010/04/06/use-curl-to-download-a-file-from-sourceforge-mirror/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 19:09:53 +0000</pubDate>
		<dc:creator>Werner</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MacOSX]]></category>

		<guid isPermaLink="false">http://www.miscdebris.net/blog/?p=205</guid>
		<description><![CDATA[Sometimes one wants to download a source package or similar from sourceforge with curl and not with the browser, e.g. in a script where one wants to download a package automatically. It turns out, that due the latest changes in the download system of sourceforge this is not straightforward. Assume you want to download the [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes one wants to download a source package or similar from sourceforge with curl and not with the browser, e.g. in a script where one wants to download a package automatically. It turns out, that due the latest changes in the download system of sourceforge this is not straightforward.<span id="more-205"></span></p>
<p>Assume you want to download the binutils binary package from the <a href="http://www.mingw.org" target="_blank">MinGW project</a>. If you go to the <a href="http://sourceforge.net/projects/mingw/files/GNU%20Binutils/binutils-2.20.1/binutils-2.20.1-2-mingw32-bin.tar.gz/download" target="_blank">download site of binutils</a> and click on &#8220;direct link&#8221; you get &#8220;http://downloads.sourceforge.net/project/mingw/GNU%20Binutils/binutils-2.20.1/binutils-2.20.1-2-mingw32-bin.tar.gz&#8221;. If you just use &#8220;curl -O URL&#8221; nothing happens. Adding the option &#8220;-v&#8221; some more output is shown:</p>
<pre>* About to connect() to downloads.sourceforge.net port 80 (#0)
*   Trying 216.34.181.59... connected
* Connected to downloads.sourceforge.net (216.34.181.59) port 80 (#0)
&gt; GET /project/mingw/GNU%20Binutils/binutils-2.20.1/binutils-2.20.1-2-mingw32-bin.tar.gz HTTP/1.1
&gt; User-Agent: curl/7.16.4 (i386-apple-darwin9.0) libcurl/7.16.4 OpenSSL/0.9.7l zlib/1.2.3
&gt; Host: downloads.sourceforge.net
&gt; Accept: */*
&gt;
&lt; HTTP/1.1 302 Found
&lt; X-Powered-By: PHP/5.2.9
&lt; Content-Disposition: attachment; filename="binutils-2.20.1-2-mingw32-bin.tar.gz"
&lt; Location: http://surfnet.dl.sourceforge.net/project/mingw/GNU%20Binutils/binutils-2.20.1/binutils-2.20.1-2-mingw32-bin.tar.gz
&lt; Content-type: text/html
&lt; Content-Length: 0
&lt; Date: Tue, 06 Apr 2010 18:50:34 GMT
&lt; Server: lighttpd/1.4.26
&lt;
* Connection #0 to host downloads.sourceforge.net left intact
* Closing connection #0</pre>
<p>Sourceforge redirects to a mirror server, but curl doesn&#8217;t follow it. Fortunately the &#8220;-L&#8221; option tells curl to follow this redirection. So</p>
<pre>curl -L -O http://downloads.sourceforge.net/project/mingw/GNU%20Binutils/binutils-2.20.1/binutils-2.20.1-2-mingw32-bin.tar.gz</pre>
<p>works. This <a href="http://sourceforge.net/apps/trac/sourceforge/ticket/7375" target="_blank">sourceforge trac ticket</a> provided the information. Additionally it&#8217;s possible to shorten the URL a bit. Instead of the long URL above you could also use:</p>
<pre>http://downloads.sourceforge.net/sourceforge/mingw/binutils-2.20.1-2-mingw32-bin.tar.gz</pre>
<p>Ok, it&#8217;s not that much shorter but still. I&#8217;m not sure if this always works, at least for MinGW packages it does.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.miscdebris.net/blog/2010/04/06/use-curl-to-download-a-file-from-sourceforge-mirror/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My User options file for SciTE</title>
		<link>http://www.miscdebris.net/blog/2010/03/05/my-user-options-file-for-scite/</link>
		<comments>http://www.miscdebris.net/blog/2010/03/05/my-user-options-file-for-scite/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 09:30:05 +0000</pubDate>
		<dc:creator>Werner</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.miscdebris.net/blog/?p=184</guid>
		<description><![CDATA[SciTE is a great text editor &#8211; in fact I tested a lot of text editors on Linux, Windows and Mac OS X, but always come back to SciTE since it is comfortable but still fast and small. Everytime I install SciTE on a machine I change the settings so that they fit my need. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.scintilla.org/SciTE.html" target="_blank">SciTE</a> is a great text editor &#8211; in fact I tested a lot of text editors on Linux, Windows and Mac OS X, but always come back to SciTE since it is comfortable but still fast and small. Everytime I install SciTE on a machine I change the settings so that they fit my need. It&#8217;s time to post them somewhere, so that I modify SciTE the next time faster <img src='http://www.miscdebris.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .<span id="more-184"></span></p>
<p>Go to Options-&gt;Open User Options File and paste the following</p>
<pre class="brush: plain;">
if PLAT_GTK
  position.left=15
  position.top=32
  position.width=800
  position.height=700
statusbar.visible=1
line.margin.visible=1
load.on.activate=1
toolbar.visible=1
caret.line.back=#FFF600
caret.line.back.alpha=50

# Indentation
tabsize=2
indent.size=2
use.tabs=1

open.filter=\
$(all.files)\
All Source|$(source.files)|\
$(filter.ada)\
$(filter.conf)\
$(filter.asm)\
$(filter.bash)\
$(filter.caml)\
$(filter.cmake)\
$(filter.cpp)\
$(filter.ch)\
$(filter.css)\
$(filter.d)\
$(filter.fortran)\
$(filter.inno)\
$(filter.java)\
$(filter.js)\
$(filter.kix)\
$(filter.lua)\
$(filter.pascal)\
$(filter.perl)\
$(filter.php)\
$(filter.properties)\
$(filter.ps)\
$(filter.python)\
$(filter.r)\
$(filter.tcl)\
$(filter.tex)\
$(filter.text)\
$(filter.vb)

#font.base=font:!Bitstream Vera Sans Mono,size:11
font.base=font:!Monospace,size:11
font.small=font:!Monospace,size:10
font.comment=font:!Monospace,size:11
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.miscdebris.net/blog/2010/03/05/my-user-options-file-for-scite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Debian Etch as guest in Virtualbox</title>
		<link>http://www.miscdebris.net/blog/2010/03/04/install-debian-etch-as-guest-in-virtualbox/</link>
		<comments>http://www.miscdebris.net/blog/2010/03/04/install-debian-etch-as-guest-in-virtualbox/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 19:43:53 +0000</pubDate>
		<dc:creator>Werner</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.miscdebris.net/blog/?p=180</guid>
		<description><![CDATA[In order to prepare Linux executables for distribution, it&#8217;s a good idea to compile the executable in an old Linux distribution. Thus it depends only on &#8220;old&#8221; versions of libraries and the executable should work on most distributions out there (which provide newer but backward compatible libraries). E.g. Dialogblocks, a RAD for wxWidgets, is built [...]]]></description>
			<content:encoded><![CDATA[<p>In order to prepare Linux executables for distribution, it&#8217;s a good idea to compile the executable in an old Linux distribution. Thus it depends only on &#8220;old&#8221; versions of libraries and the executable should work on most distributions out there (which provide newer but backward compatible libraries). E.g. <a href="http://www.dialogblocks.com" target="_blank">Dialogblocks</a>, a RAD for wxWidgets, is built in Debian Etch. If you don&#8217;t have a spare computer lying around it&#8217;s a good idea to install Debian Etch in a virtual machine like <a href="http://www.virtualbox.org/" target="_blank">VirtualBox</a>.<span id="more-180"></span></p>
<p>The following instructions are mainly taken from <a href="http://virtualboxes.org/doc/installing-guest-additions-on-debian/" target="_blank">this site</a>, but  I want to keep them on my site for reference. So</p>
<ul>
<li> first download <a href="http://www.debian.org/releases/etch/debian-installer/" target="_blank">Debian Etch</a>. The netinst CD image will suffice.</li>
<li>Create a new virtual machine, Linux/Debian, 1GB, create a new 20GB harddisc. Attach the downloaded iso image as cdrom.</li>
<li>Start the machine and install Debian Etch as usual.</li>
<li>After the installation process, update the system with &#8220;apt-get update&#8221; and &#8220;apt-get upgrade&#8221; as root.</li>
<li>Prepare system for kernel module build with &#8220;apt-get install build-essential module-assistant&#8221; as root.</li>
<li>As root run &#8220;m-a prepare&#8221; so that modules can be build.</li>
<li>Now mount the guest additions image, run &#8220;cd /cdrom&#8221; and &#8220;﻿ sh ./VBoxLinuxAdditions-x86.run&#8221; as root.</li>
</ul>
<p>In fact Debian Etch doesn&#8217;t run perfectly, e.g. you can&#8217;t change the screen size to any arbitrary value. And Debian crashes during a reboot. But it&#8217;s good enough to just compile your executable. The main development should still be done on your favorite OS/Linux distribution.</p>
<ul>
<li>reboot</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.miscdebris.net/blog/2010/03/04/install-debian-etch-as-guest-in-virtualbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Gnuplot 4.4.0 on Ubuntu Linux</title>
		<link>http://www.miscdebris.net/blog/2010/03/03/install-gnuplot-4-4-0-rc1-on-ubuntu-linux/</link>
		<comments>http://www.miscdebris.net/blog/2010/03/03/install-gnuplot-4-4-0-rc1-on-ubuntu-linux/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 16:02:56 +0000</pubDate>
		<dc:creator>Werner</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Research]]></category>

		<guid isPermaLink="false">http://www.miscdebris.net/blog/?p=164</guid>
		<description><![CDATA[The most frequented blog entries here are about installing Gnuplot on Ubuntu Linux or Mac OS X. These entries are still valid for the newer Ubuntu versions. But Gnuplot newest version 4.4.0 was already released, and in this release there are cairo based pdf and png terminals provided. So you don&#8217;t need the pdflib anymore. [...]]]></description>
			<content:encoded><![CDATA[<p>The most frequented blog entries here are about installing <a href="http://www.miscdebris.net/blog/2008/01/23/install-gnuplot-on-ubuntu-gutsy-gibbon/" target="_blank">Gnuplot on Ubuntu</a> Linux or <a href="http://www.miscdebris.net/blog/2009/09/16/install-gnuplot-on-mac-os-x/" target="_blank">Mac OS X</a>. These entries are still valid for the newer Ubuntu versions. But <a href="http://www.gnuplot.info" target="_blank">Gnuplot</a> newest version 4.4.0 was already released, and in this release there are cairo based pdf and png terminals provided. So you don&#8217;t need the <a href="http://www.pdflib.com/" target="_blank">pdflib</a> anymore. Below you&#8217;ll find updated instructions to compile and install Gnuplot 4.4.0 with wxt and pdfcairo terminal. These instructions were tested on Ubuntu 8.04 (Hardy Heron) and Ubuntu 9.10 (Karmic Koala) and should also work on 8.10 (Intrepid Ibex) and 9.04 (Jaunty Jackalop).<span id="more-164"></span></p>
<p><strong>Prerequisites</strong></p>
<p>We need to make sure some packages are already installed before we try to compile gnuplot</p>
<ul>
<li>libwxgtk2.8-dev &#8211; for the wxt terminal</li>
<li>libpango1.0-dev &#8211; for the cairo (pdf, png) and wxt terminals</li>
<li>libreadline5-dev &#8211; readline support (editing command lines)</li>
<li>libx11-dev and libxt-dev &#8211; X11 terminal</li>
<li>texinfo (optional) &#8211; needed for the tutorial</li>
<li>libgd2-xpm-dev (optional) &#8211; old png, jpeg and gif terminals based on libgd</li>
</ul>
<p>This command (run in a terminal) will install all prerequisites if not already installed:</p>
<p><code>sudo apt-get install libwxgtk2.8-dev libpango1.0-dev libreadline5-dev libx11-dev libxt-dev texinfo libgd2-xpm-dev</code></p>
<p>Then we download and compile gnuplot (run each command/line in a terminal)</p>
<ul>
<li><code>wget http://sourceforge.net/projects/gnuplot/files/gnuplot/4.4.0/gnuplot-4.4.0.tar.gz/download</code></li>
<li><code>tar xzf gnuplot-4.4.0.tar.gz</code></li>
<li><code>mkdir build &amp;&amp; cd build</code></li>
<li><code>../gnuplot-4.4.0/configure --with-readline=gnu</code></li>
</ul>
<p>check if you find the lines in the output at the bottom:</p>
<pre>X Window System terminal: yes
jpeg terminal: yes
gif terminal: yes (with animated gif)
png terminal: yes
    (jpeg, gif and png terminals can use TTF fonts)
wxt terminal: yes
cairo-based pdf and png terminals: yes
Readline library: GNU readline library with  -lncurses</pre>
<ul>
<li><code>make</code></li>
</ul>
<p>(if you have problems here with some latex errors than disable the latex tutorial during the configure stage with “<code>--without-tutorial</code>”, if you get a “103: makeinfo: not found” error message than install the texinfo package)</p>
<ul>
<li><code>sudo make install</code></li>
</ul>
<p>Then you have gnuplot installed with nice readline support (command line like in bash), a nice new wxWidgets terminal and a pdf terminal based on cairo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.miscdebris.net/blog/2010/03/03/install-gnuplot-4-4-0-rc1-on-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Create a movie file from single image files (png, jpegs)</title>
		<link>http://www.miscdebris.net/blog/2008/04/28/create-a-movie-file-from-single-image-files-png-jpegs/</link>
		<comments>http://www.miscdebris.net/blog/2008/04/28/create-a-movie-file-from-single-image-files-png-jpegs/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 11:49:29 +0000</pubDate>
		<dc:creator>Werner</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[movies]]></category>

		<guid isPermaLink="false">http://www.miscdebris.net/blog/?p=42</guid>
		<description><![CDATA[In research sometimes you want to make a movie from single images, like plots from experimental data or from calculation to visualize changes or so on. In order to achieve this you can use ffmpeg. First you have to create the images and save them, where the images need to have a continuous number in [...]]]></description>
			<content:encoded><![CDATA[<p>In research sometimes you want to make a movie from single images, like plots from experimental data or from calculation to visualize changes or so on. In order to achieve this you can use <a href="http://ffmpeg.mplayerhq.hu/" target="_blank">ffmpeg</a>. First you have to create the images and save them, where the images need to have a continuous number in the filename, e.g. img0001.png, img0002.png, &#8230;, &#8230;img5467.png. Take care that there is no image missing and that you have enough zeroes in front of the image number, so that the files are in the correct order.<span id="more-42"></span></p>
<p>After you have all the images in a folder, install ffmpeg, in Ubuntu/Debian Linux e.g.</p>
<pre>sudo apt-get install ffmpeg</pre>
<p>In order to make a movie (mp4 quicktime) out of the images you need to issue the following command</p>
<pre>ffmpeg -qscale 5 -r 20 -b 9600 -i img%04d.png movie.mp4</pre>
<p>The options are</p>
<ul>
<li>-qscale 5 &#8230; define fixed video quantizer scale (VBR) where 1 is the best and 31 the worst. Since mpeg/jpeg has problems to compress line graphics it&#8217;s a good idea to set this variable close to 1. You get a big movie file, but otherwise the movie doesn&#8217;t look, well, that good.</li>
<li>-r &#8230; framerate</li>
<li>-b &#8230; video bitrate</li>
<li>-i input files, %04d says that we have four numbers in the filename where the number is filled with zeros left of it.</li>
<li>movie.mp4 is the filename, the extension says that it is a quicktime movie. You can also create a Macromedia Flash movie by using the .flv extension.</li>
</ul>
<p>Links:</p>
<ul>
<li>Homepage, where I found most of these instructions: <a href="http://electron.mit.edu/~gsteele/ffmpeg/" target="_blank">http://electron.mit.edu/~gsteele/ffmpeg/</a></li>
<li>ffmpeg Homepage: <a href="http://ffmpeg.mplayerhq.hu/" target="_blank">http://ffmpeg.mplayerhq.hu/</a></li>
<li>ffmpeg Documentation: <a href="http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html" target="_blank">http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.miscdebris.net/blog/2008/04/28/create-a-movie-file-from-single-image-files-png-jpegs/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Changing the php file upload limit in Ubuntu Linux</title>
		<link>http://www.miscdebris.net/blog/2008/04/14/changing-the-php-file-upload-limit-in-ubuntu-linux/</link>
		<comments>http://www.miscdebris.net/blog/2008/04/14/changing-the-php-file-upload-limit-in-ubuntu-linux/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 13:46:17 +0000</pubDate>
		<dc:creator>Werner</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MacOSX]]></category>
		<category><![CDATA[ubuntu server php]]></category>

		<guid isPermaLink="false">http://www.miscdebris.net/blog/?p=34</guid>
		<description><![CDATA[If you have your own Ubuntu server running you may encounter the maximal file size upload limit in php scripts which is set to 2Mb as default. In order to change that we first have a look what the size actually is. In /var/www (standard www directory) create a file called info.php with the following [...]]]></description>
			<content:encoded><![CDATA[<p>If you have your own Ubuntu server running you may encounter the maximal file size upload limit in php scripts which is set to 2Mb as default. In order to change that we first have a look what the size actually is. In <code>/var/www</code> (standard www directory) create a file called <code>info.php</code> with the following content:</p>
<pre>&lt;?php
// Show all information, defaults to INFO_ALL
phpinfo();
?&gt;</pre>
<p><span id="more-34"></span>Then browse to this file via <code>http://localhost/info.php</code> (replace localhost with the servername if necessary) and look for the line</p>
<pre>upload_max_filesize 2M 2M</pre>
<p>which will show you the actual maximum file size. In order to change that open a ssh connection to your server and edit the file <code>/etc/php5/apache2/php.ini</code> with</p>
<pre>sudo nano /etc/php5/apache2/php.ini</pre>
<p>search for &#8220;upload_max_filesize&#8221; with Ctrl-W and change &#8220;2M&#8221; to &#8220;20M&#8221;. Save the file with Ctrl-O and exit with Ctrl-X. Restart the apache server with</p>
<pre>sudo /etc/init.d/apache2 restart
</pre>
<p>and visit again <code>http://localhost/info.php</code> to check if the maximum file size was changed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.miscdebris.net/blog/2008/04/14/changing-the-php-file-upload-limit-in-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mounting directory from Mac OS X host in Ubuntu Gutsy Gibbon guest in VirtualBox</title>
		<link>http://www.miscdebris.net/blog/2008/02/29/mounting-directory-from-mac-os-x-host-in-ubuntu-gutsy-gibbon-guest-in-virtualbox/</link>
		<comments>http://www.miscdebris.net/blog/2008/02/29/mounting-directory-from-mac-os-x-host-in-ubuntu-gutsy-gibbon-guest-in-virtualbox/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 14:30:41 +0000</pubDate>
		<dc:creator>Werner</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MacOSX]]></category>

		<guid isPermaLink="false">http://www.miscdebris.net/blog/2008/02/29/mounting-directory-from-mac-os-x-host-in-ubuntu-gutsy-gibbon-guest-in-virtualbox/</guid>
		<description><![CDATA[There is a new beta version of VirtualBox for Mac OS X available and installing Ubuntu Gutsy Gibbon worked like a charm (in opposition to Parallels). The only problem I encountered was, that it was not possible to mount a directory from the Mac OS X host in the guest system with either the internal [...]]]></description>
			<content:encoded><![CDATA[<p>There is a <a href="http://www.virtualbox.org/wiki/Downloads" target="_blank">new beta version</a> of VirtualBox for Mac OS X available and installing Ubuntu Gutsy Gibbon worked like a charm (in opposition to Parallels). The only problem I encountered was, that it was not possible to mount a directory from the Mac OS X host in the guest system with either the internal mechanism (Folder sharing) and just directly via samba. In the latter case I could mount the host directory and could view it once, but than the mount was always busy and I had no access anymore. But I found another solution: sshfs. Here is a short introduction how to do that:</p>
<p><span id="more-32"></span></p>
<ul>
<li>Install sshfs via &#8220;sudo apt-get install sshfs&#8221;</li>
<li>Add your user to the fuse group &#8220;sudo adduser user fuse&#8221; and logout/login to become member of this group.</li>
<li>On the Mac OS X host allow ssh access: System Preferences-&gt;Sharing, Service &#8220;Remote Login&#8221;. Make sure your user is allowed to access via ssh</li>
<li> Make a directory where you want to mount the host directory, e.g. &#8220;mkdir ~/MacDocs&#8221;</li>
<li>Than mount a directory from the host with &#8220;sshfs -o uid=1000,gid=1000 username@server:/Users/username/ ~/MacDocs&#8221;. Here the uid and gid should be of your username, have a look in /etc/passwd. That&#8217;s it.</li>
<li>Unmount the directory with fusermount -u MacDocs.</li>
</ul>
<p>Links: <a href="http://wiki.ubuntuusers.de/FUSE/sshfs" target="_blank">http://wiki.ubuntuusers.de/FUSE/sshfs</a> (German), <a href="http://ubuntu.wordpress.com/2005/10/28/how-to-mount-a-remote-ssh-filesystem-using-sshfs/" target="_blank">http://ubuntu.wordpress.com/2005/10/28/how-&#8230;&#8230;&#8230;-sshfs/</a>, <a href="http://wiki.ubuntuusers.de/SSH" target="_blank">http://wiki.ubuntuusers.de/SSH</a> (German)</p>
<p>It&#8217;s also possible to have the directory <a href="http://wiki.ubuntuusers.de/SSH" target="_blank">automounted at system start</a>, but I never managed to not enter my password or passphrase, so I just run a script with the &#8220;sshfs &#8230;&#8221; command if I need access to the host.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.miscdebris.net/blog/2008/02/29/mounting-directory-from-mac-os-x-host-in-ubuntu-gutsy-gibbon-guest-in-virtualbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install gnuplot on Ubuntu Gutsy Gibbon</title>
		<link>http://www.miscdebris.net/blog/2008/01/23/install-gnuplot-on-ubuntu-gutsy-gibbon/</link>
		<comments>http://www.miscdebris.net/blog/2008/01/23/install-gnuplot-on-ubuntu-gutsy-gibbon/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 15:50:20 +0000</pubDate>
		<dc:creator>Werner</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.miscdebris.net/blog/2008/01/23/install-gnuplot-on-ubuntu-gutsy-gibbon/</guid>
		<description><![CDATA[I again have updated these instructions for Gnuplot 4.4.0 RC1 and newer Ubuntu versions. Find them in this post. Some months ago I wrote a small Howto about installing Gnuplot on Ubuntu Feisty Fawn with readline, pdf and wxWidgets terminal support. It turned out, that this howto was of interest for many people, since this [...]]]></description>
			<content:encoded><![CDATA[<p><strong>I again have updated these instructions for Gnuplot 4.4.0 RC1 and newer Ubuntu versions. Find them in<a href="http://www.miscdebris.net/blog/2010/03/03/install-gnuplot-4-4-0-rc1-on-ubuntu-linux/" target="_self"> this post</a>.</strong></p>
<p>Some months ago I wrote a small <a href="http://www.miscdebris.net/blog/2007/04/27/install-gnuplot-on-ubuntu/">Howto</a> about installing <a href="http://www.gnuplot.info/" target="_blank">Gnuplot</a> on Ubuntu Feisty Fawn with readline, pdf and wxWidgets terminal support. It turned out, that this howto was of interest for many people, since this blog post was the most visited until Gutsy Gibbon came out &#8211; and the readline problem was obviously solved, since it works now if you install the standard Gnuplot package. Still the pdf and wxWidgets terminal are not compiled in by default, therefore I wrote a new (shorter) howto about including this terminals.</p>
<p>So here are the instructions:<span id="more-31"></span></p>
<p>Instead of compiling wxWidgets on our own, we just get the libwxgtk2.8-dev package. The version number is only at 2.8.4 (and wxWidgets already reached 2.8.7) but there shouldn&#8217;t be much problems.</p>
<p>Than we are going to install the PDFlib lite</p>
<ul>
<li>Download <a href="http://www.pdflib.com/en/download/free-software/pdflib-lite/" target="_blank">PDFlib Lite</a></li>
<li>tar xzf PDFlib-Lite-7.0.2.tar.gz</li>
<li>cd PDFlib-Lite-7.0.2</li>
<li>./configure</li>
<li>make</li>
<li>sudo paco -lD make install (or just sudo make install if you don&#8217;t use paco)</li>
<li>sudo ldconfig</li>
</ul>
<p>Then we compile gnuplot</p>
<ul>
<li>Download <a href="http://sourceforge.net/project/showfiles.php?group_id=2055" target="_blank">gnuplot 4.2.2</a></li>
<li>tar xzf gnuplot-4.2.2.tar.gz</li>
<li>cd gnuplot-4.2.2</li>
<li>./configure &#8211;with-readline=gnu (check if we have the lines &#8220;pdf terminal: yes&#8221; and &#8220;wxt terminal: yes (EXPERIMENTAL)&#8221;, if you miss the jpeg, png and gif terminal install the libgd2-xpm-dev package; also check if you find &#8220;Readline library: GNU readline library with  -lncurses&#8221;, if it says only minimal readline support than install the libreadline5-dev package; you need also the libx11-dev and libxt-dev package for the X11 terminal &#8211; libxt-dev package is normally not installed by default (at the <a href="http://ftp.debian.org/debian/pool/main/g/gnuplot/gnuplot_4.2.0-2.dsc" target="_blank">debian page about gnuplot</a> one can find the packages necessary to build gnuplot))</li>
<li>make (if you have problems here with some latex errors than disable the latex tutorial during the configure stage with &#8220;&#8211;without-tutorial&#8221;, if you get a &#8220;103: makeinfo: not found&#8221; error message than install the texinfo package)</li>
<li>sudo paco -lD make install  (or just sudo make install if you don&#8217;t use paco)</li>
</ul>
<p>Than you have gnuplot installed with nice readline support (command line like in bash), a nice new wxWidgets terminal and a pdf terminal also on Gutsy Gibbon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.miscdebris.net/blog/2008/01/23/install-gnuplot-on-ubuntu-gutsy-gibbon/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Speed up SSH X11 forwarding</title>
		<link>http://www.miscdebris.net/blog/2007/06/01/speed-up-ssh-x11-forwarding/</link>
		<comments>http://www.miscdebris.net/blog/2007/06/01/speed-up-ssh-x11-forwarding/#comments</comments>
		<pubDate>Fri, 01 Jun 2007 20:50:53 +0000</pubDate>
		<dc:creator>Werner</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.miscdebris.net/blog/?p=25</guid>
		<description><![CDATA[I use an Ubuntu server as a work-horse for my calculations and connect from my desktop-pc with ssh to the server. For some applications (gnuplot =) this is really slow altough it&#8217;s over LAN. I found on the internet some instructions to improve this situation: instead of the AES cipher the arcfour and blowfish ciphers [...]]]></description>
			<content:encoded><![CDATA[<p>I use an Ubuntu server as a work-horse for my calculations and connect from my desktop-pc with ssh to the server. For some applications (gnuplot =) this is really slow altough it&#8217;s over LAN. I found on the internet <a href="http://samat.org/weblog/20060508-best-ssh-options-for-x11-forwarding.html" target="_blank">some instructions</a> to improve this situation: instead of the AES cipher the arcfour and blowfish ciphers perform much better and switching on compression also doesn&#8217;t hurt. Therefore one should use</p>
<p><code>ssh -c arcfour,blowfish-cbc -XC host.com<br />
</code></p>
<p>to connect to with ssh. And guess what? This really improves the situation, especially for gnuplot. Thanks Samat!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.miscdebris.net/blog/2007/06/01/speed-up-ssh-x11-forwarding/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
