<?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</title>
	<atom:link href="http://www.miscdebris.net/blog/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>Sat, 16 Mar 2013 19:54:04 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Remove duplicate entries in &#8220;Open With&#8230;&#8221; Popup in Mac OS X (Mountain Lion)</title>
		<link>http://www.miscdebris.net/blog/2013/03/16/remove-duplicate-entries-in-open-with-popup-in-mac-os-x-mountain-lion/</link>
		<comments>http://www.miscdebris.net/blog/2013/03/16/remove-duplicate-entries-in-open-with-popup-in-mac-os-x-mountain-lion/#comments</comments>
		<pubDate>Sat, 16 Mar 2013 19:54:04 +0000</pubDate>
		<dc:creator>Werner</dc:creator>
				<category><![CDATA[MacOSX]]></category>

		<guid isPermaLink="false">http://www.miscdebris.net/blog/?p=251</guid>
		<description><![CDATA[After running Mac OS X for some years I encountered that the &#8220;Open With&#8230;&#8221; popup menu had multiple entries of one program listed, which was kind of annoying. I tried to find solutions for this, but couldn&#8217;t find one, until I eventually ask Dr. Google the right question and found a blog post about it. [...]]]></description>
				<content:encoded><![CDATA[<p>After running Mac OS X for some years I encountered that the &#8220;Open With&#8230;&#8221; popup menu had multiple entries of one program listed, which was kind of annoying. I tried to find solutions for this, but couldn&#8217;t find one, until I eventually ask Dr. Google the right question and found a <a href="http://itpixie.com/2011/05/fix-duplicate-old-items-open-with-list/#.UUTLB1uKJyE" target="_blank">blog post </a>about it. Anyway, all you have to do is to start the Terminal.app and run</p>
<pre class="brush: bash; title: ; notranslate">
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/\
LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local\
-domain system -domain user
</pre>
<p>Then restart the Finder.app or restart the computer. Worked well with Mountain Lion!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.miscdebris.net/blog/2013/03/16/remove-duplicate-entries-in-open-with-popup-in-mac-os-x-mountain-lion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Greens library by Peter Koval and Stephan Fritzsche</title>
		<link>http://www.miscdebris.net/blog/2010/08/29/the-greens-library-by-peter-koval-and-stephan-fritzsche/</link>
		<comments>http://www.miscdebris.net/blog/2010/08/29/the-greens-library-by-peter-koval-and-stephan-fritzsche/#comments</comments>
		<pubDate>Sun, 29 Aug 2010 19:36:34 +0000</pubDate>
		<dc:creator>Werner</dc:creator>
				<category><![CDATA[Research]]></category>

		<guid isPermaLink="false">http://www.miscdebris.net/blog/?p=240</guid>
		<description><![CDATA[In of my former research projects I wrote a Single Scatter Cluster code (called YaSC) where I made use of &#8220;The Greens library&#8221;. I found it quite useful to test my own routines against functions of this library as well as the Gnu Scientific Library. While the latter is still around and alive is the [...]]]></description>
				<content:encoded><![CDATA[<p>In of my former research projects I wrote a Single Scatter Cluster code (called YaSC) where I made use of &#8220;The Greens library&#8221;. I found it quite useful to test my own routines against functions of this library as well as the <a href="http://www.gnu.org/software/gsl/" target="_blank">Gnu Scientific Library</a>. While the latter is still around and alive is the Greens library not to be found in the net anymore. Since I found it quite useful and I&#8217;m sure it&#8217;s useful to others as well I&#8217;m publishing the code again.</p>
<p><span id="more-240"></span>In the Readme file the Greens library is described as:</p>
<blockquote>
<div id="_mcePaste">This is the C++ Greens library. It provides a tool for calculation of the Coulomb wave functions and Coulomb Green&#8217;s functions both in nonrelativistic and relativistic framework.</div>
</blockquote>
<p>I found nowhere in the code any license information at all, so I assume it is more or less public domain. The copyright is still by Peter Koval and Stephan Fritzsche. I hope someone finds this useful. This is the unmodified code of Koval and Fritzsche. I made some changes to the code so that it runs on modern Linux distributions and Mac OS X (including a CMakeLists.txt file) but I&#8217;m not sure if I&#8217;m allowed to distribute it, so I&#8217;ll contact the authors first.</p>
<p><a href="http://www.miscdebris.net/upload/Greens_adrj_v1_0.tar.gz">Download &#8220;The Greens Library&#8221;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.miscdebris.net/blog/2010/08/29/the-greens-library-by-peter-koval-and-stephan-fritzsche/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<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; title: ; notranslate">
# 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>4</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>1</slash:comments>
		</item>
		<item>
		<title>Solution for &#8220;My Mac OS X GUI program doesn&#8217;t get focus if it&#8217;s outside an application bundle&#8221;</title>
		<link>http://www.miscdebris.net/blog/2010/03/30/solution-for-my-mac-os-x-gui-program-doesnt-get-focus-if-its-outside-an-application-bundle/</link>
		<comments>http://www.miscdebris.net/blog/2010/03/30/solution-for-my-mac-os-x-gui-program-doesnt-get-focus-if-its-outside-an-application-bundle/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 20:15:55 +0000</pubDate>
		<dc:creator>Werner</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[MacOSX]]></category>

		<guid isPermaLink="false">http://www.miscdebris.net/blog/?p=194</guid>
		<description><![CDATA[This problem regularly comes up at the wxWidgets mailing list: You write an application for Mac OS X which utilizes a GUI and when you start the program, you can see the user interface, but the window doesn&#8217;t have the focus and also you can&#8217;t click it. So the window is not reactive in any [...]]]></description>
				<content:encoded><![CDATA[<p>This problem regularly comes up at the wxWidgets mailing list: You write an application for Mac OS X which utilizes a GUI and when you start the program, you can see the user interface, but the window doesn&#8217;t have the focus and also you can&#8217;t click it. So the window is not reactive in any way. Usually the answer is, that you should put your program in an application bundle, which is basically a folder which is called &#8220;something.app&#8221; (the executable needs to be copied to &#8220;Contents/MacOS&#8221; and you also might need to add an Info.plist file) and run the application bundle with &#8220;open something.app&#8221;. But there are situations where this is not really possible, e.g. you have some command line tool (PLplot program) and then you run some code which opens a GUI (wxWidgets driver for PLplot). If you write some easy program to calculate something and show a plot with the help of PLplot you don&#8217;t want to create an application bundle for that.<span id="more-194"></span></p>
<p>But there is a hack which I once found somewhere in the internet (I can&#8217;t find the source anymore, <a href="http://www.advogato.org/article/627.html" target="_blank">in this blog post</a> this topic is shortly discussed without providing the whole solution and the text reminds me of what I read about that years ago, but it&#8217;s not the source I used) which uses some undocumented features of Mac OS X and may not work for future versions of Mac OS X. But from at least 10.4 on to 10.6.2 this hack still works, so you may be on the safe side for now. Anyway, you need to add</p>
<pre class="brush: cpp; title: ; notranslate">
#ifdef __WXMAC__
    #include &lt;Carbon/Carbon.h&gt;
    extern &quot;C&quot; { void CPSEnableForegroundOperation(ProcessSerialNumber* psn); }
#endif
</pre>
<p>somewhere at the top of your code and then add</p>
<pre class="brush: cpp; title: ; notranslate">
    /* this hack enables to have a GUI on Mac OSX even if the
     * program was called from the command line (and isn't a bundle) */
#ifdef __WXMAC__
     ProcessSerialNumber psn;

     GetCurrentProcess( &amp;psn );
     CPSEnableForegroundOperation( &amp;psn );
     SetFrontProcess( &amp;psn );
#endif
</pre>
<p>e.g. somewhere at your program entrance . This will give focus to your wxWidgets app, although it&#8217;s not an application bundle. I use this hack successfully for the wxWidgets driver of PLplot for some years now, without problems. But as said there is no guarantee that this hack will work in future Mac OS X versions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.miscdebris.net/blog/2010/03/30/solution-for-my-mac-os-x-gui-program-doesnt-get-focus-if-its-outside-an-application-bundle/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Install Gnuplot 4.4.0 on Mac OS X</title>
		<link>http://www.miscdebris.net/blog/2010/03/25/install-gnuplot-4-4-0-on-mac-os-x/</link>
		<comments>http://www.miscdebris.net/blog/2010/03/25/install-gnuplot-4-4-0-on-mac-os-x/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 12:37:22 +0000</pubDate>
		<dc:creator>Werner</dc:creator>
				<category><![CDATA[MacOSX]]></category>
		<category><![CDATA[Research]]></category>

		<guid isPermaLink="false">http://www.miscdebris.net/blog/?p=190</guid>
		<description><![CDATA[In a former post I showed how Gnuplot 4.2.6 could be easily installed on Mac OS X. In the meantime Gnuplot 4.4.0 was released and although the wxWidgets terminal still doesn&#8217;t work on Mac OS X, there are the new cairo based terminals which provide png and pdf output. These terminals replace the gd terminals [...]]]></description>
				<content:encoded><![CDATA[<p>In a former <a href="http://www.miscdebris.net/blog/2009/09/16/install-gnuplot-on-mac-os-x/" target="_self">post</a> I showed how Gnuplot 4.2.6 could be easily installed on Mac OS X. In the meantime Gnuplot 4.4.0 was released and although the wxWidgets terminal still doesn&#8217;t work on Mac OS X, there are the new cairo based terminals which provide png and pdf output. These terminals replace the gd terminals (<a href="http://www.libgd.org/Main_Page" target="_blank">libgd</a> is not easily installed due it&#8217;s dependencies) and the old pdf terminal (which depends on the not-very-free <a href="http://www.pdflib.com/" target="_blank">pdflib</a>). Since gif and jpeg (libgd terminal) shouldn&#8217;t be used for plots anyways, this is no loss. Since these formats are the ones which I need mainly, I show in this post how we could compile and install Gnuplot with little effort, providing X11, png and pdf terminal (and others which are compiled in anyway).<span id="more-190"></span></p>
<p>First we need to download and install the GTK Framework, which was described <a href="http://www.miscdebris.net/blog/2010/02/19/gtk-framework-for-mac-os-x-as-well-as-cairo-pango/" target="_self">in this post</a>.  Basically you need to:</p>
<ol>
<li>Download the <a href="http://r.research.att.com/libs/GTK_2.18.5-X11.pkg" target="_blank">GTK_2.18.5-X11.pkg</a> package from <a href="http://r.research.att.com/" target="_blank">http://r.research.att.com/</a> and install it</li>
<li>Add to your .profile file in the home directory:
<pre class="brush: bash; title: ; notranslate">
export PATH=/Library/Frameworks/GTK+.framework/Resources/bin:$PATH
</pre>
</li>
<li>(Re)start Terminal.app and see if <code>pkg-config cairo --libs</code> works.</li>
</ol>
<p>Then download Gnuplot 4.4.0, untar, configure and compile it:</p>
<ol>
<li>Download Gnuplot 4.4.0 from <a href="http://sourceforge.net/projects/gnuplot/files/gnuplot/4.4.0/gnuplot-4.4.0.tar.gz/download" target="_blank">Sourceforge</a>.</li>
<li><code>tar xzf gnuplot-4.4.0.tar.gz</code></li>
<li><code>cd gnuplot-4.4.0</code></li>
<li><code>mkdir build &amp;&amp; cd build</code></li>
<li><code>../configure --with-readline=bsd --disable-wxwidgets<br />
</code>In the configure output you should find something like</p>
<pre>  wxt terminal: no (requires C++, wxWidgets&gt;2.6, cairo&gt;0.9, pango&gt;1.10)
  cairo-based pdf and png terminals: yes</pre>
</li>
<li><code>make</code></li>
<li><code>sudo make install</code></li>
</ol>
<p>Gnuplot will be installed in /usr/local/bin and should be ready to be used (if /usr/local/bin is in your path). pngcairo and pdfcairo are the new terminals you can use now. Gnuplot 4.4 has some <a href="http://www.gnuplot.info/announce.4.4.0" target="_blank">major improvements</a> so it may worth to install Gnuplot following these instructions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.miscdebris.net/blog/2010/03/25/install-gnuplot-4-4-0-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>47</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; title: ; notranslate">
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>2</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>37</slash:comments>
		</item>
		<item>
		<title>GTK-Framework for Mac OS X (as well as cairo, pango, &#8230;.)</title>
		<link>http://www.miscdebris.net/blog/2010/02/19/gtk-framework-for-mac-os-x-as-well-as-cairo-pango/</link>
		<comments>http://www.miscdebris.net/blog/2010/02/19/gtk-framework-for-mac-os-x-as-well-as-cairo-pango/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 14:07:42 +0000</pubDate>
		<dc:creator>Werner</dc:creator>
				<category><![CDATA[MacOSX]]></category>

		<guid isPermaLink="false">http://www.miscdebris.net/blog/?p=159</guid>
		<description><![CDATA[There is no official GTK framework for Mac OS X available. They are working hard on it, but in the moment you are forced to compile the framework on your own, though the instructions don&#8217;t look that complicated. You could also use macports or fink, but when I use them I always encounter some problems, [...]]]></description>
				<content:encoded><![CDATA[<p>There is no official <a href="http://www.gtk.org/" target="_blank">GTK</a> framework for Mac OS X available. <a href="http://gtk-osx.sourceforge.net/" target="_blank">They</a> are working hard on it, but in the moment you are forced to compile the framework on your own, though the <a href="http://sourceforge.net/apps/trac/gtk-osx/wiki/Build" target="_blank">instructions</a> don&#8217;t look that complicated. You could also use <a href="http://www.macports.org/" target="_blank">macports</a> or <a href="http://www.finkproject.org/" target="_blank">fink</a>, but when I use them I always encounter some problems, if a package doesn&#8217;t compile. I found an easy and fast solution to install the GTK framework for Mac OS X (using X11) and you also get cairo, pango and other libraries of the GTK project.<span id="more-159"></span> Actually it&#8217;s done in two simple steps:</p>
<ol>
<li>Download the <a href="http://r.research.att.com/libs/GTK_2.18.5-X11.pkg" target="_blank">GTK_2.18.5-X11.pkg</a> package from <a href="http://r.research.att.com/" target="_blank">http://r.research.att.com/</a> and install it</li>
<li>Add to your .profile file in the home directory:</li>
<pre class="brush: bash; title: ; notranslate">
export PATH=/Library/Frameworks/GTK+.framework/Resources/bin:$PATH
</pre>
</ol>
<p>Start Terminal.app and pkg-config is available, which is needed for configure or cmake. That&#8217;s it. I actually needed only the cairo and pango library to test the cairo drivers of <a href="http://plplot.sf.net" target="_blank">PLplot</a> on Mac OS X and so far this works without problems. Next I&#8217;ll try to compile <a href="http://www.gnuplot.info" target="_blank">Gnuplot</a> and and see if this works.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.miscdebris.net/blog/2010/02/19/gtk-framework-for-mac-os-x-as-well-as-cairo-pango/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
