<?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>Reflections // Images And Words &#187; Computer Science</title>
	<atom:link href="http://www.henningweiler.de/category/computer-science/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.henningweiler.de</link>
	<description>Images And Words - reflections from around the globe</description>
	<lastBuildDate>Tue, 08 Nov 2011 21:16:47 +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>Mendeley, bibtex and the web page citation fiasco</title>
		<link>http://www.henningweiler.de/2011/11/08/mendeley-bibtex-and-the-web-page-citation-fiasco/</link>
		<comments>http://www.henningweiler.de/2011/11/08/mendeley-bibtex-and-the-web-page-citation-fiasco/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 21:09:44 +0000</pubDate>
		<dc:creator>henning</dc:creator>
				<category><![CDATA[Chaos]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[citation]]></category>
		<category><![CDATA[mendeley]]></category>
		<category><![CDATA[webpage]]></category>

		<guid isPermaLink="false">http://www.henningweiler.de/?p=124</guid>
		<description><![CDATA[Here is a work-around for the insufficiently-functioning Mendeley bibtex export for web page/URL citations. The issue is that a) the URL is exported as &#8216;url =&#8217; and not &#8216;howpublished =&#8217; and b) there is no &#8216;last accessed&#8217; (aka &#8216;last viewed&#8217; or &#8216;last checked&#8217;) field&#8230; This little workflow and command line might help someone. Create a [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a work-around for the insufficiently-functioning <a href="http://mendeley.com/">Mendeley</a> bibtex export for web page/URL citations. The issue is that a) the URL is exported as &#8216;url =&#8217; and not &#8216;howpublished =&#8217; and b) there is no &#8216;last accessed&#8217; (aka &#8216;last viewed&#8217; or &#8216;last checked&#8217;) field&#8230;</p>
<p>This little workflow and command line might help someone.</p>
<p><span id="more-124"></span></p>
<ol>
<li>Create a separate collection for your webpage citations</li>
<li>Move all webpage citations into the new collection and delete them from you default bibliography collection</li>
<li>Mark all items of the webpage collection and go to File-&gt;Export&#8230;</li>
<li>Choose webpage_temp.bib as your export target in your LaTeX tree</li>
<li>Run the following command below</li>
<li>Edit the new file webpages.bib and check that all the &#8220;Last Accessed&#8221; descriptors are OK (Mendeley does not export the &#8220;Last Accessed&#8221; field into bibtex; therefore a fixed date is used in there&#8230;)</li>
<li>Use webpage.bib in your LaTeX file (example of how it looks below)</li>
</ol>
<p>The command line is:</p>
<pre>cat webpages_temp.bib | \
sed "s/url =/howpublished =/g" | \
sed "s/{http/{\\\url{http/g" | \
sed "s/howpublished.*}/&amp; [Online. Last accessed: 2011-11-06]}/g" &gt; webpages.bib</pre>
<p>Here is an example of how it looks in the document (alpha style):</p>
<p style="text-align: center;"><a href="http://www.henningweiler.de/wp-content/uploads/2011/11/webpage_cite_example.png"><img class="aligncenter size-full wp-image-127" title="webpage_cite_example" src="http://www.henningweiler.de/wp-content/uploads/2011/11/webpage_cite_example.png" alt="" width="743" height="98" /></a></p>
<p style="text-align: left;">I use this little script in the make file for the LaTeX compilation. Works for me : )</p>
<p>The entry before the script (as it came from Mendeley):</p>
<pre>@misc{Ishida2011,
author = {Ishida, Richard},
booktitle = {W3C},
keywords = {cultural name differences,name ambiguity,name structure},
title = {{Personal names around the world}},
url = {http://www.w3.org/International/questions/qa-personal-names},
year = {2011}
}</pre>
<p>The same entry after the script:</p>
<pre>@misc{Ishida2011,
author = {Ishida, Richard},
booktitle = {W3C},
keywords = {cultural name differences,name ambiguity,name structure},
title = {{Personal names around the world}},
howpublished = {\url{http://www.w3.org/International/questions/qa-personal-names} [Online. Last accessed: 2011-11-06]},
year = {2011}
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.henningweiler.de/2011/11/08/mendeley-bibtex-and-the-web-page-citation-fiasco/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL: Drop ALL tables of a database</title>
		<link>http://www.henningweiler.de/2011/05/14/mysql-drop-all-tables-of-a-database/</link>
		<comments>http://www.henningweiler.de/2011/05/14/mysql-drop-all-tables-of-a-database/#comments</comments>
		<pubDate>Sat, 14 May 2011 15:52:24 +0000</pubDate>
		<dc:creator>henning</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[delete all tables]]></category>
		<category><![CDATA[drop table]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.henningweiler.de/?p=113</guid>
		<description><![CDATA[After looking around for a while, here is a little recipe to efficiently drop all tables from a MySQL database. Background story: If you have sufficient access rights to the MySQL server, you could easily drop database dbname; and create database dbname; If circumstances don&#8217;t allow you to drop and create this way, here are two ways [...]]]></description>
			<content:encoded><![CDATA[<p>After looking around for a while, here is a little recipe to efficiently drop all tables from a MySQL database.</p>
<p>Background story: If you have sufficient access rights to the MySQL server, you could easily <strong>drop database dbname; </strong>and <strong>create database dbname;</strong></p>
<p>If circumstances don&#8217;t allow you to drop and create this way, here are two ways on how you could do it from the (Gnu/Linux) shell:</p>
<blockquote><p>$ mysql -u&lt;dbuser&gt; -p&lt;dbpass&gt; -e &#8220;show tables&#8221; -N &lt;dbname&gt; | sed -e &#8220;s/.*/DROP TABLE IF EXISTS \`&amp;\`;/&#8221; | mysql -u&lt;dbuser&gt; -p&lt;dbpass&gt; &lt;dbname&gt;</p></blockquote>
<p>or</p>
<blockquote><p>$ mysqldump -u&lt;dbuser&gt; -p&lt;dbpass&gt; &#8211;no-data &#8211;add-drop-table &lt;dbname&gt; | grep ^DROP | mysql -u&lt;dbuser&gt; -p&lt;dbpass&gt; &lt;dbname&gt;</p></blockquote>
<p>Of course, you have to replace the following:</p>
<p>&lt;dbuser&gt;: Database user; e.g. &#8220;testuser&#8221; (without the quotes)<br />
&lt;dbpass&gt;: Database password; e.g. &#8220;test1ng&#8221; (without the quotes)<br />
&lt;dbname&gt;: Database name; e.g. &#8220;testdatabase&#8221; (without the quotes)</p>
<p>Cheers!</p>
<p>PS: [Compiled from post and comments under http://edwardawebb.com/linux/drop-tables-mysql-database-deletion]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.henningweiler.de/2011/05/14/mysql-drop-all-tables-of-a-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LaTeX tweak: Continuous enumeration over multiple sections</title>
		<link>http://www.henningweiler.de/2010/04/14/latex-tweak-continuous-enumeration-over-multiple-sections/</link>
		<comments>http://www.henningweiler.de/2010/04/14/latex-tweak-continuous-enumeration-over-multiple-sections/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 16:16:23 +0000</pubDate>
		<dc:creator>henning</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[continuous enumeration]]></category>
		<category><![CDATA[counter]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.henningweiler.de/?p=103</guid>
		<description><![CDATA[Soo&#8230;I move this from a former page to a post. At some point last year, I needed a solution for a problem in LaTeX, where I wanted to continue an enumeration over several paragraphs. Read on and find out how I did it. Cheers! OK, I came across a problem, when trying to use something [...]]]></description>
			<content:encoded><![CDATA[<p>Soo&#8230;I move this from a former page to a post.</p>
<p>At some point last year, I needed a solution for a problem in LaTeX, where I wanted to continue an enumeration over several paragraphs.</p>
<p>Read on and find out how I did it. </p>
<p>Cheers!</p>
<p><span id="more-103"></span></p>
<p>OK, I came across a problem, when trying to use something like the following:</p>
<p><code>\chapter{c1}  <br />
\section{s1}  <br />
\subsection{sub1}  <br />
Q1 - foo0 <br />
Q2  - bar0  </code></p>
<p><code>\subsection{sub2}  <br />
Q3 - foo1 <br />
Q4 - bar1  </code></p>
<p><code>\subsection{sub3}  <br />
Q5 - foo2 <br />
Q6 - bar2</code></p>
<p>So I tried. Hard. But could not get this to work. Finally, I used several counters to do the job. Not very nice but it works:</p>
<p><code>\chapter{c1}  <br />
% init new counters Rcount and Tcount <br />
\newcounter{Rcount} <br />
\newcounter{Tcount}  </code></p>
<p><code>\subsection{subX}  <br />
%Tell the list to use counter Rcount, and use a custom label (RQ-arabicnumberOfCounter) <br />
\begin{list}{Q-\arabic{Rcount}}{\usecounter{Rcount} \setlength{\rightmargin}{\leftmargin}} <br />
%since the  list environment  sets the used counter to zero, we need to use the second counter and load it into Rcount. <br />
&nbsp; \setcounter{Rcount}{\value{Tcount}} <br />
&nbsp; \item fooX <br />
&nbsp; \item barX <br />
\end{list}  </code></p>
<p><code>%when the list is finished, write the value or Rcount back to the backup counter. <br />
\addtocounter{Tcount}{\value{Rcount}}</code></p>
<p>That&#8217;s it. Hopefully it helps somebody. For any questions, just contact me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.henningweiler.de/2010/04/14/latex-tweak-continuous-enumeration-over-multiple-sections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac OS X Snow Leopard Authentication Problem</title>
		<link>http://www.henningweiler.de/2009/10/07/mac-os-x-snow-leopard-authentication-problem/</link>
		<comments>http://www.henningweiler.de/2009/10/07/mac-os-x-snow-leopard-authentication-problem/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 10:02:08 +0000</pubDate>
		<dc:creator>henning</dc:creator>
				<category><![CDATA[Chaos]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[HCI]]></category>
		<category><![CDATA[keyboard layout]]></category>
		<category><![CDATA[MacOS]]></category>

		<guid isPermaLink="false">http://www.henningweiler.de/?p=95</guid>
		<description><![CDATA[Hi Folks, A while back, I upgraded my Mac OS X Leopard to Snow Leopard and encountered some strange behavior which did not allow me to authenticate anymore. This lead to very ugly situations where no software could be installed anymore (since the dialog didn&#8217;t fire up to enter the password) and some settings could [...]]]></description>
			<content:encoded><![CDATA[<p>Hi Folks,<br />
A while back, I upgraded my Mac OS X Leopard to Snow Leopard and encountered some strange behavior which did not allow me to authenticate anymore. This lead to very ugly situations where no software could be installed anymore (since the dialog didn&#8217;t fire up to enter the password) and some settings could not be changed.</p>
<p>Some installs later, I figured it was a Problem with the alternative keyboard layout I&#8217;m using. This particular layout has been put together by Jan &#038; Nils [1] and puts the German Umlauts on some of the keys by utilizing the option key. The problem arose when the alternative German Umlaut keyboard Layout had been installed.</p>
<p>For a solution see the entire article.<br />
<span id="more-95"></span></p>
<p>So I scanned through the logs and found this essentially:<br />
<code><br />
windowserver.log<br />
------</p>
<p>Sep 11 17:26:17  [317] kCGErrorIllegalArgument: CGXSetWindowFilter: Invalid filter 2<br />
Sep 11 17:26:17  [317] kCGErrorIllegalArgument: CGXReleaseCIFilter: Invalid filter 2</p>
<p>system.log<br />
------</p>
<p>Sep 11 17:27:47 H9s-MacBook-Pro SecurityAgent[709]: CFDictionarySetValue(): immutable collection 0x100114b40 given to mutating function<br />
Sep 11 17:27:47 H9s-MacBook-Pro SecurityAgent[709]: NSExceptionHandler has recorded the following exception:\nNSUncaughtSystemExceptionException -- Uncaught system exception: signal 5\nStack trace:  0x7fff824482d3  0x7fff874850aa  0x158  0x7fff83b38ab7  0x7fff849f2d7c  0x7fff849cff0d  0x7fff849cf58b  0x7fff849cee79  0x7fff849d6db0  0x7fff849d6b28  0x7fff849c85a1  0x7fff849c805b  0x7fff849c7b31  0x7fff849c79b1  0x7fff849c790c  0x7fff82c19520  0x7fff82c18e89  0x7fff82bdea7d  0x1000020ae  0x100001f58  0x1<br />
Sep 11 17:27:47 H9s-MacBook-Pro SecurityAgent[710]: CFDictionarySetValue(): immutable collection 0x100407b00 given to mutating function<br />
Sep 11 17:27:47 H9s-MacBook-Pro SecurityAgent[710]: NSExceptionHandler has recorded the following exception:\nNSUncaughtSystemExceptionException -- Uncaught system exception: signal 5\nStack trace:  0x7fff824482d3  0x7fff874850aa  0x158  0x7fff83b38ab7  0x7fff849f2d7c  0x7fff849cff0d  0x7fff849cf58b  0x7fff849cee79  0x7fff849d6db0  0x7fff849d6b28  0x7fff849c85a1  0x7fff849c805b  0x7fff849c7b31  0x7fff849c79b1  0x7fff849c790c  0x7fff82c19520  0x7fff82c18e89  0x7fff82bdea7d  0x1000020ae  0x100001f58  0x1<br />
</code></p>
<p>Soo after that, I figured out this possible but very ugly Solution:</p>
<p><code><br />
rm /Users/username/Library/Preferences/ByHost/com.apple.HIToolbox.SomeUUIDhere.plist<br />
</code></p>
<p>But now I found a better and finally working solution:</p>
<p>Put your alternative layout (in my case called roman.bundle) in <em>/Library/Keyboard Layouts/</em> and <strong>not</strong> in <em>/Users/username/Library/Keyboard Layouts/</em>. Meaning: make the layout available to all users.</p>
<p>Hope this helps someone.</p>
<p>Cheers</p>
<p>[1] http://hci.rwth-aachen.de/USGermanKeyboard</p>
]]></content:encoded>
			<wfw:commentRss>http://www.henningweiler.de/2009/10/07/mac-os-x-snow-leopard-authentication-problem/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>[Extension] XEN Mixed Networking (translation from referenced German howto)</title>
		<link>http://www.henningweiler.de/2009/09/11/extension-xen-mixed-networking-translation-from-referenced-german-howto/</link>
		<comments>http://www.henningweiler.de/2009/09/11/extension-xen-mixed-networking-translation-from-referenced-german-howto/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 10:28:25 +0000</pubDate>
		<dc:creator>henning</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Hetzner]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://www.henningweiler.de/?p=93</guid>
		<description><![CDATA[This is a translation of the Hetzner Dokuwiki Article &#8220;Xen mit Routing-Setup und zusätzlicher (interner) Bridge&#8221; [1] which I mentioned in my last post about XEN Networking [2]. [1] http://wiki.hetzner.de/index.php/Xen_mit_Routing_und_Bridge [2] http://www.henningweiler.de/?p=85 1. Preparation First, you copy &#8216;vif-route&#8217; to &#8216;vif-virtual&#8217; and &#8216;network-route&#8217; to &#8216;network-virtual. Both are located in /etc/xen/scripts. The, you&#8217;ll have to patch the [...]]]></description>
			<content:encoded><![CDATA[<p>This is a translation of the Hetzner Dokuwiki Article &#8220;Xen mit Routing-Setup und zusätzlicher (interner) Bridge&#8221; [1] which I mentioned in my last post about XEN Networking [2]. </p>
<p>[1] http://wiki.hetzner.de/index.php/Xen_mit_Routing_und_Bridge<br />
[2] http://www.henningweiler.de/?p=85</p>
<p><span id="more-93"></span></p>
<p><strong>1. Preparation</strong></p>
<p>First, you copy &#8216;vif-route&#8217; to &#8216;vif-virtual&#8217; and &#8216;network-route&#8217; to &#8216;network-virtual. Both are located in /etc/xen/scripts. The, you&#8217;ll have to patch the file &#8216;vif-virtual&#8217; :</p>
<p><code><br />
 --- vif-route   2008-04-25 15:03:45.000000000 +0200<br />
 +++ vif-virtual 2008-05-02 14:29:22.725192247 +0200<br />
 @@ -47,6 +47,11 @@<br />
      done<br />
  fi</p>
<p> +# add/remove vif to internalbridge<br />
 +if [ `echo "${vif}" | grep -e ".*\-br$"` ]; then<br />
 +    brctl ${ipcmd}if xeninternbr0 ${vif}<br />
 +fi<br />
 +<br />
  handle_iptable</p>
<p>  log debug "Successful vif-route $command for $vif."<br />
</code></p>
<p>The host (dom0) has to have a bridge on startup, which you can create in /etc/network/interfaces and give it an internal IP. Mine looks something like this:</p>
<p><code><br />
auto xenintbr<br />
iface xenintbr inet static<br />
  address   10.10.10.100<br />
  netmask   255.0.0.0<br />
  pre-up /usr/sbin/brctl addbr xenintbr<br />
  post-up /usr/sbin/tunctl -t tap0<br />
  post-up /usr/sbin/brctl addif xenintbr tap0<br />
  post-down /sbin/ifconfig xenintbr down<br />
  post-down /usr/sbin/brctl delbr xenintbr<br />
  post-down /usr/sbin/tunctl -d tap0<br />
#  bridge_maxwait 0<br />
#  bridge_fd 0<br />
#  bridge_hello 0<br />
#  bridge_stp off<br />
  post-up /sbin/ifconfig xenintbr 10.10.10.100 netmask 255.0.0.0<br />
</code></p>
<p>Now edit the file /etc/xen/xend-config.sxp and substitute the vif-route and network-route entries with the following entries:</p>
<p><code><br />
 (network-script network-virtual)<br />
 (vif-script     vif-virtual)<br />
</code></p>
<p><strong>2. DomU Configuration</strong></p>
<p>The configuration for the virtual Network Interfaces for the corresponding DomU configuration file has to be setup in the following way:</p>
<p><code><br />
 vif = [ 'ip=xx.xx.xx.xx,mac=aa:bb:cc:dd:ee:ff,vifname=domUname-vif',<br />
 'mac=aa:bb:cc:dd:ee:ff,vifname=domUname-vif-br']<br />
</code></p>
<p>The first line describes the public IP(v4) address in your providers subnet. The second line describes the internal interface. Remember to change the MAC Adresses for both interfaces since those have to be different!</p>
<p>The extension &#8216;-vif&#8217; or &#8216;-vif-br&#8217; determines if the interface is connected to the external interface or to the internal bridge, whereby the &#8216;-vif-br&#8217; resembles the bridge. With the configuration shown above, the domU will have two interfaces (eth0 and eth1) where eth0 points to the external interface and eth1 to the internal bridge.</p>
<p><strong>3. Finishing Touches</strong></p>
<p>To be able to use the network, the domU internal network configuration in /etc/network/interfaces has to be changed to hold an internal IP address on eth1 (which corresponds to an IP address in the subnet you specified in the bridge configuration).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.henningweiler.de/2009/09/11/extension-xen-mixed-networking-translation-from-referenced-german-howto/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Exim Helpers</title>
		<link>http://www.henningweiler.de/2009/08/16/exim-helpers/</link>
		<comments>http://www.henningweiler.de/2009/08/16/exim-helpers/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 12:36:14 +0000</pubDate>
		<dc:creator>henning</dc:creator>
				<category><![CDATA[Computer Science]]></category>

		<guid isPermaLink="false">http://www.henningweiler.de/?p=90</guid>
		<description><![CDATA[Hi there, in the &#8216;old days&#8217; I&#8217;ve been using the Exim MTA and just found a few helpful commands, which I thought might help some people also. Here we go&#8230; Count frozen messages in mail queue: exim4 -bpr &#124; grep frozen &#124; wc -l Remove all frozen messages from the mail queue: mailq &#124; awk [...]]]></description>
			<content:encoded><![CDATA[<p>Hi there,</p>
<p>in the &#8216;old days&#8217; I&#8217;ve been using the Exim MTA and just found a few helpful commands, which I thought might help some people also. Here we go&#8230;</p>
<p>Count frozen messages in mail queue:<br />
<code>exim4 -bpr | grep frozen | wc -l</code></p>
<p>Remove all frozen messages from the mail queue:<br />
<code>mailq | awk '/frozen/ { print $3 }' | xargs exim4 -Mrm</code></p>
<p>Remove ALL messages from the mail queue:<br />
<code>mailq | awk '/<>/ {print $3}' | xargs exim4 -Mrm</code></p>
<p>That&#8217;s it&#8230;</p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.henningweiler.de/2009/08/16/exim-helpers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>XEN Mixed Networking (Direct Routing + Internal Bridge)</title>
		<link>http://www.henningweiler.de/2009/08/15/xen-mixed-networking-direct-routing-internal-bridge/</link>
		<comments>http://www.henningweiler.de/2009/08/15/xen-mixed-networking-direct-routing-internal-bridge/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 20:16:18 +0000</pubDate>
		<dc:creator>henning</dc:creator>
				<category><![CDATA[Chaos]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.henningweiler.de/?p=85</guid>
		<description><![CDATA[Hi Everybody, in order to setup a new server, I had to deal with this more or less troublesome topic. I want to give everybody a hint who is facing trouble with this. The Setup: - Debian Lenny (Kernel 2.6.26-2-xen-amd64) 64 Bit host and 64 Bit guests - xen-hypervisor 3.2-1 The Goal: I. have a [...]]]></description>
			<content:encoded><![CDATA[<p>Hi Everybody,</p>
<p>in order to setup a new server, I had to deal with this more or less troublesome topic. I want to give everybody a hint who is facing trouble with this.</p>
<p>The Setup:<br />
- Debian Lenny (Kernel 2.6.26-2-xen-amd64) 64 Bit host and 64 Bit guests<br />
- xen-hypervisor 3.2-1</p>
<p>The Goal:<br />
I. have a directly routed interface for the public IPs<br />
II. create a virtual LAN between the domUs<br />
III. let the hosts on the virtual LAN talk to the outside world (those are mostly the domUs, which do not have a public IP)</p>
<p>First, for I. and II. go ahead and apply the tutorial in [1]</p>
<p>In addition to that, I had to perform the following operations:<br />
<strong>edit /etc/xen/scripts/vif-common.sh</strong> and add the two lines indicated</p>
<p><code>vifname=$(xenstore_read_default "$XENBUS_PATH/vifname" "")<br />
if [ "$vifname" ]<br />
then<br />
  if [ "$command" == "online" ] &#038;&#038; ! ip link show "$vifname" >&#038;/dev/null<br />
  then<br />
    do_or_die ip link set "$vif" down ### ADD THIS LINE<br />
    do_or_die ip link set "$vif" name "$vifname"<br />
    do_or_die ip link set "$vifname" up ### ADD THIS LINE<br />
  fi<br />
  vif="$vifname"<br />
fi</code></p>
<p>Ok, now there is something you should keep in mind:<br />
While editing your domU config be sure to <strong>keep the vifname parameter SHORT</strong>!! I called it &#8216;mysql-mirror-vif-br&#8217; which was way too long, which then resulted in a non-starting script. The script did not tell me anything. Not on stdout not in the logs. Now it&#8217;s &#8216;mymirr-vif-br&#8217; which is fine.</p>
<p>For III. do the following for every IP you want to have internet access from the inside of the respective domU:</p>
<p><code>iptables -t nat -A POSTROUTING -o eth0 -s virtualLanIP/32 -j MASQUERADE</code></p>
<p>Hope this helps someone. </p>
<p>Cheers!</p>
<p>[1] Hetzner Dokuwiki: http://wiki.hetzner.de/index.php/Xen_mit_Routing_und_Bridge</p>
]]></content:encoded>
			<wfw:commentRss>http://www.henningweiler.de/2009/08/15/xen-mixed-networking-direct-routing-internal-bridge/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Digital Evolution</title>
		<link>http://www.henningweiler.de/2009/06/07/digital-evolution/</link>
		<comments>http://www.henningweiler.de/2009/06/07/digital-evolution/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 18:52:59 +0000</pubDate>
		<dc:creator>henning</dc:creator>
				<category><![CDATA[Chaos]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Social Science]]></category>

		<guid isPermaLink="false">http://www.henningweiler.de/?p=81</guid>
		<description><![CDATA[Hello everybody, I recently discovered two videos which were sent to me and made my brain work quiet a lot. Check it out folks: Did you know? (YouTube) Epic 2015 in German (YouTube) Tell me what you think.]]></description>
			<content:encoded><![CDATA[<p>Hello everybody,<br />
I recently discovered two videos which were sent to me and made my brain work quiet a lot. Check it out folks:</p>
<p><a href='http://www.youtube.com/watch?v=FdTOFkhaplo' >Did you know? (YouTube)</a></p>
<p><a href='http://www.youtube.com/watch?v=HO1fNh3jcZk' >Epic 2015 in German (YouTube)</a></p>
<p>Tell me what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.henningweiler.de/2009/06/07/digital-evolution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CUPS and Multiple Identical Printers</title>
		<link>http://www.henningweiler.de/2009/01/20/cups-and-multiple-identical-printers/</link>
		<comments>http://www.henningweiler.de/2009/01/20/cups-and-multiple-identical-printers/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 12:25:24 +0000</pubDate>
		<dc:creator>henning</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[CUPS]]></category>
		<category><![CDATA[FS-1030D]]></category>
		<category><![CDATA[Kyocera]]></category>
		<category><![CDATA[multiple identical printers]]></category>

		<guid isPermaLink="false">http://www.henningweiler.de/?p=70</guid>
		<description><![CDATA[CUPS (Common Unix Printing System) and multiple identical printers can be a pain in the butt. Especially, if the printer manufacturers are naughty and do not make the printers serial number public on usb connect. This shall be a little how-to for all those people who discover the same trouble! The setup I had to [...]]]></description>
			<content:encoded><![CDATA[<p>CUPS (Common Unix Printing System) and multiple identical printers can be a pain in the butt. Especially, if the printer manufacturers are naughty and do not make the printers serial number public on usb connect.</p>
<p>This shall be a little how-to for all those people who discover the same trouble!</p>
<p><span id="more-70"></span></p>
<p>The setup I had to deal with:<br />
- Ubuntu (x64 Server)<br />
- CUPS 1.2.8<br />
- 2x Kyocera Mita FS-1030D attached via USB</p>
<p>The problem:<br />
If you connect both printers, they both get the same ID:<br />
<code><br />
# lsusb<br />
Bus 004 Device 093: ID 0482:0015 Kyocera Corp.<br />
Bus 004 Device 092: ID 0482:0015 Kyocera Corp.<br />
</code></p>
<p>AND (even worse) are both mapped to usb://Kyocera/FS-1030D</p>
<p>An auto-installation on the cups web interface will result in a success, BUT you&#8217;ll only be able to print on the first of the two USB devices. So not a good solution.</p>
<p>OK, this is where you want to go:</p>
<p>1. Set up the printer(s) using the web interface.<br />
2. Fire up your console and goto /dev/<br />
3. Find the files usblp0 and usblp1 (depending on your system, there might be a sub folder named &#8216;usb&#8217;. If so, see if there are two files named &#8216;lp0&#8242; and &#8216;lp1&#8242; in existance) and pad yourself on the back ;)<br />
4. Edit /etc/cups/printers.conf with your favourite editor.<br />
5. You&#8217;ll find the first printer which looks like this:<br />
<code><br />
&lt;Printer Kyocera_FS-1030D_USB_1&gt;<br />
Info Kyocera FS-1030D<br />
Location Local Printer<br />
DeviceURI usb://Kyocera/FS-1030D<br />
State Idle<br />
StateTime 1231879830<br />
Accepting Yes<br />
Shared Yes<br />
JobSheets none none<br />
QuotaPeriod 0<br />
PageLimit 0<br />
KLimit 0<br />
OpPolicy default<br />
ErrorPolicy retry-job<br />
</Printer><br />
</code><br />
Leave it like this!! (Otherwise, CUPS web interface will harass you with newly found printers.)</p>
<p>6. Right under the first printer you&#8217;ll find the second printer (and the third, the fourth, [...]) named &lt;Printer Kyocera_FS-1030D_USB_2&gt; for example. THERE (and on possibly other following identical printers) change the following line<br />
<code><br />
DeviceURI usb://Kyocera/FS-1030D<br />
</code><br />
to<br />
<code><br />
DeviceURI file:/dev/usblp1<br />
</code><br />
The other printers below need their equivalent usb device link. You could to a<br />
<code><br />
# echo usblp1 > /dev/usblp1<br />
</code><br />
which will actually print the word &#8216;usblp1&#8242; on the printer. If you do so with all of your printers, you&#8217;ll know the device link ;)</p>
<p>Ok, we are not quite there, yet. I found a strange behaviour of CUPS, when you switch the printers off over night and turn them on again the next morning. Somehow, having this configuration, CUPS simply quits without following any shutdown procedures. No log entries, no good bye letter, nothing.</p>
<p>In order to detect and overcome this situation, this little script monitors the cups daemon and restarts it if necessary:</p>
<p><code><br />
#!/bin/bash<br />
#<br />
# cupsMon.sh -- A Monitor for CUPS<br />
#<br />
# @author Henning Weiler<br />
# @version 1.0<br />
#</p>
<p>if [ -r /var/run/cups/cupsd.pid ]; then<br />
  CUPSPID=$(cat /var/run/cups/cupsd.pid)</p>
<p>  if ps --pid $CUPSPID | grep "cupsd" >/dev/null; then<br />
    exit 0<br />
  else<br />
    rm -f /var/run/cups/cupsd.pid /var/run/cups/cups.sock<br />
    /etc/init.d/cupsys start<br />
  fi<br />
else<br />
  /etc/init.d/cupsys start<br />
fi<br />
</code><br />
I put it in my root home directory and gave it a little &#8216;chmod +x&#8217;.</p>
<p>In your /etc/crontab add the following line:<br />
<code><br />
9 * * * * root /root/cupsMon.sh >> /dev/null<br />
</code><br />
This will run the monitor every 9 minutes. I did not want to run it every minute, since switching on multiple printers may take a while.</p>
<p>If you have any questions or concerns, please comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.henningweiler.de/2009/01/20/cups-and-multiple-identical-printers/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>update&#8211;second edition.</title>
		<link>http://www.henningweiler.de/2008/12/11/update-second-edition/</link>
		<comments>http://www.henningweiler.de/2008/12/11/update-second-edition/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 20:11:22 +0000</pubDate>
		<dc:creator>henning</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[engine]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.henningweiler.de/?p=59</guid>
		<description><![CDATA[Wow, just updated and already out-dated. So here comes the newest update of the blog engine and with it a new gallery system! Yes, I need to create the content for the gallery little by little and probably, I won&#8217;t be able to import all the stuff from the old ones, but I will upload [...]]]></description>
			<content:encoded><![CDATA[<p>Wow,<br />
just updated and already out-dated. So here comes the newest update of the blog engine and with it a new gallery system! Yes, I need to create the content for the gallery little by little and probably, I won&#8217;t be able to import all the stuff from the old ones, but I will upload some nice pictures for sure! So find the <a href="http://www.henningweiler.de/?page_id=53">gallery link</a> in the menu above and have a look. I&#8217;m open for suggestions.<br />
Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.henningweiler.de/2008/12/11/update-second-edition/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

