<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>crustulus.de — erlesenste, handgeschriebene freie Software</title><link href="https://crustulus.de/" rel="alternate"></link><link href="https://crustulus.de/feeds/all.atom.xml" rel="self"></link><id>https://crustulus.de/</id><updated>2017-12-14T00:00:00+01:00</updated><entry><title>FreeDict — Takeaway Dictionaries</title><link href="https://crustulus.de/2017/12/freedict-takeaway-dictionaries/" rel="alternate"></link><published>2017-12-14T00:00:00+01:00</published><updated>2017-12-14T00:00:00+01:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2017-12-14:/2017/12/freedict-takeaway-dictionaries/</id><summary type="html">&lt;p&gt;FreeDict is a project to provide truly free translation dictionaries for any use
case scenario.
I'm proud to announce that our dictionaries are now available for you as a
"takeaway" using Aard2, a modern dictionary client for Android. In this
article, I'm going to give an overview what has been …&lt;/p&gt;</summary><content type="html">&lt;p&gt;FreeDict is a project to provide truly free translation dictionaries for any use
case scenario.
I'm proud to announce that our dictionaries are now available for you as a
"takeaway" using Aard2, a modern dictionary client for Android. In this
article, I'm going to give an overview what has been done so far, where to get
the dictionaries and how to install them.&lt;/p&gt;
&lt;p&gt;At our &lt;em&gt;FreeDict HackFest&lt;/em&gt; this year, we started working on getting our
dictionaries to a modern mobile platform. Since we are focusing on free and
open dictionaries, Android was a natural choice. The Aard project provides a
nice dictionary client, called
&lt;a href="https://play.google.com/store/apps/details?id=itkach.aard2&amp;amp;hl=en"&gt;Aard2&lt;/a&gt;.
&lt;img width="50%" style="float: right; margin: 10px;" alt="Screenshot of the Aard Android dictionary client" src="/images/screenshot_aard2.png"/&gt;&lt;/p&gt;
&lt;p&gt;Aard2 uses the 
&lt;a href="https://github.com/itkach/slob"&gt;slob format&lt;/a&gt;,
a binary format featuring nice formatting and compression.
There is already a converter from the
&lt;a href="https://de.wikipedia.org/wiki/Text_Encoding_Initiative"&gt;TEI format&lt;/a&gt;
(which is the format that FreeDict uses).
All the work left was to adjust &lt;code&gt;tei2slob&lt;/code&gt; to our needs. Thanks to Karl Bartel
for
taking care of this. The adoption of slob also required a handful of changes to our
&lt;a href="https://github.com/freedict/tools"&gt;tooling&lt;/a&gt; and after quite some work, all
dictionaries are now available in the slob format.&lt;/p&gt;
&lt;h3&gt;Getting The Dictionaries&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://freedict.org"&gt;Our website&lt;/a&gt; still needs a general redesign, therefore I
decided to provide a
&lt;a href="/en/freedict_downloads.html"&gt;temporary download page&lt;/a&gt;
with all the Aard dictionaries from FreeDict. The usage is very simple, just
install
&lt;a href="https://play.google.com/store/apps/details?id=itkach.aard2&amp;amp;hl=en"&gt;Aard2&lt;/a&gt;
from the playstore
or from &lt;a href="https://f-droid.org/en/packages/aarddict.android/"&gt;F-Droid&lt;/a&gt;
and download one of the
&lt;a href="/en/freedict_downloads.html"&gt;slob dictionaries&lt;/a&gt;
to your smartphone. Aard2 will take care of detecting the dictionary.&lt;/p&gt;
&lt;h3&gt;API Access&lt;/h3&gt;
&lt;p&gt;If you are fancy to make use of our data, you can simply integrate our API into
your application. You can retrieve a list of dictionaries from either&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;http://freedict.org/freedict-database.xml
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;or&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;http://freedict.org/freedict-database.json
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The releases of each dictionary section contains different platforms (as for
instance dictd or slob) and the URL provides direct access to the dictionary
file. Thinking
long-term, it would be great to directly integrate our API into Aard2, so that
users do not need to download dictionaries manually.&lt;/p&gt;</content></entry><entry><title>Why Fixing Bugs Is Actually Fun</title><link href="https://crustulus.de/2017/10/why-fixing-bugs-is-actually-fun/" rel="alternate"></link><published>2017-10-27T00:00:00+02:00</published><updated>2017-10-27T00:00:00+02:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2017-10-27:/2017/10/why-fixing-bugs-is-actually-fun/</id><summary type="html">&lt;p&gt;Last weekend I attended a
&lt;a href="https://wiki.debian.org/BSP/2017/10/at/Salzburg"&gt;Debian Bug Squashing Party in Salzburg&lt;/a&gt;, at which I applied
as &lt;a href="https://wiki.debian.org/DebianMaintainer"&gt;Debian Maintainer&lt;/a&gt;. In
contrast to my usual blog articles, I want to comment this time on the social
side of free software hacking and show that fixing bugs is actually a lot of
fun …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Last weekend I attended a
&lt;a href="https://wiki.debian.org/BSP/2017/10/at/Salzburg"&gt;Debian Bug Squashing Party in Salzburg&lt;/a&gt;, at which I applied
as &lt;a href="https://wiki.debian.org/DebianMaintainer"&gt;Debian Maintainer&lt;/a&gt;. In
contrast to my usual blog articles, I want to comment this time on the social
side of free software hacking and show that fixing bugs is actually a lot of
fun.&lt;/p&gt;
&lt;p&gt;‘Bug Squashing’ is developer slang way of saying ‚bug fixing’ and usually people
meet and work collaboratively on improving the quality of the packages in
Debian. When I visited my first BSP in Salzburg, I knew only that a &lt;code&gt;debian/&lt;/code&gt;
directory existed and wasn't sure how debhelper was going to help me. I was
surrounded by Developer's (&lt;strong&gt;DD&lt;/strong&gt;) and felt quite greenhornish. It didn't take
too long until I realized that I wasn't the only person to be new to packaging
and so I simply started reading packaging tutorials. It is not a secret that
Debian's (developer) documentation isn't particularly exhaustive, but the people
behind Debian are so friendly and helpful!&lt;/p&gt;
&lt;p&gt;&lt;img alt="Image from the main meeting room, a table full with cables, laptops and sweets. People are sitting around." src="http://static.computerwelt.at/uploads/pics/3._Debian_Bug_Squashing_Party_bei_conova_in_Salzburg__Debian_Entwickler__Maintainer_und_Unterstuetzer_des_Debian-Projektes__c__conova_communications_GmbH.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;There's always somebody in the IRC channel &lt;code&gt;#debian-mentors&lt;/code&gt; (&lt;code&gt;irc.oftc.net&lt;/code&gt;)
and being at a BSP speeds up the question-answer cycle dramatically. It makes
working on with unfamiliar tools fun.&lt;/p&gt;
&lt;p&gt;This year I focussed on
&lt;a href="https://github.com/brailleapps/dotify-cli/"&gt;dotify-cli&lt;/a&gt;, a software to convert
and emboss braille texts with an braille embosser. The author has split the
software into many small units and this results into a lot of packaging work.
Two days weren't enough to get the job done, but it was still an extreme
speed-up, because I would otherwise not have worked on it for two days.&lt;/p&gt;
&lt;p&gt;I'm maintaining packages in Debian for more than five years now and I never
considered to become an official
&lt;a href="https://wiki.debian.org/DebianMaintainer"&gt;Debian Maintainer&lt;/a&gt;,
mostly because I was too lazy to
apply. For people not familiar with the terminology: Debian Maintainer is a
privilege level which allows the package maintainer to upload certain packages
to the archive, without asking a Debian Developer for help.&lt;/p&gt;
&lt;p&gt;Packaging and programming is only one part of what makes a BSP fun. In the evenings, people do all
sorts of things. For instance, a few of us played a
&lt;a href="http://decisionproblem.com/paperclips/"&gt;simple game with the aim to flood the universe with paper clips&lt;/a&gt;,
while others enjoyed the night with a few drinks.&lt;/p&gt;
&lt;p&gt;Hopefully this article has made you curious and I'll see you in one of the upcoming
&lt;a href="https://wiki.debian.org/DebianEvents"&gt;Debian events&lt;/a&gt;! Just browse the list of
regions on the
&lt;a href="https://wiki.debian.org/DebianEvents"&gt;events page&lt;/a&gt;
or click the
&lt;a href="https://wiki.debian.org/BSP"&gt;BSP&lt;/a&gt; link to find the list of upcoming and past events.\
Tip: If you are unable to afford travel costs, Debian can
&lt;a href="https://wiki.debian.org/Teams/DPL/Reimbursement"&gt;sponsor&lt;/a&gt; some or all of your
travel expenses, so that this is &lt;strong&gt;no reason&lt;/strong&gt; to not attend!&lt;/p&gt;</content></entry><entry><title>Rust On L4re — Safe Language Meets Safe Microkernel</title><link href="https://crustulus.de/2017/07/rustonl4re-safelanguagemeetssafekernel/" rel="alternate"></link><published>2017-07-17T00:00:00+02:00</published><updated>2017-07-17T00:00:00+02:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2017-07-17:/2017/07/rustonl4re-safelanguagemeetssafekernel/</id><summary type="html">&lt;p&gt;I have started working on a port of Rust to &lt;a href="https://l4re.org"&gt;L4Re&lt;/a&gt;, Fiasco.OC or simply to the
L4 variant of the TU Dresden. It's a third-generation microkernel with many nice features, most
notably strong safety guarantees through complete isolation of components and
virtualisation of processes, but it lacks Rust support …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I have started working on a port of Rust to &lt;a href="https://l4re.org"&gt;L4Re&lt;/a&gt;, Fiasco.OC or simply to the
L4 variant of the TU Dresden. It's a third-generation microkernel with many nice features, most
notably strong safety guarantees through complete isolation of components and
virtualisation of processes, but it lacks Rust support.&lt;/p&gt;
&lt;h2&gt;Why Rust&lt;/h2&gt;
&lt;p&gt;Rust brings safety, concurrency and zero-cost abstractions to a world, where
normally programming in unsafe languages like C and partly C++ is the norm. On
the other hand, L4Re is a microkernel built on top of isolation and offers many
safety features, not found in other operating systems. Complementing this with
Rust's safety guarantees is the right thing to do.&lt;/p&gt;
&lt;p&gt;Rust has proven that it can be  as efficient as &lt;a href="http://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=rust&amp;amp;lang2=gpp"&gt;C++ or even close to
C&lt;/a&gt;.
Various projects already demonstrate Rusts usefulness
(e.g.  &lt;a href="https://github.com/servo/servo"&gt;Servo&lt;/a&gt;) and it is even used in systems
programming by the Rust OS &lt;a href="http://www.redox-os.org/"&gt;Redox&lt;/a&gt; and as a language for the
&lt;a href="https://robigalia.org/"&gt;userland of the SEl4 microkernel&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Roadmap&lt;/h2&gt;
&lt;p&gt;In the first phase, I have integrated Rustc into
&lt;a href="https://l4re.org/doc/l4re_build_system.html"&gt;BID (the L4Re build system)&lt;/a&gt;.
Phase two encompasses patching Rust's standard library. I'm in the middle of
this very process, the first patches have already landed in
&lt;a href="https://github.com/rust-lang/libc"&gt;liblibc (the libc binding library)&lt;/a&gt;.\
In the third phase, I will map L4Re's inter-process communication primitives
(IPC) to Rust's strong type system. This crucial for a microkernel OS, because
virtually all system services have to communicate in a safe, yet efficient
manner.&lt;/p&gt;
&lt;h2&gt;What Works&lt;/h2&gt;
&lt;p&gt;My aim is to bring Rust support to L4re, but also bring L4re support to Rust.
I have patched BID, so that Rust programs and libraries can be compiled for
L4re. This is in an early stage and is going to change in the future.&lt;/p&gt;
&lt;p&gt;The standard library of Rust consists of many small libraries, all united under
the &lt;code&gt;std&lt;/code&gt; crate. &lt;code&gt;std&lt;/code&gt; has not been ported yet, but all other libraries already
run smoothly.&lt;/p&gt;
&lt;h3&gt;Practical Insights&lt;/h3&gt;
&lt;p&gt;All of this is ready-to-use in a
&lt;a href="https://github.com/humenda/rustl4re"&gt;GitHub repository&lt;/a&gt; in the branch &lt;code&gt;stdlib&lt;/code&gt;.
Below, I'll explain what I did / how to reproduce this.&lt;/p&gt;
&lt;p&gt;If you are curious and want to try out Rust on L4re, you can already do so. You
will need a computer with GNU Make, GCC, GCC Multilib and Rust. I've tested it
on a GNU/Linux, but you might have success on other platforms, too.&lt;/p&gt;
&lt;p&gt;First of all, a L4Re snapshot is required, which you can download from
&lt;a href="http://l4re.org/download.html"&gt;http://l4re.org/download.html&lt;/a&gt;. This snapshot also contains l4linux which is
not required and causes trouble if you don't have the Linux headers available. I
hence suggest&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ &lt;span class="nb"&gt;cd&lt;/span&gt; *snapshot* &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; rm -rf src/l4linux
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;You have to configure and build your build tree then:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ make setup
$ make -j8
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;To avoid headache, you should set the OBJ variable, which points to the build
tree of L4/L4Re. Assuming that the current working directory is the root of the
snapshot, this can be accomplished like this&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;O&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;/obj/l4/amd64 &amp;gt;&amp;gt; src/l4//conf/Makeconf.local
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It could be that the above setting is not enough. When you later compile a
    program and it cannot find the object directory, change &lt;code&gt;O=&lt;/code&gt; to &lt;code&gt;OBJ_BASE=&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Please do not use spaces in your path.&lt;/li&gt;
&lt;li&gt;Please DO NOT use &lt;code&gt;~/&lt;/code&gt; to denote your home directory. This will lead to
    errors with no recognizable relation to the issue.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;With a basic L4Re system in place, adding a patch to build simple Rust binaries
is actually not too complicated. The patch is only 113 lines long.  You can
&lt;a href="https://paste.debian.net/976734"&gt;view the patch&lt;/a&gt; or download it
&lt;a href="https://paste.debian.net/download/976734"&gt;straight away&lt;/a&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ curl -o /tmp/l4.diff paste.debian.net/download/976734
$ &lt;span class="nb"&gt;cd&lt;/span&gt; path/to/l4/snapshot
$ patch -p0 &amp;lt; /tmp/l4.diff
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Most of the relevant changes are in the &lt;code&gt;src/l4/mk&lt;/code&gt; directory, in the files
&lt;code&gt;rules.mk&lt;/code&gt; and &lt;code&gt;binary.mk&lt;/code&gt;, used by &lt;code&gt;prog.mk&lt;/code&gt;. I won't explain all the changes
here. If you are familiar with make, you'll understand the changes after some
digging.&lt;/p&gt;
&lt;p&gt;An example (C) program is located in src/l4/pkg/hello. CChange to this
directory, remove the C source and add a &lt;code&gt;main.rs&lt;/code&gt; with the following content:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="cp"&gt;#![no_std]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="cp"&gt;#![feature(collections)]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="cp"&gt;#![feature(lang_items)]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="cp"&gt;#![feature(panic_unwind)]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;

&lt;span class="k"&gt;extern&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;crate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;panic_unwind&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="k"&gt;extern&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;crate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;libc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="cp"&gt;#[macro_use]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="k"&gt;extern&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;crate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;collections&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;

&lt;span class="k"&gt;use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;libc&lt;/span&gt;::&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;

&lt;span class="sd"&gt;/// Empty panic formatter...&lt;/span&gt;
&lt;span class="cp"&gt;#[lang=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;panic_fmt&amp;quot;&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="cp"&gt;#[no_mangle]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;panic_fmt&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-&amp;gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;loop&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// no handling&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;

&lt;span class="cp"&gt;#[no_mangle]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;extern&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;C&amp;quot;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_&lt;/span&gt;: &lt;span class="kt"&gt;i32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;_&lt;/span&gt;: &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="k"&gt;const&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="k"&gt;const&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;u8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-&amp;gt; &lt;span class="kt"&gt;i32&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;vec&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;unsafe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;I can count: &lt;/span&gt;&lt;span class="se"&gt;\0&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;as_ptr&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;elem&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;nums&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;unsafe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;%i, &lt;/span&gt;&lt;span class="se"&gt;\0&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;as_ptr&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;elem&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;unsafe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;&lt;/span&gt;&lt;span class="se"&gt;\n\0&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;as_ptr&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This program does nothing spectacular, in fact, it's pretty boring and
&lt;em&gt;verbose&lt;/em&gt;. This is because most of the convenience from the &lt;code&gt;std&lt;/code&gt; crate is
missing.\
The Makefile could look like this:&lt;/p&gt;
&lt;p&gt;```make^
PKGDIR   ?= .
L4DIR        ?= $(PKGDIR)/../..&lt;/p&gt;
&lt;p&gt;TARGET      = hello
SRC_RS      = main.rs&lt;/p&gt;
&lt;p&gt;REQUIRE_LIBS += libpanic-rust libcollections-rust libcore-rust liballoc-rust
export RUSTC_BOOTSTRAP=1&lt;/p&gt;
&lt;p&gt;include $(L4DIR)/mk/prog.mk
```&lt;/p&gt;
&lt;p&gt;Right, now you expect you could run that program? Not quite. Currently, Rust
needs custom core library versions to run on L4Re. The source code of these
libraries need to be packaged and built. This is automated by a script. If
you're curious, change to
&lt;a href="https://github.com/humenda/rustl4re/tree/stdlib/src/l4/pkg/libstd-rust"&gt;&lt;code&gt;src/l4/pkg/libstd-rust&lt;/code&gt;&lt;/a&gt;
in the mentioned GitHub repository and read the README.
I won't detail that here, because it's a temporary solution. But if the build
files have been generated, building the library is as easy as typing make in the
generated &lt;code&gt;build/&amp;lt;libname&amp;gt;&lt;/code&gt; directory.&lt;/p&gt;
&lt;h2&gt;Rust Is Already A Cross Compiler!&lt;/h2&gt;
&lt;p&gt;If you are more familiar with the Rust ecosystem, you might wonder why the
integration is not happening within the Rust compiler, because this one
already provides cross-compilation. The answer is a bit more difficult. The BID
is a sophisticated build system and using Cargo or
&lt;a href="https://github.com/japaric/xargo"&gt;Xargo&lt;/a&gt; would require
bypassing it.
Interoperability would become a nightmare. L4re has custom startup- and teardown code and
custom linker flags; it is best, if all of that is handled by BID itself. The
Rustc compiler should receive it's linking instructions from BID and carry out
the operation.&lt;/p&gt;
&lt;p&gt;In the future, if you grab a snapshot
from &lt;a href="https://l4re.org"&gt;L4Re.org&lt;/a&gt;, your Rust compiler will automatically be used
when you write Rust code within the L4Re source tree, only the target "l4re"
would need to be activated using &lt;a href="https://www.rustup.rs/"&gt;Rustup&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Integrating Rust into the BID doesn't mean that you have to throw away Cargo and all its convenience. In
fact, Cargo integration is a long-term goal. This is not easy, because both BID and
Cargo handle dependency management and define a "package" differently.&lt;/p&gt;
&lt;p&gt;L4re + Rust support is evolving, so stay tuned!&lt;/p&gt;</content></entry><entry><title>ISOlang - Efficient Language Code Handling In Rust</title><link href="https://crustulus.de/2017/03/isolang-efficient-language-code-handling-in-rust/" rel="alternate"></link><published>2017-03-19T00:00:00+01:00</published><updated>2017-03-19T00:00:00+01:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2017-03-19:/2017/03/isolang-efficient-language-code-handling-in-rust/</id><summary type="html">&lt;p&gt;When working with texts in different languages, the reliable identification of
them is problematic, because of conflicting standards.
For instance, Wikipedia uses ISO 639-1 codes (with two
letters) and FreeDict uses three-letter codes from the ISO 639-3 standard.
Converting between those can be tedious and retrieving an English name even …&lt;/p&gt;</summary><content type="html">&lt;p&gt;When working with texts in different languages, the reliable identification of
them is problematic, because of conflicting standards.
For instance, Wikipedia uses ISO 639-1 codes (with two
letters) and FreeDict uses three-letter codes from the ISO 639-3 standard.
Converting between those can be tedious and retrieving an English name even
more. The Rust crate &lt;strong&gt;&lt;em&gt;isolang&lt;/em&gt;&lt;/strong&gt; can make this very easy and fast.&lt;/p&gt;
&lt;p&gt;Using different language codes has it's use case for many applications. The
two-digit codes from the
&lt;a href="https://en.wikipedia.org/wiki/ISO_639"&gt;ISO 639-1&lt;/a&gt;
standard for instance are short and widely
used. They however don't map to all available languages, which is problematic
for less widely spoken languages, because these don't have a two-letter code. The
639-3 codes can map all available languages (past and present), but they are
often quite different to the 639-1 codes, so mapping between those is hard.&lt;/p&gt;
&lt;p&gt;Rust is known for its potential to optimize and for the &lt;strong&gt;&lt;em&gt;isolang&lt;/em&gt;&lt;/strong&gt; crate, I
decided to invest some time to make it perform fast. A key to this is to have
all information available during compile time, so that on program startup or
data access, no additional work needs to be done.&lt;/p&gt;
&lt;p&gt;The crate provides an
&lt;a href="https://docs.rs/isolang/0.1.0/isolang/enum.Language.html"&gt;&lt;code&gt;enum&lt;/code&gt;&lt;/a&gt;
with the ISO 639-3 codes and offers methods to
convert from and into 639-1 codes and into an English language string. Using the
three-letter language codes for the &lt;code&gt;enum&lt;/code&gt; was the most sensible solution, because
it allows the unique identification of all languages.&lt;/p&gt;
&lt;p&gt;As an example of the usage, have a look at this very short example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;use&lt;/span&gt; &lt;span class="nt"&gt;isolang&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nd"&gt;Language&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="nt"&gt;let&lt;/span&gt; &lt;span class="nt"&gt;iso_639_1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nt"&gt;Language&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nd"&gt;from_639_1&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;de&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;expect&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Illegal ISO 639-1 \&lt;/span&gt;
&lt;span class="s2"&gt;    language code given&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;to_639_3&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;That doesn't look like much, but that is intentional. You don't want to care
about this simple task and all you need is contained in the data segment of your
binary. Not a single of your precious cycles is wasted for initialization or
allocation.
This is possible thanks to a static
&lt;a href="https://docs.rs/phf/0.7.21/phf/map/struct.Map.html"&gt;Map&lt;/a&gt;
from the &lt;a href="https://github.com/sfackler/rust-phf"&gt;PHF&lt;/a&gt; crate.&lt;/p&gt;
&lt;p&gt;One missing feature is the conversion from an English language string to the
Language data structure. This is not included because it is a slightly
problematic mapping, because some language names might have multiple codes
assigned and it is hard to properly identify them that way. It could be added, if
need be.&lt;/p&gt;
&lt;p&gt;I'm using this crate in &lt;a href="https://github.com/humenda/craft"&gt;CRAFT&lt;/a&gt;, a word2vec text
preprocessor.&lt;/p&gt;</content></entry><entry><title>Submit Useful Bugreports With Back Traces</title><link href="https://crustulus.de/2016/10/submit-useful-bugreports-with-back-traces/" rel="alternate"></link><published>2016-10-11T00:00:00+02:00</published><updated>2017-03-18T00:00:00+01:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2016-10-11:/2016/10/submit-useful-bugreports-with-back-traces/</id><summary type="html">&lt;p&gt;Sometimes applications simply crash and then it's often hard to submit a
useful bug report to get the issue resolved quickly. This article walks
through the steps to get a meaningful backtrace, which can be submitted
along with a bug report. It is meant as a gentle introduction to
debugging …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Sometimes applications simply crash and then it's often hard to submit a
useful bug report to get the issue resolved quickly. This article walks
through the steps to get a meaningful backtrace, which can be submitted
along with a bug report. It is meant as a gentle introduction to
debugging on (Debian) GNU/Linux. It also discusses how to get a core
dump from a system service when using systemd.&lt;/p&gt;
&lt;p&gt;This article covers only a portion of possible bug causes: more
specifically crashes of programs written in C, C++ and similar
languages. It also mentions some Debian/Ubuntu-specific procedures, but
can be used for other GNU/Linux systems as well.&lt;/p&gt;
&lt;h3&gt;Motivation&lt;/h3&gt;
&lt;p&gt;It all began with a &lt;a href="https://wiki.debian.org/BSP/2016/09/at/Salzburg"&gt;Debian bug squashing party in
Salzburg&lt;/a&gt;, hosted by
&lt;a href="https://www.conova.com/"&gt;Conova&lt;/a&gt; (&lt;strong&gt;thanks&lt;/strong&gt;). At the event, a group of
Debian developers, maintainers and other folks gathered at a large table
and started hacking. While I researched the list of bugs, it turned out
that some bugs simply lack enough information to get fixed easily. So I
started on these "low hanging fruits".&lt;/p&gt;
&lt;h3&gt;Reproducing The Fault&lt;/h3&gt;
&lt;p&gt;Getting a core dump is slightly different for ordinary user programs and
system services. Both scenarios are discussed below.&lt;/p&gt;
&lt;h4&gt;Ordinary User Programs&lt;/h4&gt;
&lt;p&gt;Before we can start reproducing the fault, we need to prepare our shell
to produce a so called &lt;em&gt;core dump&lt;/em&gt;, as soon as the program crashes. A
core dump is an image of the whole memory, which was used by the process
during the crash. You can configure your shell session temporarily by
entering the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ &lt;span class="nb"&gt;ulimit&lt;/span&gt; -c unlimited
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Running the faulty program in this &lt;strong&gt;"prepared"&lt;/strong&gt; environment will lead
to the creation of a new file called "core".&lt;/p&gt;
&lt;p&gt;Now you need to find out the name of the program and run it from the
prepared shell session. For instance, let's look at the program
&lt;a href="http://brltty.com"&gt;BRLTTY&lt;/a&gt;. This particular program needs root
privileges and is a daemon service. So to run it from the shell, I would
type:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo service brltty stop # stop the running deamon
sudo brltty
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now the steps to get the program to crash have to be performed. After
the crash, the shell should show something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;zsh&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;segmentation&lt;/span&gt; &lt;span class="n"&gt;fault&lt;/span&gt;  &lt;span class="n"&gt;sudo&lt;/span&gt; &lt;span class="n"&gt;brltty&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The output might vary slightly, depending on the shell in use. This
indicates some memory issue, i.e. an invalid pointer operation and it is
now time to collect information for the bug report.&lt;/p&gt;
&lt;h4&gt;System Services&lt;/h4&gt;
&lt;p&gt;Obtaining a core dump from a system service is slightly more
complicated, because they are not started from a user shell and hence
the core dumping property must be set elsewhere. If systemd is used, the
service unit (the file which tells systemd how to handle the service)
needs to be extended. It is best to initialize a directory under
&lt;code&gt;/etc/systemd/system/&lt;/code&gt; with the name of the service unit and &lt;code&gt;.d&lt;/code&gt; as
suffix, e.g.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo mkdir /etc/systemd/system/brltty.service.d
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Within this directory, any file on &lt;code&gt;.conf&lt;/code&gt; will be parsed and will
extend the service unit file. For BRLTTY, I did enter the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;echo -e &amp;quot;[Service]\nLimitCORE=infinity\n&amp;quot; &amp;gt; /etc/systemd/system/brltty.service.d/core.conf
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Afterwards, the configuration has to be reloaded and the service
restarted:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;systemctl daemon-reload
systemctl restart brltty
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;After a crash, the core file will reside in the current working
directory of the daemon. That's most likely &lt;code&gt;/&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you want to have more control about where core files end up and to
which program they belong, add the following line to &lt;code&gt;/etc/sysctl.conf&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;kernel.core_pattern = /tmp/core-%e-%p
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This will tell the kernel to put core dumps into /tmp and name it with
the binary name and its pid. To activate the new setting, just type&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo sysctl --system
&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;Installing Debugging Symbols&lt;/h3&gt;
&lt;p&gt;Debug symbols are essentially names within the program, which help the
programmer to identify a particular part of the source code. These are
normally stripped of the binary for performance and size reasons.
Therefore these need to be installed (or compiled in) additionally.&lt;/p&gt;
&lt;p&gt;For Debian and Ubuntu, the debugging symbols can be found inadditional
packages, which can be easily installed using APT.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: The following paragraph is slightly different on Ubuntu,
please see the &lt;a href="https://wiki.ubuntu.com/Debug%20Symbol%20Packages"&gt;Ubuntu
Wiki&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Add a new entry in &lt;code&gt;/etc/apt/sources.list&lt;/code&gt;, which looks like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;deb&lt;/span&gt; &lt;span class="s"&gt;http://deb.debian.org/debian-debug&lt;/span&gt; &lt;span class="kp"&gt;stretch-debug&lt;/span&gt; &lt;span class="kp"&gt;main&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;and alter the relese information, as appropriate.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;From here on, the instructions apply for Ubuntu again.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;After the repository has been added, updating the package list with
&lt;code&gt;sudo apt update&lt;/code&gt; is required. Now it is possible to search for the
package with the debugging symbols, i.e. packages ending on &lt;code&gt;dbgsym&lt;/code&gt; or
&lt;code&gt;dbg&lt;/code&gt;. For the brltty case, that would be &lt;code&gt;aptitude search brltty&lt;/code&gt; and
then &lt;code&gt;sudo apt install brltty-dbg&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Getting A Core Dump&lt;/h3&gt;
&lt;p&gt;To reconstruct what happened when the program crashed, it is possible to
save a full memory backup (core dump) of the running program. This can
then be examined with &lt;a href="https://en.wikipedia.org/wiki/GDB"&gt;GDB&lt;/a&gt;, to
figure out, where the program faulted. If you have not yet installed
GDB, do so using &lt;code&gt;sudo apt install gdb&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;When you have a core dump in place, you can examin it with the file
utility, which would output something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;core&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ELF&lt;/span&gt; &lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;bit&lt;/span&gt; &lt;span class="n"&gt;LSB&lt;/span&gt; &lt;span class="n"&gt;core&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="n"&gt;x86&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;SYSV&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt; &lt;span class="n"&gt;SVR4&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;from&lt;/span&gt;
&lt;span class="s1"&gt;&amp;#39;/sbin/brltty&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;real&lt;/span&gt; &lt;span class="n"&gt;uid&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;effective&lt;/span&gt; &lt;span class="n"&gt;uid&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;real&lt;/span&gt; &lt;span class="n"&gt;gid&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;effective&lt;/span&gt; &lt;span class="n"&gt;gid&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;execfn&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;sudo brltty&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;platform&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;x86_64&amp;#39;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Note that the full path of the executable is contained in the above
output. This is helpful for running GDB, as explained in the next
section.&lt;/p&gt;
&lt;h3&gt;Obtaining A Backtrace&lt;/h3&gt;
&lt;p&gt;It is not a good idea to attach the core dump to a bug report, because
it might get really big and it might also contain private data, even
passwords and other credentials. For a lot of cases, the programmer just
wants to know where an error occurred and this information is contained
in a back trace. The GNU Debugger (GDB) is able to retrieve the
backtrace, if you provide the full path to the binary and the core file
as first and second argument, respectively. This is
&lt;code&gt;gdb /sbin/brltty core&lt;/code&gt; for the BRLTTY example. After launching GDB, it
will display a command prompt and await more commands. The following
command will print the desired output:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;thread apply all bt full
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The output can then be attached to a bug report.&lt;/p&gt;
&lt;h3&gt;Where To Go Now?&lt;/h3&gt;
&lt;p&gt;With this knowledge, you can now provide quite useful bug reports. It is
not always necessary to be a programmer to help out and programmers on
the other hand appreciate people, who took some care before reporting a
bug.&lt;/p&gt;
&lt;p&gt;If you plan to use your knowledge for the next Debian Bug Squashing
Party, you might want to read an introduction to the &lt;a href="https://wiki.debian.org/HowtoUseBTS"&gt;Debian Bug
Tracking System&lt;/a&gt; or an introduction
to a helper program called
&lt;a href="https://wiki.debian.org/reportbug"&gt;reportbug&lt;/a&gt;, which eases reporting
bugs greatly.&lt;/p&gt;</content></entry><entry><title>git-hub — A Command-line Interface To GitHub</title><link href="https://crustulus.de/2016/09/git-hub-a-command-line-interface-to-github/" rel="alternate"></link><published>2016-09-03T00:00:00+02:00</published><updated>2017-03-18T00:00:00+01:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2016-09-03:/2016/09/git-hub-a-command-line-interface-to-github/</id><summary type="html">&lt;p&gt;GitHub is a very useful platform to host free and open source software.
For Git users who use the command line for managing their repositories,
it can be much quicker to use the command line to also manage their
development issues. This article introduces git-hub, a really useful
utility to …&lt;/p&gt;</summary><content type="html">&lt;p&gt;GitHub is a very useful platform to host free and open source software.
For Git users who use the command line for managing their repositories,
it can be much quicker to use the command line to also manage their
development issues. This article introduces git-hub, a really useful
utility to manage pull requests, issues and clones from and at GitHub.&lt;/p&gt;
&lt;h2&gt;Installation&lt;/h2&gt;
&lt;h3&gt;Debian/Ubuntu&lt;/h3&gt;
&lt;p&gt;If you are running Debian (or a derivative like Ubuntu), installation is
as easy as &lt;code&gt;sudo apt install git-hub&lt;/code&gt;. Unfortunately, git-hub is not yet
part of Debian stable (ATM Jessie) or in the current Ubuntu releases.
See the installation from source as an alternative.&lt;/p&gt;
&lt;h3&gt;From Source&lt;/h3&gt;
&lt;p&gt;Make sure to fetch the dependencies first: Python &lt;code&gt;&amp;gt;= 2.7&lt;/code&gt;, Git
&lt;code&gt;&amp;gt;= 1.7&lt;/code&gt;, Docutils. The last one are required to build the manual page.
On Debian/Ubuntu, simply execute:
&lt;code&gt;apt install python-all git python-docutils&lt;/code&gt;.\&lt;/p&gt;
&lt;p&gt;Then you clone the repository:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ git clone https://github.com/sociomantic-tsunami/git-hub
$ &lt;span class="nb"&gt;cd&lt;/span&gt; git-hub
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If you are on Debian/Ubuntu, type:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ make-deb
&lt;span class="c1"&gt;# dpkg -i *.deb&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Otherwise the usual&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ make
&lt;span class="c1"&gt;# make install&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;will do the job.&lt;/p&gt;
&lt;h2&gt;Set Up A Git Repository&lt;/h2&gt;
&lt;p&gt;There are two ways to set up a git repository for git-hub. It can
directly clone repositories and I won't detail the instructions here.
Have a look at &lt;a href="https://github.com/sociomantic-tsunami/git-hub/blob/v0.10.x/man.rst"&gt;the manual
page&lt;/a&gt;.\
If, however, a repository already exists, which has been the case for
me, it is easy to configure it to authenticate with GitHub:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;cd &amp;lt;repo&amp;gt;
# that will ask for user name and password and create an authentication
# token:
$ git-hub setup
# add upstream to newly created hub section; replace USER and REPO name
# (REPO has to be without the .git suffix)
echo -e &amp;#39;\tupstream = USER/REPO&amp;#39; &amp;gt;&amp;gt; .git/config
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The last one can be done by hand too, make sure that you use a tab
character for indentation. For
&lt;a href="https://humenda.github.io/GladTeX"&gt;GladTeX&lt;/a&gt; the last line in
&lt;code&gt;.git/config&lt;/code&gt; looks like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;upstream = humenda/gladtex
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;&lt;em&gt;Tip:&lt;/em&gt;&lt;/strong&gt; With the above instructions, git-hub is only set up for one
repository. If you want to give it access for all repositories you might have on
GitHub, add this to &lt;code&gt;~/.gitconfig&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;[hub]&lt;/span&gt;
    &lt;span class="na"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;YOURNAME&lt;/span&gt;
&lt;span class="s"&gt;    oauthtoken = TOKEN&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The token can be obtained from the repository configuration, for which you just
identified. Just look into &lt;code&gt;.git/config&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Usage&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;Git-hub&lt;/code&gt; uses subcommands, as does Git. Every subcommand and also
&lt;code&gt;git-hub&lt;/code&gt; accept the &lt;code&gt;-h&lt;/code&gt; switch and are therefore self-explanatory. For
instance, listing issues could look like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ &lt;span class="nb"&gt;cd&lt;/span&gt; fd-dictionaries
$ git-hub issue list
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; update Chapter &lt;span class="m"&gt;4&lt;/span&gt; of the HOWTO &lt;span class="o"&gt;(&lt;/span&gt;installation of FreeDict DTDs&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;humenda&lt;span class="o"&gt;)&lt;/span&gt;
    https://github.com/freedict/fd-dictionaries/issues/4
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Closing an issue and typing a explanatory message in the favorite editor
is easy too:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ github issue close -e &lt;span class="m"&gt;42&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;An editor will open and will display a file similar to a git commit.
After the user has typed a message, saved and quit, the issue will be
closed with that message.&lt;/p&gt;
&lt;p&gt;If you want save yourself typing overhead, I suggest the following
aliases in your &lt;code&gt;~/.zshrc&lt;/code&gt; (or &lt;code&gt;~/.bashrc&lt;/code&gt;):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;alias gh=&amp;#39;git-hub&amp;#39;
alias ghi=&amp;#39;git-hub issue&amp;#39;
alias ghp=&amp;#39;git-hub pull&amp;#39;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;My experience is that &lt;code&gt;ghi list&lt;/code&gt; is so quick to use that I hardly use
the web site, if I want to manage issues.&lt;/p&gt;</content></entry><entry><title>Debian Jessie On A Lenovo Yoga 700</title><link href="https://crustulus.de/2016/08/debian-jessie-on-a-lenovo-yoga-700/" rel="alternate"></link><published>2016-08-23T00:00:00+02:00</published><updated>2016-08-23T00:00:00+02:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2016-08-23:/2016/08/debian-jessie-on-a-lenovo-yoga-700/</id><summary type="html">&lt;p&gt;The Lenovo Yoga 700 is a laptop with a 360° rotatable touch display and
comes with Windows 10 preinstalled. This article is split into two
parts. The first part walks through the installation and set up of
Debian Jessie GNU/Linux on this machine and what needs to be done …&lt;/p&gt;</summary><content type="html">&lt;p&gt;The Lenovo Yoga 700 is a laptop with a 360° rotatable touch display and
comes with Windows 10 preinstalled. This article is split into two
parts. The first part walks through the installation and set up of
Debian Jessie GNU/Linux on this machine and what needs to be done to get
all of the hardware working. The second part deals with useful
configuration hints for this model and finally a general note on
interoperability with Windows.&lt;/p&gt;
&lt;h2&gt;Part I — Installation&lt;/h2&gt;
&lt;h3&gt;Hardware Specification&lt;/h3&gt;
&lt;p&gt;The Lenovo Yoga is equipped with a 500 GB SSHD (with 8 GB of SSD cache),
4 GB RAM, a 14" touch display and no optical drive. Other sites on the
web will have more information about the model. &lt;code&gt;lspci&lt;/code&gt; detects the
following connected devices:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;00.0&lt;/span&gt; &lt;span class="n"&gt;Host&lt;/span&gt; &lt;span class="n"&gt;bridge&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Intel&lt;/span&gt; &lt;span class="n"&gt;Corporation&lt;/span&gt; &lt;span class="n"&gt;Device&lt;/span&gt; &lt;span class="mi"&gt;1904&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rev&lt;/span&gt; &lt;span class="mi"&gt;08&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;02.0&lt;/span&gt; &lt;span class="n"&gt;VGA&lt;/span&gt; &lt;span class="n"&gt;compatible&lt;/span&gt; &lt;span class="n"&gt;controller&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Intel&lt;/span&gt; &lt;span class="n"&gt;Corporation&lt;/span&gt; &lt;span class="n"&gt;Device&lt;/span&gt; &lt;span class="mi"&gt;1916&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rev&lt;/span&gt; &lt;span class="mi"&gt;07&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;04.0&lt;/span&gt; &lt;span class="n"&gt;Signal&lt;/span&gt; &lt;span class="n"&gt;processing&lt;/span&gt; &lt;span class="n"&gt;controller&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Intel&lt;/span&gt; &lt;span class="n"&gt;Corporation&lt;/span&gt; &lt;span class="n"&gt;Device&lt;/span&gt; &lt;span class="mi"&gt;1903&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rev&lt;/span&gt; &lt;span class="mi"&gt;08&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;14.0&lt;/span&gt; &lt;span class="n"&gt;USB&lt;/span&gt; &lt;span class="n"&gt;controller&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Intel&lt;/span&gt; &lt;span class="n"&gt;Corporation&lt;/span&gt; &lt;span class="n"&gt;Device&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="n"&gt;d2f&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rev&lt;/span&gt; &lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;14.2&lt;/span&gt; &lt;span class="n"&gt;Signal&lt;/span&gt; &lt;span class="n"&gt;processing&lt;/span&gt; &lt;span class="n"&gt;controller&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Intel&lt;/span&gt; &lt;span class="n"&gt;Corporation&lt;/span&gt; &lt;span class="n"&gt;Device&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="n"&gt;d31&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rev&lt;/span&gt; &lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;15.0&lt;/span&gt; &lt;span class="n"&gt;Signal&lt;/span&gt; &lt;span class="n"&gt;processing&lt;/span&gt; &lt;span class="n"&gt;controller&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Intel&lt;/span&gt; &lt;span class="n"&gt;Corporation&lt;/span&gt; &lt;span class="n"&gt;Device&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="n"&gt;d60&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rev&lt;/span&gt; &lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;16.0&lt;/span&gt; &lt;span class="n"&gt;Communication&lt;/span&gt; &lt;span class="n"&gt;controller&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Intel&lt;/span&gt; &lt;span class="n"&gt;Corporation&lt;/span&gt; &lt;span class="n"&gt;Device&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="n"&gt;d3a&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rev&lt;/span&gt; &lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;17.0&lt;/span&gt; &lt;span class="n"&gt;SATA&lt;/span&gt; &lt;span class="n"&gt;controller&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Intel&lt;/span&gt; &lt;span class="n"&gt;Corporation&lt;/span&gt; &lt;span class="n"&gt;Device&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="n"&gt;d03&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rev&lt;/span&gt; &lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="n"&gt;PCI&lt;/span&gt; &lt;span class="n"&gt;bridge&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Intel&lt;/span&gt; &lt;span class="n"&gt;Corporation&lt;/span&gt; &lt;span class="n"&gt;Device&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="n"&gt;d15&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rev&lt;/span&gt; &lt;span class="n"&gt;f1&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="n"&gt;ISA&lt;/span&gt; &lt;span class="n"&gt;bridge&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Intel&lt;/span&gt; &lt;span class="n"&gt;Corporation&lt;/span&gt; &lt;span class="n"&gt;Device&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="n"&gt;d48&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rev&lt;/span&gt; &lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="n"&gt;Memory&lt;/span&gt; &lt;span class="n"&gt;controller&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Intel&lt;/span&gt; &lt;span class="n"&gt;Corporation&lt;/span&gt; &lt;span class="n"&gt;Device&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="n"&gt;d21&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rev&lt;/span&gt; &lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="n"&gt;Audio&lt;/span&gt; &lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Intel&lt;/span&gt; &lt;span class="n"&gt;Corporation&lt;/span&gt; &lt;span class="n"&gt;Device&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="n"&gt;d70&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rev&lt;/span&gt; &lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="n"&gt;SMBus&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Intel&lt;/span&gt; &lt;span class="n"&gt;Corporation&lt;/span&gt; &lt;span class="n"&gt;Device&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="n"&gt;d23&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rev&lt;/span&gt; &lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="mi"&gt;01&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;00.0&lt;/span&gt; &lt;span class="n"&gt;Network&lt;/span&gt; &lt;span class="n"&gt;controller&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Intel&lt;/span&gt; &lt;span class="n"&gt;Corporation&lt;/span&gt; &lt;span class="n"&gt;Device&lt;/span&gt; &lt;span class="mi"&gt;3166&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rev&lt;/span&gt; &lt;span class="mi"&gt;99&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;Installation&lt;/h3&gt;
&lt;p&gt;Debian Jessie provides a solid basis for everyday work, but the hardware
support with its 3.2 kernel is too old. Since this laptop was meant to
work flawlessly, I chose to install stable instead of testing. Since the
Yoga 700 is equipped with a touch display, it is advisable to use a
desktop environment with support for this. Debian's default environment
GNOME is a good choice, so pick wisely when downloading an installation
image.&lt;/p&gt;
&lt;p&gt;The WiFi card is not supported by the stock Jessie kernel, hence I
downloaded a &lt;a href="http://www.debian.org/CD/http-ftp/"&gt;full CD image&lt;/a&gt;, to
perform the installation off-line. I wrote the image to a USB drive
using:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;dd if=debian*.iso of=/dev/sdb
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;It is advisable to run the installation in text-mode, because the
graphics card is not fully supported with the Jessie kernel as well.&lt;/p&gt;
&lt;p&gt;When the partition manager showed up, I chose to shrink the partition of
Windows and create a Debian partition on the freed space with 20 GB. The
rest of the installation went smoothly and
&lt;a href="https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface"&gt;EFI&lt;/a&gt;
boot was set up without any manual interventions. This surprised me the
most, because installation was in fact easier than without EFI, where
the user was always confronted with a "Do you really want to overwrite
the MBR" screen.&lt;/p&gt;
&lt;p&gt;When the Debian installation was done, I rebooted and ended up with a
non-working X setup. I changed to the virtual console using
control+alt+f1 to find out the source of the error. The X log said:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;(EE) no screens found(EE)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Note: Lenovo changed their Laptop layout to swap the F&lt;code&gt;&amp;lt;num&amp;gt;&lt;/code&gt; keys
with some other functionality. Use &lt;code&gt;fn + F&amp;lt;num&amp;gt;&lt;/code&gt;, to obtain the old
behaviour.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Further digging in the log file revealed, that the chip set was not
supported. After some hours of try and failure, I discovered, that
installing two packages from backports was the solution. I first fetched
&lt;a href="https://packages.debian.org/en/jessie-backports/linux-image-amd64"&gt;linux-image&lt;/a&gt;
and
&lt;a href="https://packages.debian.org/de/stretch/firmware-iwlwifi"&gt;firmware-iwlwifi&lt;/a&gt;
(the first from backports, the second from testing), put them on the USB
drive and installed them on the target system:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mount /dev/sdb /mnt
cd /mnt/sdb
dpkg -i linux*.deb
dpkg -i firm*.deb
cd
umount /mnt
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;After a reboot, I was indeed able to set up a &lt;a href="https://wiki.debian.org/WiFi/HowToUse"&gt;wireless
connection&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note: If installing the firmware does not work for you, you can get
the missing files from &lt;a href="https://github.com/OpenELEC/iwlwifi-firmware"&gt;https://github.com/OpenELEC/iwlwifi-firmware&lt;/a&gt;.
These need to be moved to &lt;code&gt;/lib/firmware&lt;/code&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To fix the X error, I set up
&lt;a href="https://wiki.debian.org/Backports"&gt;backports&lt;/a&gt; to install a newer
package for the graphics card. After I inserted the required lines in
&lt;code&gt;/etc/apt/sources.list&lt;/code&gt;, I ran:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;apt-get update
apt-get dist-upgrade -y
apt-get -t jessie-backports install xserver-xorg-video-intel
service gdm3 stop &amp;amp;&amp;amp; service gdm3 start
&lt;/pre&gt;&lt;/div&gt;


&lt;h2&gt;Fine-Tuning: Configuration&lt;/h2&gt;
&lt;p&gt;The Lenovo Yoga 700 is certainly not the most advanced laptop from
Lenovo and its hardware support on GNU/Linux might not be complete, but
it can be easily adapted.&lt;/p&gt;
&lt;h3&gt;Faster Boot And Faster Everything&lt;/h3&gt;
&lt;p&gt;The internal SSHD will cache frequently used files (supposedly mostly
programs) and will indeed deliver good performance after using the
machine for a short while, re-boots included. It is however fairly easy
to speed up the boot process even more by installing
&lt;a href="https://packages.debian.org/jessie/readahead-fedora"&gt;readahead&lt;/a&gt;. This
program will simply gather a list of files used during boot and will
load them in advance and in parallel to the kernel cache (main memory)
to speed up the boot process. The installation is as easy as:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;apt-get install readahead
sudo touch /etc/readahead.d/profile-once
reboot
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The next boot will take longer than usual, but subsequent reboots should
be faster.&lt;/p&gt;
&lt;p&gt;There are two services which are often not necessary on a regular
laptop/desktop system: exim4 and ModemManager. Disabling services
influences boot time and potentially increases batter lifetime, because
the CPU doesn't need to wake up as often. The email server exim4 and the
modem manager can be disabled like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;systemctl disable exim4
systemctl disable ModemManager
&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;Longer Battery Lifetime&lt;/h3&gt;
&lt;p&gt;For this particular laptop model, the Debian installer did not install
the laptop-mode-tools, which it normally does. It can be manually
installed:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;apt-get install laptop-mode-tools
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This increases battery lifetime noticeably.&lt;/p&gt;
&lt;h3&gt;Mounting the Windows NTFS Partition&lt;/h3&gt;
&lt;p&gt;The more recent Windows versions do not properly shutdown, but hibernate
the system. This has the advantage that users get the impression of a
really quick boot up of Windows but the downside that volumes are never
cleanly unmounted and hence it's unsafe to access them from another
operating system. The quickest solution is to disable hibernation in
Windows all together. In Windows, type &lt;code&gt;cmd&lt;/code&gt; in the search field of the
start menu, choose the appropriate entry and start a shell with
administrator privileges by right-clicking the item and selecting "run
as administrator". Once in the command interpreter, type:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;powercfg -h off
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;After this, the Windows partition can be used from Debian, instructions
can be found
&lt;a href="https://help.ubuntu.com/community/MountingWindowsPartitions"&gt;here&lt;/a&gt;.&lt;/p&gt;</content></entry><entry><title>GladTeX 0.6 — A Modern Rewrite Of GladTeX In Python</title><link href="https://crustulus.de/2015/11/gladtex0.6released/" rel="alternate"></link><published>2015-11-10T00:00:00+01:00</published><updated>2015-11-10T00:00:00+01:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2015-11-10:/2015/11/gladtex0.6released/</id><summary type="html">&lt;p&gt;i have just released GladTeX 0.6, a maths preprocessor for HTML documents. In
this article, I will introduce the new features of GladTeX and will give
practical examples on how to use GladTeX, i.e.
to render MarkDown files with formulas.&lt;/p&gt;
&lt;h2&gt;About&lt;/h2&gt;
&lt;p&gt;GladTeX is a preprocessor for HTML files …&lt;/p&gt;</summary><content type="html">&lt;p&gt;i have just released GladTeX 0.6, a maths preprocessor for HTML documents. In
this article, I will introduce the new features of GladTeX and will give
practical examples on how to use GladTeX, i.e.
to render MarkDown files with formulas.&lt;/p&gt;
&lt;h2&gt;About&lt;/h2&gt;
&lt;p&gt;GladTeX is a preprocessor for HTML files to enable math formulas within HTML
documents by embedding images and generating an alternative text for blind people.
Everything surrounded by &lt;code&gt;&amp;lt;eq&amp;gt;...&amp;lt;/eq&amp;gt;&lt;/code&gt; will be taken as a LaTeX formula
and converted.\
Additionally, GladTeX can be used to transform Markdown documents to HTML with
formulas, if used with Pandoc.&lt;/p&gt;
&lt;h2&gt;Where To Get It&lt;/h2&gt;
&lt;p&gt;I have decided to rewrite GladTeX in Python. Before it has been a Perl/C
mixture which was hard to port and not working on Windows. Python in
contrast is a nowadays wide-spread scripting language with the ability
to write platform-independent code very easily. From this version on,
&lt;a href="https://github.com/humenda/GladTeX/releases/tag/0.6"&gt;there's a Windows executable available.&lt;/a&gt; On
Debian and derived systems (like Ubuntu) you can also install GladTeX using&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo apt-get install gladtex
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I am maintaining this package and keep it  up-to-date.&lt;/p&gt;
&lt;p&gt;The latest version can be easily build from
&lt;a href="http://github.com/humenda/gladtex"&gt;source&lt;/a&gt;. It boils down to execute
&lt;code&gt;sudo python3 setup.py install&lt;/code&gt; on the command line.&lt;/p&gt;
&lt;p&gt;To run GladTeX you will need a LaTeX distribution like &lt;a href="http://miktex.org/"&gt;MikTeX (for
Windows)&lt;/a&gt; containing &lt;code&gt;preview.sty&lt;/code&gt; and &lt;code&gt;dvipng&lt;/code&gt;.
Both are included in MikTeX and &lt;a href="https://www.tug.org/texlive"&gt;Texlive&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Embedding GladTeX Into Other Applications&lt;/h2&gt;
&lt;p&gt;I've decided to split the program into two parts: a library and a
command line frontend. This way it's easily possible to embed the
library &lt;code&gt;gleetex&lt;/code&gt; into another application. This application can choose
to either also parse HTML files and produce HTML with formula images or
just use gleetex as a simple way to convert LaTeX formulas to images.
There's no separate library documentation yet, but I've payed attention
to document all the classes extensively, so feel free to just &lt;a href="http://github.com/humenda/gladtex/tree/master/gleetex"&gt;browse
the source&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Shell-piping support has been added as well, so that formula images can be
created without a HTML document. This might be useful for web site generators,
etc. Consider the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;echo &amp;#39;&lt;span class="nt"&gt;&amp;lt;eq&amp;gt;&lt;/span&gt;\gamma\alpha&lt;span class="nt"&gt;&amp;lt;/eq&amp;gt;&lt;/span&gt;&amp;#39; | gladtex -d images -o /dev/null
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;or on Windows&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;echo &amp;quot;&lt;span class="nt"&gt;&amp;lt;eq&amp;gt;&lt;/span&gt;\gamma\alpha&lt;span class="nt"&gt;&amp;lt;/eq&amp;gt;&lt;/span&gt;&amp;quot; | gladtex -d images -o nul
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Additionally there's a cache containing formula → image mappings which
is now a gzipped json file and can be hence post-processed by scripts as
well.&lt;/p&gt;
&lt;h2&gt;MarkDown and GladTeX&lt;/h2&gt;
&lt;p&gt;It is possible to embed formulas into MarkDown files when using Pandoc
as a converter. It is as easy as surrounding formulas by a \$ sign (or
double \$\$ for display math), like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;This is an inline formula: $\frac{1}{m^2}$

This is displaymath $$\frac{\frac{1}{m}}{\big(\tau\cdot (\pi + \gamma)\big)}$$
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Pandoc brings the &lt;code&gt;--gladtex&lt;/code&gt; option and with the new GladTeX version,
converting a file called &lt;code&gt;input.md&lt;/code&gt; is as easy as:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;pandoc --smart -t html --gladtex input.md | gladtex -d images -o output.html
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Which will create a file called &lt;code&gt;output.html&lt;/code&gt; with images containing the
desired formulas and all images located in a separate images directory.&lt;/p&gt;
&lt;h2&gt;High Test Coverage&lt;/h2&gt;
&lt;p&gt;Something which is not immediately visible from outside is that the new
GladTeX is now fully tested with unit tests. I hope to make GladTeX as
bug free as possible. It actually saved a considerable amount of time
when developing GladTeX, because I discovered a lot of problems very
early.&lt;/p&gt;</content></entry><entry><title>Review - Installing Debian Jessie On A Lenovo Thinkpad X250</title><link href="https://crustulus.de/2015/05/Review---Installing-Debian-Jessie-On-A-Lenovo-Thinkpad-X250/" rel="alternate"></link><published>2015-05-11T00:00:00+02:00</published><updated>2015-05-11T00:00:00+02:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2015-05-11:/2015/05/Review---Installing-Debian-Jessie-On-A-Lenovo-Thinkpad-X250/</id><summary type="html">&lt;p&gt;This article reviews the installation process of Debian 8.0 on a
ThinkPad X250. It is not meant to be a step-by-step guide and is more a
review of how the installation currently works and what to expect from
it. It also details some fixes to issues encountered after installation …&lt;/p&gt;</summary><content type="html">&lt;p&gt;This article reviews the installation process of Debian 8.0 on a
ThinkPad X250. It is not meant to be a step-by-step guide and is more a
review of how the installation currently works and what to expect from
it. It also details some fixes to issues encountered after installation
for this specific laptop model.&lt;/p&gt;
&lt;p&gt;Although I am going to mention accessibility every now and then, this is
definitely not only focused on that topic, but rather a mixture of
everything.&lt;/p&gt;
&lt;h3&gt;Preparations&lt;/h3&gt;
&lt;p&gt;First of all I downloaded the &lt;a href="https://www.debian.org/CD/netinst/"&gt;official Debian amd64 netinstall CD
image&lt;/a&gt; and wrote it to a USB stick.
Normally I would have used &lt;code&gt;dd&lt;/code&gt;, but I felt like I needed a change and
tried out &lt;code&gt;pv&lt;/code&gt; to get a progress bar to watch. However that didn't work
out like expected, since pv's progress bar made progress much faster
than the actual write took place. This is most probably due to kernel
buffering, wherefore I sat there waiting for a bit longer without an
indication of progress. Next time it'll be dd again.&lt;/p&gt;
&lt;h3&gt;Installation&lt;/h3&gt;
&lt;p&gt;When I booted the ThinkPad with the USB drive connected to it, I heard a
beep, which was the sign that the installation menu had come up. After
pressing enter, &lt;a href="http://www.brltty.com"&gt;BRLTTY&lt;/a&gt; started directly and
printed text on my braille display, so that worked seamlessly like in
the previous Debian versions. It would be nice if BRLTTY would be
restarted after the language has been chosen, so that the text table can
be changed. Currently the installation starts off with the US-American
braille text table and that is quite annoying to get rid of it if you
don't know by heart how to open the preferences menu with a key
combination of the braille display. One fix is to press &lt;code&gt;alt+f2&lt;/code&gt;,
followed by &lt;code&gt;enter&lt;/code&gt; to get a shell and restart brltty there. For that
you need to find out BRLTTY's process id, use &lt;code&gt;ps aux | grep brltty&lt;/code&gt; and
look up the pid of BRLTTY there. Then execute:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;kill &amp;lt;pid&amp;gt;
brltty -t &amp;lt;yourtable&amp;gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;A few dialogs later, the automatic network discovery started. It
complaint that firmware for the Wi-Fi card would be missing. Although I
would've liked Wi-Fi to work from the very beginning, a LAN cable wasn't
too much trouble in my situation. Next time I might actually &lt;a href="https://www.debian.org/releases/stable/i386/ch06s04.html.en"&gt;prepare an
USB drive&lt;/a&gt;.
For those who still want to do it, the adaptor identifies itself as
&lt;code&gt;Intel Corporation Wireless 7265&lt;/code&gt;, kernel module &lt;code&gt;iwlwifi&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The partition manager looked familiar. I wanted to try encryption of my
home partition for the first time. Here I failed to actually set up
encryption, because I haven't had a look at Debian's installation guide
and didn't read the on-screen tips carefully enough. So I decided to
postpone it to a later point. I don't want to have an encrypted root
partition anyway and encrypting /home is not too hard, if there's no
data on it. I would have also liked some guidance on what to do with a
SSD drive (which file system to pick and which mount options), but
apparently for recent Linux kernels that is not as important as it used
to be.&lt;/p&gt;
&lt;p&gt;The rest of the installation went smooth without any issues. In the
package selection screen, I chose Mate as a desktop environment and was
astonished that there was no category "laptop" to bee activated for
laptop users. Sure, there's a service laptop-detect installed by
default, but that is not all one can do.&lt;/p&gt;
&lt;h3&gt;After The Reboot&lt;/h3&gt;
&lt;p&gt;After the reboot, I installed the firmware for my Intel wireless card
(see &lt;a href="https://wiki.debian.org/iwlwifi"&gt;the Debian wiki&lt;/a&gt; for more
information) and configured my wireless connection.&lt;/p&gt;
&lt;p&gt;Unfortunately my ThinkPad stayed quiet after the installation and I
wasn't able to get any sound at all. By looking at the sound card
configuration:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;cat /proc/asound/cards
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I discovered that the Intel sound card is recognized as two devices, one
with the identifier HDMI and one with PCH. The default output method was
HDMI (ALSA index=0) and hence I got no sound. That can be resolved by
loading the appropriate module (&lt;code&gt;snd_hda_intel&lt;/code&gt;) with the option
index=1, to tell it the preferred main audio sink:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;echo &amp;#39;options snd_hda_intel index=1&amp;#39; &amp;gt; /etc/modprobe.d/sound.conf
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;After that I still couldn't play any sound, so I checked all controls in
&lt;code&gt;alsamixer&lt;/code&gt; (package &lt;code&gt;ALSA-utils&lt;/code&gt;), unmuted eveything, raised the volume
to maximum and still got no sound. Until I finally found out that the
hardware muting facility of the ThinkPad cannot be influenced by ALSA. I
must have accidentally pressed &lt;code&gt;fn + f1&lt;/code&gt; and muted my speakers with it.
The fix was simple to press either &lt;code&gt;fn + f3&lt;/code&gt; or &lt;code&gt;fn + f4&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For battery usage optimization I would have expected that laptop-detect,
which seems to be a service running in the background, would have pulled
in &lt;a href="https://packages.debian.org/laptop-mode-tools"&gt;laptop mode tools&lt;/a&gt;.
Running &lt;code&gt;apt-get install laptop-mode-tools&lt;/code&gt; wasn't to dificult though. I
feel that this enhances the life time of the battery.&lt;/p&gt;
&lt;p&gt;After all the system now runs smoothly and thanks to
&lt;a href="http://www.cis.upenn.edu/~bcpierce/unison/"&gt;Unison&lt;/a&gt; I had all my
configuration and personal data within a few minutes on the new machine.
&lt;a href="https://packages.debian.org/sid/gnome-orca"&gt;Orca&lt;/a&gt; works smoothly, not
only because the new laptop is much more powerful than the old one.&lt;/p&gt;</content></entry><entry><title>Mate — An Accessible Alternative To GNOME 3</title><link href="https://crustulus.de/2014/07/mate-an-accessible-alternative-to-gnome-3/" rel="alternate"></link><published>2014-07-16T00:00:00+02:00</published><updated>2014-07-16T00:00:00+02:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2014-07-16:/2014/07/mate-an-accessible-alternative-to-gnome-3/</id><summary type="html">&lt;p&gt;I am generally no friend of continuing "dead" technology, as GNOME 2 was
termed. I payed little attention to the rumors that Mate, a GNOME 2
fork, was under active development. Since in recent Debian Unstable, the
GNOME Shell accessibility experience is very poor and GNOME-shell seems
to have a …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I am generally no friend of continuing "dead" technology, as GNOME 2 was
termed. I payed little attention to the rumors that Mate, a GNOME 2
fork, was under active development. Since in recent Debian Unstable, the
GNOME Shell accessibility experience is very poor and GNOME-shell seems
to have a lot of bugs, I've tried out Mate and I will present some
(quick) notes about what works. This article is of course about
accessibility, but also covers some aspects of GNOME-shell and Mate in
general.&lt;/p&gt;
&lt;p&gt;Currently there is GNOME-shell 3.8 in Debian unstable, but other
components are already at 3.12 (just for the Arch users ;)). I had a
couple of issues:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Even though I activated accessibility features as described in the
    &lt;a href="http://wiki.debian.org/accessibility"&gt;Debian wiki&lt;/a&gt; I got no good
    user experience at all. I activated all possible GNOME-shell
    extensions to get a nautilus-managed desktop and so on, but the main
    applications panel (Alt+F1) remained unusable. Other GUI elements
    were however greatly accessible.&lt;/li&gt;
&lt;li&gt;When switching to the Linux console and back to the GUI session, the
    keyboard &lt;em&gt;always&lt;/em&gt; switched to US-American layout which I found
    quite disturbing. I thought this to be a bug in my X configuration,
    but see below.&lt;/li&gt;
&lt;li&gt;The GNOME terminal ignored the space and return keys, as long as I
    didn't pressed "shift" at the same time. Typing was a pain.&lt;/li&gt;
&lt;li&gt;The start up of GNOME 3 is very slow compared with GNOME 2.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Every now and then there were little issues which bothered me while
using GNOME 3, but I admit that the shift to GNOME 3 was not easy from
an accessibility point of view.&lt;/p&gt;
&lt;p&gt;Due to a recent article about Mate I thought I would give Mate a quick
try and I went with &lt;code&gt;apt-get install mate&lt;/code&gt; and inserted the following
into my &lt;code&gt;.xinitrc&lt;/code&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;exec mate-session
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;To enable accessibility by hand, one starts the session using &lt;code&gt;startx&lt;/code&gt;
and switches back to the console. Then the following command enables
accessibility features upon the next mate-session:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;DISPLAY=:0 gsettings set org.mate.interface accessibility true
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;After a restart of X, I got a traditional GNOME-2-alike desktop. As I
said, I don't like the idea of another desktop environment which also
continues some of the old technology used in GNOME, but recent Mate
releases dropped also obsolete packages and renewed their
infrastructure. And the result was amazing:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;The full panel, desktop and all icons are accessible.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The old menu with three entry points is back and is a great
    thing to use the computer efficient.&lt;/li&gt;
&lt;li&gt;One can "easily" switch &lt;em&gt;off&lt;/em&gt; the computer.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The mate-terminal works again.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;The annoying keyboard-layout-switch when switching to a console and
    back is gone.&lt;/li&gt;
&lt;li&gt;It is QUICK! No numbers here, but it was really faster when starting
    the session and at least with a screen reader, it doesn't feel that
    sluggish when navigating.&lt;/li&gt;
&lt;li&gt;There are also minor issues: when selecting an item, Orca says "not
    selected", even though the current element &lt;em&gt;is&lt;/em&gt; selected.&lt;/li&gt;
&lt;li&gt;I soon discovered that Firefox and Iceweasel were not accessible,
    this is due to
    &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=743580"&gt;a bug.&lt;/a&gt; There
    is a temporary hack, namely:&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo su
cd /usr/lib
ln -s i386-linux-gnu/gtk-2.0 .
&lt;/pre&gt;&lt;/div&gt;


&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt; For the fairness it has to be said that a lot of
accessibility work done in GNOME will directly benefit Mate without that
their developers do much development and I am thankful for the GNOME
project having an open ear for such issues. I don't think that I will
fully abandon GNOME 3, but for a while I think that Mate will become my
stable work environment and I'll see how GNOME 3 develops in the mean
time.&lt;/p&gt;</content></entry><entry><title>Sharing Text Between CLI and GUI clipboard</title><link href="https://crustulus.de/2014/04/sharing-text-between-cli-and-gui-clipboard/" rel="alternate"></link><published>2014-04-02T00:00:00+02:00</published><updated>2014-04-02T00:00:00+02:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2014-04-02:/2014/04/sharing-text-between-cli-and-gui-clipboard/</id><summary type="html">&lt;p&gt;For blind programmers using text editors like Vim, the command line is
in most cases the most convenient work environment on GNU/Linux. On the other
hand, some tasks are not possible on a virtual tty, like for instance, browsing complex web pages.
The only alternative is to constantly switch …&lt;/p&gt;</summary><content type="html">&lt;p&gt;For blind programmers using text editors like Vim, the command line is
in most cases the most convenient work environment on GNU/Linux. On the other
hand, some tasks are not possible on a virtual tty, like for instance, browsing complex web pages.
The only alternative is to constantly switch to a graphical X session.
Copying text between a tty and a X session is more or less a pain. In
this short article, I'll describe &lt;code&gt;xclip&lt;/code&gt; and some convenient ways to use
it with Vim / ZSH / GNU screen.&lt;/p&gt;
&lt;p&gt;First of all, you should install this handy little program, e.g. through using
&lt;code&gt;apt-get install xclip&lt;/code&gt;. If you are not using a Debian-derived distribution, you
can have a look at &lt;a href="http://xclip.sourceforge.net"&gt;http://xclip.sourceforge.net&lt;/a&gt; for the source code.&lt;/p&gt;
&lt;p&gt;To copy the text &lt;code&gt;hi&lt;/code&gt; to your clipboard, type:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;echo &amp;quot;hi&amp;quot; | xclip -d :0
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;You can view the contents of your clipboard using&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;xclip -o :0 -i
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The &lt;code&gt;:0&lt;/code&gt; denotes the X screen that the X server is running on. In 99 % of all
cases, using &lt;code&gt;:0&lt;/code&gt; should be enough. In rare cases, &lt;code&gt;:1&lt;/code&gt; should be used, change
to this if you get an error message.&lt;/p&gt;
&lt;p&gt;You can of course also copy files into the clipboard. This is as easy as&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;xclip FILENAMe
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;where &lt;code&gt;FILENAMe&lt;/code&gt; needs to be an existing file.&lt;/p&gt;
&lt;p&gt;Using ZSH, you can define a handy middle-line alias which allows commands like:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;echo &amp;quot;my text&amp;quot;  | CLIP
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;For this, open your &lt;code&gt;~/.zshrc&lt;/code&gt; and insert&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;alias -g CLIP=&amp;#39;xclip -d :0 -selection clipboard&amp;#39;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This has the handy advantage that you can paste your data into stdin of xclip as
well. Just type &lt;code&gt;CLIP&lt;/code&gt;, paste your data and press &lt;code&gt;ctl + d&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To paste text from the GUI to your local Vim instance, you can easily define a
command in your &lt;code&gt;~/.vimrc&lt;/code&gt; like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;com Paste  :call CopyX()
func! CopyX()
    exe &amp;quot;:s/$/\r/g&amp;quot;
    exe &amp;quot;:.!xclip -selection clipboard -d :0 -o&amp;quot;
endfunc
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Executing &lt;code&gt;:Paste&lt;/code&gt; will then paste text from the X clipboard to your Vim
buffer below the current line.&lt;/p&gt;
&lt;p&gt;You can also use the clipboard from GNU screen. The following is based
on &lt;a href="http://www.lowlevelmanager.com/2012/10/screen-clipboard-to-x11-clipboard.html"&gt;a blog article&lt;/a&gt;.
and uses instead xclip. Put the following into your &lt;code&gt;~/.screenrc&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;# read and write screen clipboard to X clipboard.
bind &amp;gt; eval writebuf &amp;quot;exec sh -c &amp;#39;xclip -d :0 -selection clipboard &amp;lt; /tmp/.screen-exchange&amp;#39;&amp;quot;
bind &amp;lt; eval &amp;quot;exec sh -c &amp;#39;xclip -selection clipboard -o &amp;gt;/tmp/.screen-exchange&amp;#39;&amp;quot; readbuf
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Then you can use &lt;code&gt;Ctl-A&lt;/code&gt; + &lt;code&gt;&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;&lt;/code&gt; to easily get the contents into or
out of the screen clipboard buffer.&lt;/p&gt;</content></entry><entry><title>GladTeX — embed LaTeX-quality equations in HTML</title><link href="https://crustulus.de/2014/03/gladtex-ng/" rel="alternate"></link><published>2014-03-16T00:00:00+01:00</published><updated>2014-03-16T00:00:00+01:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2014-03-16:/2014/03/gladtex-ng/</id><summary type="html">&lt;p&gt;A few months ago I searched for a solution to embed equations in HTML
together with the LaTeX-equation in the alt-tag (alternative text). This
allows blind people to read documents with equations together with their
sighted colleagues. Pandoc finally gave me a hint, since it supports
conversion from Markdown to …&lt;/p&gt;</summary><content type="html">&lt;p&gt;A few months ago I searched for a solution to embed equations in HTML
together with the LaTeX-equation in the alt-tag (alternative text). This
allows blind people to read documents with equations together with their
sighted colleagues. Pandoc finally gave me a hint, since it supports
conversion from Markdown to HTML with the --gladtex option. So I learned
about &lt;a href="http://humenda.github.io/GladTeX"&gt;GladTeX&lt;/a&gt;. I patched this
program.&lt;/p&gt;
&lt;p&gt;The idea is that you embed &lt;code&gt;&amp;lt;EQ&amp;gt;...&amp;lt;/EQ&amp;gt;&lt;/code&gt; tags into your HTML document
which then get processed by &lt;a href="http://humenda.github.io/GladTeX"&gt;GladTeX&lt;/a&gt;.
&lt;a href="http://humenda.github.io/GladTeX"&gt;GladTeX&lt;/a&gt; will autogenerate the
equation with LaTeX for you. It also takes care of inserting the image
tag into the HTML document and positioning it correctly.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://humenda.github.io/GladTeX"&gt;GladTeX&lt;/a&gt; is an older piece of
software. It was written by Martin Gulbrandsen who wrote and maintained
this piece of software until 2010. Then it got quiet around this little
program.&lt;/p&gt;
&lt;p&gt;As I discovered it, I noticed quickly that this program could be of
great value for blind people using a screen reader. For people with a
screen reader, the best way to read equations is through LaTeX. GladTeX
just didn't insert the alternative text for the image (for a historical
reason). I decided to develop this feature. The result is now that every
image in your output document has automatically alternative texts
inserted for each equation. Additionally, you can choose that equations
which are longer than 80 characters are automatically outsourced into a
separate file. The image then becomes a link pointing to an external
HTML file containing the long version of the equation. This is necessary
because e.g. line breaks are ignored inside alternative texts. Blind
people can now work with sighted colleagues on one (HTML) document. As
soon as an image occurs, the sighted person will see the equation nicely
formatted and the screen reader user the LaTeX equivalent.&lt;/p&gt;
&lt;p&gt;If you want to have an example how it could look like then you just have
to visit Wikipedia with an arbitrary maths article. They use at least
the same approach.&lt;/p&gt;
&lt;p&gt;I mentioned earlier that I stumbled over
&lt;a href="http://humenda.github.io/GladTeX"&gt;GladTeX&lt;/a&gt; by using
&lt;a href="http://johnmacfarlane.net/pandoc"&gt;Pandoc&lt;/a&gt;. With pandoc you can convert
a lot of document formats into even more document formats. With the
mentioned &lt;code&gt;--gladtex&lt;/code&gt; option, you can transfer the following document
into a HTML with picture and automatic alternative descriptions:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;# My Example Document

##  blah

## Pythagoras Law

Short: $c^2 = a^2 + b^2$
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The conversion is as easy as:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;pandoc --gladtex --smart -o blah.ex blah.md
gladtex -d images blah.htex
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;(provided that the file is called blah.md)&lt;/p&gt;
&lt;p&gt;The project home page is at &lt;a href="http://humenda.github.io/GladTeX"&gt;http://humenda.github.io/GladTeX&lt;/a&gt;. There
you can obtain the source code to compile it on your system, which is
not too hard. The program has also been patched to run on Windows, but
there is no binary build to download yet.&lt;/p&gt;</content></entry><entry><title>GPG — Value The Privacy Of Your E-Mail</title><link href="https://crustulus.de/2014/03/gpg-value-the-privacy-of-your-e-mail/" rel="alternate"></link><published>2014-03-07T00:00:00+01:00</published><updated>2014-03-07T00:00:00+01:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2014-03-07:/2014/03/gpg-value-the-privacy-of-your-e-mail/</id><summary type="html">&lt;p&gt;GPG is a widely unknown encryption and signing service for electronic
mail. Its features can be handy: you can safely deliver banking
information via e-mail when using GPG or verify the authenticity of the
sender of a message. I wil describe the basic setup for a GPG key, GPG
configuration …&lt;/p&gt;</summary><content type="html">&lt;p&gt;GPG is a widely unknown encryption and signing service for electronic
mail. Its features can be handy: you can safely deliver banking
information via e-mail when using GPG or verify the authenticity of the
sender of a message. I wil describe the basic setup for a GPG key, GPG
configuration and GPG key signing.&lt;/p&gt;
&lt;h3&gt;The Web Of Trust&lt;/h3&gt;
&lt;p&gt;A basic principle in GPG is the web of trust. The web of trust is build
around the principle that you trust people and in turn they also trust
people. If you write an e-mail to another user with GPG and three people
you trust trust him, you automatically trust him too. Trust in this
context means that you trust that the e-mail has come from him or her.
When using GPG, every message gets a signature that helps to verify the
authenticity of the sender. &lt;em&gt;Signing&lt;/em&gt; in this context is meant to be the
same as &lt;strong&gt;signing&lt;/strong&gt; of a document by hand.&lt;/p&gt;
&lt;h3&gt;Creating A Configuration&lt;/h3&gt;
&lt;p&gt;While creating a configuration is the most boring step in using a new
piece of software, I will start with it nonetheless to save us some
typing on the command line. First create the hidden directory &lt;code&gt;.gnupg&lt;/code&gt;
in your home directory, e.g. by typing on the command line:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mkdir -p ~/.gnupg
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Then you can open the (most probably empty) file &lt;code&gt;.gnupg/gpg.conf&lt;/code&gt; in
your home directory. Enter the following text into it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;keyserver hkp://pgp.zdv.uni-mainz.de:11371
keyserver-options auto-key-retrieve
# security: newer algorithms:
personal-digest-preferences SHA256
cert-digest-algo SHA256
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
&lt;/pre&gt;&lt;/div&gt;


&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;key-server&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;Keyservers are directories of keys from users who chose to upload
their keys. When you upload your key, people can sign your key (in
order to say that they trust you) or even distrust you.\
You can choose any server you want, they are synchronized.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;auto-retrieve&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;With this option, you are specifying that keys not in your key ring
are automatically retrieved (e.g. when opening an e-mail). If this
is missing, you always have to type &lt;code&gt;gpg --retrieve-key &amp;lt;id&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3&gt;Generating A Key&lt;/h3&gt;
&lt;p&gt;Before anyone can trust you, you need to generate a private and a public
key; the public key will be for everyone to encrypt messages send to
you. The private key on the opposite is just for you which allows you to
decrypt the messages again. Furthermore you can sign your -emails with
the private key. You generate such a key using&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;gpg --gen-key
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;GPG will ask you a couple of questions. First of all, you select which
key type you want, it is safe to answer "1" (for a RSA key). Afterwards,
you can select the length of the key and the validity period. Then you
enter your name, your e-mail address, the comment field may stay empty.
The rest of the instructions is self-explanatory.&lt;/p&gt;
&lt;p&gt;You should keep in mind that the private key must stay private, since it
allows signing your e-mails with your name and decrypting your personal
messages. The public key can be distributed, since with this key
messages can be only encrypted for you.&lt;/p&gt;
&lt;p&gt;For the web of trust it is required that you trust yourself ultimately,
which is a good thing anyway. Do the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Execute &lt;code&gt;gpg --list-keys&lt;/code&gt; and note down your key id. The key id can
    be found after the key word pub, followed by the length; the
    characters after the / are your id.&lt;/li&gt;
&lt;li&gt;Now you edit your key using &lt;code&gt;gpg --edit-key &amp;lt;yourid&amp;gt;&lt;/code&gt;. You are now
    in a text-mode interface.&lt;/li&gt;
&lt;li&gt;You can add e-mail aliases, if you have multiple mail addresses or a
    provider with multiple names like gmail vs. googlemail. Use &lt;code&gt;adduid&lt;/code&gt;
    and answer the questions.&lt;/li&gt;
&lt;li&gt;Now use the command &lt;code&gt;uid&lt;/code&gt; for selecting all user IDs. If you have
    two user IDs, use &lt;code&gt;uid 1&amp;lt;return&amp;gt;uid 2&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Finally, you should trust yourself ultimately using &lt;code&gt;trust 5&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;save&lt;/code&gt; to save the key.&lt;/li&gt;
&lt;li&gt;After you have done the modifications, use &lt;code&gt;gpg --send-key &amp;lt;id&amp;gt;&lt;/code&gt; to
    send the key to the configured server.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Exchange Finger Prints And Trust Other People&lt;/h3&gt;
&lt;p&gt;Each key has a finger print. It is like with real finger prints: you can
use them to check whether the signature from an e-mail really belongs to
the sender or whether the e-mail was caught or modified during its way
to you. To get your finger print use&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;gpg --finger-print &amp;lt;id&amp;gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Check this finger print with the person which wants to trust you. For
unknown people it might be even advisable to ask them for their identity
card. You have to do the same on the foreign key: exchange the finger
print with the person who you want to trust.&lt;/p&gt;
&lt;p&gt;When you and your partner have exchanged the finger prints and you are
sure that you trust him, run&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;gpg --edit-key &amp;lt;friend_id&amp;gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This of course assumes that the key is already in your llocal key ring.
Since you have configure &lt;code&gt;auto-retrieve&lt;/code&gt; for GPG, this should happen as
soon as you open a signed e-mail of the person.&lt;/p&gt;
&lt;p&gt;The trust procedure is nearly the same except that you only trust other
people with level 4 and 3. Level 4 is for people which you saw from face
to face, level 3 for people whom you only trust marginally. For level 4,
you can also sign the key, using &lt;code&gt;sign&lt;/code&gt; (imagine you would sign the
identity card). Don't forget to safe and upload the key afterwards.&lt;/p&gt;
&lt;h3&gt;Using GPG In Real Life&lt;/h3&gt;
&lt;p&gt;I hope I have walked you through a basic setup of GPG. Now you should
choose an e-mail-client which makes using GPG really easy. I have here a
personal, not comprehensive list, sorted by preference. I am not
suggesting Thunderbird. It is a choice, however the plugin Enigmail has
some issues like old-style signatures or own configuration handling and
therefore I would suggest Claws-Mail to those users.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;mutt&lt;/dt&gt;
&lt;dd&gt;This is a command-line client for GNU/Linux or UNIX which has great
options for GPG like sending automatically encrypted e-mails to
people who you trust. Scripts can also exclude people from receiving
GPG signatures if their&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;mail program don't support signatures. Claws mail : A powerful e-mail
client with a graphical user interface. Unlike Thunderbird and friends,
claws mail has integrated GPG support and doesn't ignore your GPG
settings, but rather uses those which you have edited yourself in
&lt;code&gt;.gnupg/gpg.conf&lt;/code&gt;. K-9 Mail : K-9 Mail is a fork of the original Android
e-mail client which brings a lot of neat features for mail reading on a
telephone together with (optional) GPG support.&lt;/p&gt;</content></entry><entry><title>Accessibility In Android</title><link href="https://crustulus.de/2013/09/accessibility-in-android/" rel="alternate"></link><published>2013-09-15T00:00:00+02:00</published><updated>2013-09-15T00:00:00+02:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2013-09-15:/2013/09/accessibility-in-android/</id><summary type="html">&lt;p&gt;Finally I got my hands on a Samsung smartphone and tried out the
accessibility provided with Talkback on an Android 4.2.2. I want to give
a short overview what is already working and what not. Fortunately, I
cannot (and don't want!) compare the accessibility to the other big …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Finally I got my hands on a Samsung smartphone and tried out the
accessibility provided with Talkback on an Android 4.2.2. I want to give
a short overview what is already working and what not. Fortunately, I
cannot (and don't want!) compare the accessibility to the other big
mobile operating system which has currently accessibility features.&lt;/p&gt;
&lt;p&gt;The telephone I'm using is a Samsung Galaxy S+. The good thing about
this model is that it has (in contrary to the Samsung Galaxy S)
regardless of the age a relatively fast CPU (1.4 GHZ). Since the Android
on this telephone was too old and it didn't get updates, I decided to
flash it with &lt;a href="http://www.cyanogenmod.org"&gt;CyanogenMod&lt;/a&gt; with the help of
a friend of mine.&lt;/p&gt;
&lt;p&gt;After the screen reader Talkback was enabled, the usual start screen was
presented to me. The next step was to get used to &lt;a href="https://support.google.com/nexus/galaxy/answer/2926973?hl=en"&gt;“Explore By
Touch”.&lt;/a&gt;
It clearly needs some time to get used to the gestures, especially when
your used to navigate rapidly with a keyboard. I soon discovered that
the six horizontal icons at the bottom of the start screen were not
announced by Talkback. Since the phone vibrates when sliding over an
icon, one can use those icons nonetheless.\
In general, the user interface runs smoothly on this phone, even though
it is already a bit out-of-date.&lt;/p&gt;
&lt;p&gt;Everything from choosing applications to run, writing SMS, making a
call, using the Google Playstore to install new applications works
great. The android keyboard needs clearly some time to get used to, but
this is more a touch vs. keyboard issue.&lt;/p&gt;
&lt;p&gt;The first application I've added was eSpeak, since I cannot stand
“natural sounding” speech synthesizers. In my opinion they cannot speak
fast and accurate. eSpeak was a good choice there, since it is free as
in freedom, can speak really fast and is not resource-hungry. One has to
note that the on-board applications from android are not the best in
regard of accessibility. Specifically, the mail client and the browser
were inaccessible. There are anyway better solutions out there, one
should take those. For me K-9-Mail works great, it even has PGP support
and advanced IMAP configuration settings! The browser of my choice is
firefox, since I don't trust Chrome in general.\
Further more VLC, StreamServe and a file explorer from RythmSoft are
handy too. The only non-free application here is the file manager.&lt;/p&gt;
&lt;p&gt;While there are already a lot of acccccessibility features, there are
also quite obvious down sides. One is that navigation in edit views is
not really possible. You can delete characters, but you can't go back
one word and so on. However Firefox can do this &lt;a href="http://www.marcozehe.de/2013/06/21/new-features-for-talkback-users-in-firefox-for-android-24/"&gt;since version
24.&lt;/a&gt;
Furthermore edit fields with multiple lines are not readable line by
line. As far as I understand, the &lt;a href="http://eyesfree.blogspot.com"&gt;eyes-free keyboard (also from the
Playstore)&lt;/a&gt; aims to work around those
limitations, but I haven't yet get used to it, because it hinders me
interacting efficiently with my phone.&lt;/p&gt;
&lt;p&gt;Furthermore there is no really good accessible text editor or eBook
reader out there. The first one lacks support due to the fact that
multiline edit views are not accessible, the latter has just not been
“invented”. Firefox does a great job with “Explore By Touch”, so the
same would be basically possible with an eBook reader. The best you'll
find are eBook reader which start reading (with their own speech
capability) with a gesture and stop reading when you tap on the screen.
Sufficient scrolling is impossible. I will read my texts in Firefox,
there are enough possibilities to generate HTML.\
A &lt;a href="http://de.wikipedia.org/wiki/DAISY-H%C3%B6rbuch"&gt;DAISY&lt;/a&gt; player free
of charge is also not available, which is also one would like to have.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Conclusion&lt;/em&gt;\
There has been much done about accessibility in Android and I have
switched over to android full-time. There are just a few portions on the
system (at least on mine) which are non-free and this is also a pleasing
fact. There is a lot of mumbling from the users of the other big phone
OS with accessibility. Some of those users of this system argue that
Android would be really unusable. That might be true for specific use
cases, but in general, Android is much more open and much more
configurable/flexible and hence &lt;em&gt;can&lt;/em&gt; fit requirements. Accessibility is
there, one just needs to want it!&lt;/p&gt;</content></entry><entry><title>Encodings In CGI Scripts Using Python3</title><link href="https://crustulus.de/2013/09/encodings-in-cgi-scripts-using-python3/" rel="alternate"></link><published>2013-09-12T00:00:00+02:00</published><updated>2013-09-12T00:00:00+02:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2013-09-12:/2013/09/encodings-in-cgi-scripts-using-python3/</id><summary type="html">&lt;p&gt;As some &lt;em&gt;might&lt;/em&gt; have noticed, I have rewritten my internal blog handling
to make the appearance more uniform with the general web site design and
to allow comments in the future. Since I now have switched „full-time”
to Python 3.x, I had some real problems with encodings in Python3-CGI …&lt;/p&gt;</summary><content type="html">&lt;p&gt;As some &lt;em&gt;might&lt;/em&gt; have noticed, I have rewritten my internal blog handling
to make the appearance more uniform with the general web site design and
to allow comments in the future. Since I now have switched „full-time”
to Python 3.x, I had some real problems with encodings in Python3-CGI
scripts, which I here want to discuss.&lt;/p&gt;
&lt;p&gt;It all started with an error of a Python 3.x script with Apache on my
server saying:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;UnicodeEncodeError: &amp;#39;ascii&amp;#39; codec can&amp;#39;t encode character &amp;#39;xxx&amp;#39; in position 0: ordinal not in range(128)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Since I am encoding everything in UTF-8 and all my systems use this
encoding, I didn't expect problems. I first tried to write directly
UTF-8 characters to &lt;code&gt;sys.stdout&lt;/code&gt;, like:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;sys&lt;/span&gt;
&lt;span class="n"&gt;bprint&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdout&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;buffer&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;write&lt;/span&gt;
&lt;span class="n"&gt;text_ugly&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;öäü……·&amp;quot;&lt;/span&gt;
&lt;span class="n"&gt;bprint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="n"&gt;text_ugly&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;utf-8&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Strange enough, this worked only with one CGI script, the other one
still threw an error, even though both read the same source. So I added
the following two lines to my &lt;code&gt;apache.conf&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;AddDefaultCharset UTF-8
SetEnv PYTHONIOENCODING utf8
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I thought that to be the nicest solution, but it didn't work out either.
I then read numerous threads all discussing the same problem, but the
people there found solutions I could not use. My concrete problem was a
&lt;code&gt;UnicodeEncodeError&lt;/code&gt; saying that &lt;a href="http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters"&gt;surrogate
characters&lt;/a&gt;
could not be encoded to UTF-8. Something weird turned my Umlauts into
surrogate characters, or more specifically, just one character. All
umlauts before this one and after it were fine!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.verious.com/source/1918/"&gt;This article&lt;/a&gt; pointed me at least
to an understanding of the problem. Not all functions in Python 3 are
(or were) fully Unicode-compatible, like e.g. &lt;code&gt;os.environ&lt;/code&gt; and produced
sometimes surrogate characters. In my case it were &lt;code&gt;os.listdir()&lt;/code&gt;. On my
local laptop, I'm running Debian Unstable with Python 3.3.x, my server
has Python 3.2. The problem only occures on my Server,, so I guess the
Python developers might have fixed it. My simple solution is now to do
the encoding like:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;s.encode(&amp;#39;utf-8&amp;#39;, errors=&amp;#39;surrogateescape&amp;#39;)
&lt;/pre&gt;&lt;/div&gt;</content></entry><entry><title>uTeXer: replace (math) Unicode</title><link href="https://crustulus.de/2013/08/utexer-replace-math-unicode/" rel="alternate"></link><published>2013-08-04T00:00:00+02:00</published><updated>2013-08-04T00:00:00+02:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2013-08-04:/2013/08/utexer-replace-math-unicode/</id><summary type="html">&lt;p&gt;When I am reading scientific papers or technical books, I'm often
stumbling over formulas. Since I'm using a screen reader, I can't read
(in most cases) the Unicode signs and therefore they must be corrected
(transcribed into LaTeX commands) by someone else. Another annoying
thing are the ligatures produced by …&lt;/p&gt;</summary><content type="html">&lt;p&gt;When I am reading scientific papers or technical books, I'm often
stumbling over formulas. Since I'm using a screen reader, I can't read
(in most cases) the Unicode signs and therefore they must be corrected
(transcribed into LaTeX commands) by someone else. Another annoying
thing are the ligatures produced by LaTeX, found in a lot of PDF's,
because they can't be read by speech synthesizers.&lt;/p&gt;
&lt;p&gt;The solution is simple but yet it seems to me that I was the first to
implement that way. I have written a little Python script which uses the
Unicode table from the W3C (which also ships LaTeX signs!) which
replaces the occurring Unicode sequences into LaTeX / removes Latin
ligatures.&lt;/p&gt;
&lt;p&gt;Since the taste of people which LaTeX command to use is quite different,
I also added customization capabilities to override (or even add) new
Unicode points.&lt;/p&gt;
&lt;p&gt;You can have a look at &lt;a href="/projects/utexer.en.html"&gt;the project page&lt;/a&gt; or
check out the source using:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;git clone https://github.com/humenda/utexer.git
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Have fun!&lt;/p&gt;</content></entry><entry><title>Chroot At Boot Time</title><link href="https://crustulus.de/2013/07/chroot-at-boot-time/" rel="alternate"></link><published>2013-07-04T00:00:00+02:00</published><updated>2013-07-04T00:00:00+02:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2013-07-04:/2013/07/chroot-at-boot-time/</id><summary type="html">&lt;p&gt;I wanted to experiment with more up-to-date software while preserving my
stable working environment. Of course a frequent desire. Therefore I
build a Debian unstable chroot and tried to get X running. But I didn't
want to run chroot manually. In this article, I want to show you how I …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I wanted to experiment with more up-to-date software while preserving my
stable working environment. Of course a frequent desire. Therefore I
build a Debian unstable chroot and tried to get X running. But I didn't
want to run chroot manually. In this article, I want to show you how I
start my chroot with X support at log-in-time on a separate console. It
should be mentioned that other tutorials already discuss this topic, but
they didn't work for me.&lt;/p&gt;
&lt;p&gt;Most tutorials mention that you have to bind-mount /dev, but you should
mount /proc and /sys as well. All directories must be mounted with the
option “--bind”. I assume that you replace \$CHROOT:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mount --bind /dev $CHROOT/dev
mount --bind /proc $CHROOT/proc
mount --bind /sys $CHROOT/sys
mount --bind /sys $CHROOT/sys
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If you want to use your host's infrastructure, in Debian e.g. x11-common
and dbus, you should bind-mount also the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mount --bind /run $CHROOT/run
mount --bind /tmp $CHROOT/tmp
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Really handy is now to enter the mount points in the fstab, to execute
them right at system boot:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;/dev $CHROOT/dev none bind 0 0
...
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now a simple chroot is not that uncommon. It might be cool if you could
log into the system like you log in on the console at the host. So let's
adjust the &lt;code&gt;/etc/inittab&lt;/code&gt;-file for this. In this file, there might be a
line like:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;2345&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;respawn&lt;/span&gt;&lt;span class="o"&gt;:/&lt;/span&gt;&lt;span class="n"&gt;sbin&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;getty&lt;/span&gt; &lt;span class="mi"&gt;38400&lt;/span&gt; &lt;span class="n"&gt;tty1&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;and similar lines for each console which is activated (on Debian 6
tty's). I now changed line 5 to:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;respawn&lt;/span&gt;&lt;span class="o"&gt;:/&lt;/span&gt;&lt;span class="n"&gt;usr&lt;/span&gt;&lt;span class="sr"&gt;/sbin/chroot $CHROOT /sbin/g&lt;/span&gt;&lt;span class="n"&gt;etty&lt;/span&gt; &lt;span class="mi"&gt;38400&lt;/span&gt; &lt;span class="n"&gt;tty5&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Note: if your doing that on a non-Debian system, chroot might be located
elsewhere, try &lt;code&gt;whereis chroot&lt;/code&gt; for the correct path. Furthermore it can
happen that your system doesn't use getty but agetty instead (like
Arch). Here the example for my Arch chroot:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;respawn&lt;/span&gt;&lt;span class="o"&gt;:/&lt;/span&gt;&lt;span class="n"&gt;usr&lt;/span&gt;&lt;span class="sr"&gt;/sbin/chroot $CHROOT /usr/bin/&lt;/span&gt;&lt;span class="n"&gt;agetty&lt;/span&gt; &lt;span class="mi"&gt;38400&lt;/span&gt; &lt;span class="n"&gt;tty6&lt;/span&gt; &lt;span class="n"&gt;linux&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Reload the inittab file afterwards with &lt;strong&gt;&lt;code&gt;telnit Q&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Now I have got the possibility to switch on console 5 to do my packaging
work in Debian unstable and have a look at the latest developments in
Debian.&lt;/p&gt;
&lt;p&gt;I have tried to get X running with startx in Arch, as I did in Debian
unstable. Unfortunately this is impossible with Debian as host system.
You need for GNOME 3.8 the latest dbus. Dbus in turn needs ConsoleKit or
loginctl (on arch the latter). Loginctl is a systemd service, not
available on Debian currently.&lt;/p&gt;</content></entry><entry><title>Activities In Debian</title><link href="https://crustulus.de/2013/04/activities-in-debian/" rel="alternate"></link><published>2013-04-18T00:00:00+02:00</published><updated>2017-03-18T00:00:00+01:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2013-04-18:/2013/04/activities-in-debian/</id><summary type="html">&lt;p&gt;In the last months, quite a few changes went into Debian, especially because
Wheezy
will be released soon. At this point a short overview about activities
from me or about things which I've translated in the Wiki and are
noteworthy to mention.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;accessibility of the graphical login manager (GDM3)&lt;/li&gt;
&lt;li&gt;brailleUtils …&lt;/li&gt;&lt;/ol&gt;</summary><content type="html">&lt;p&gt;In the last months, quite a few changes went into Debian, especially because
Wheezy
will be released soon. At this point a short overview about activities
from me or about things which I've translated in the Wiki and are
noteworthy to mention.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;accessibility of the graphical login manager (GDM3)&lt;/li&gt;
&lt;li&gt;brailleUtils 1.2.1 in Debian Unstable&lt;/li&gt;
&lt;li&gt;Debian FreeDict team is being founded&lt;/li&gt;
&lt;li&gt;Notes for accessibility of java&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Accessibility Of The Graphical Login Manager GDM3&lt;/h3&gt;
&lt;p&gt;It was already documented in the &lt;a href="http://wiki.debian.org/Barrierefreiheit"&gt;Debian
Wiki&lt;/a&gt; that GDM3 would have no
support for &lt;a href="http://live.gnome.org/Orca"&gt;Orca.&lt;/a&gt; This was due to the
switch to GNOME3. Luckily a new version of GDM was uploaded &lt;a href="http://lists.debian.org/debian-accessibility/2013/04/msg00020.html"&gt;just in
time,&lt;/a&gt;
where the problem has been fixed.&lt;/p&gt;
&lt;h3&gt;brailleUtils 1.2.1 in Debian Unstable&lt;/h3&gt;
&lt;p&gt;I have packaged the latest version of
[brailleUtils](https://github.com/brailleapps/brailleutils9, a utility to print
braille with braille embossers from the command line.
This release brings the following changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;support for new printers&lt;/li&gt;
&lt;li&gt;there is now a separate package named
    &lt;a href="http://packages.debian.org/brailleutils"&gt;brailleutils&lt;/a&gt; which makes
    the example-front-end of brailleUtils available as a command (using
    a shell script).&lt;/li&gt;
&lt;li&gt;I have written a manual page for brailleUtils, since there was none
    yet in the project.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Therefore one can now print quite easily braille texts from the command
line.&lt;/p&gt;
&lt;h3&gt;Debian FreeDict Team Being founded&lt;/h3&gt;
&lt;p&gt;A short while ago, I have started to found a Debian team. There is
already a &lt;a href="http://wiki.debian.org/freedict"&gt;Wiki page&lt;/a&gt; and an IRC
Channel: &lt;code&gt;#debian-freedict&lt;/code&gt; on &lt;code&gt;irc.debian.org&lt;/code&gt;. Helping hands are of
course wanted!&lt;/p&gt;
&lt;h3&gt;Accessibility Of Java&lt;/h3&gt;
&lt;p&gt;In the &lt;a href="http://wiki.debian.org/Barrierefreiheit"&gt;Debian Wiki&lt;/a&gt; was just
documented what is needed to achieve accessibility for graphical java
interfaces (like those of Swing). One just needs to install
&lt;code&gt;libatk-wrapper-java&lt;/code&gt; and then uncomment the following line in
&lt;code&gt;/etc/java-6-openjdk/accessibility.properties&lt;/code&gt; (for java 6, else adjust
the path):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;assistive_technologies=org.GNOME.Accessibility.AtkWrapper
&lt;/pre&gt;&lt;/div&gt;</content></entry><entry><title>Scanning And Recognizing Text On The Console</title><link href="https://crustulus.de/2013/04/scanning-and-recognizing-text-on-the-console/" rel="alternate"></link><published>2013-04-02T00:00:00+02:00</published><updated>2013-04-02T00:00:00+02:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2013-04-02:/2013/04/scanning-and-recognizing-text-on-the-console/</id><summary type="html">&lt;p&gt;The usual problem seems to be that there are a lot of tools which do the
job, but the available front ends don't fulfil the personal
requirements. Look at the current scanning front ends:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;XSANE does not use Tesseract / Cuneiform (as OCR back-ends) by
    default which are the best (where …&lt;/li&gt;&lt;/ul&gt;</summary><content type="html">&lt;p&gt;The usual problem seems to be that there are a lot of tools which do the
job, but the available front ends don't fulfil the personal
requirements. Look at the current scanning front ends:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;XSANE does not use Tesseract / Cuneiform (as OCR back-ends) by
    default which are the best (where I tend to take Tesseract, it's
    fully free and gives better results). Furthermore batch scanning is
    not comfortable (to many steps in between).&lt;/li&gt;
&lt;li&gt;There is
    &lt;a href="http://code.google.com/p/linux-intelligent-ocr-solution/"&gt;LIOS&lt;/a&gt;.
    The main disadvantage for me is that it is poorly accessible (at
    least at the first glance with &lt;a href="http://live.gnome.org/Orca"&gt;Orca&lt;/a&gt;)
    and not very intuitive. Please note that this are &lt;em&gt;my&lt;/em&gt; impressions.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Therefore I've decided to reinvent the wheel and write another front
end, just a little, functional one. The result is
&lt;a href="http://www.crustulus.de/projects/papierzutext"&gt;Papierzutext&lt;/a&gt; which is a
little program written in Python to scan, recognize and read text.
Currently it scans the text, recognizes it with Tesseract and displays /
and saves the text into a file. Features include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;scan pages with options like density, etc.&lt;/li&gt;
&lt;li&gt;when set, recognize text during the scanner draws back the lamp
    (otherwise the computer is idle)&lt;/li&gt;
&lt;li&gt;use exactimage to refurbish the picture&lt;/li&gt;
&lt;li&gt;save recognized text and images so that text can be reviewed, pages
    deleted etc. after restarting the program&lt;/li&gt;
&lt;li&gt;set OCR language&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please try it out and send me feedback. You can obtain the program by
checking out the git repository:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;git clone http://www.crustulus.de/git/papierzutext
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;For Installation hints, look into the file INSTALL.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;And now some critics.&lt;/em&gt; While this program is suitable for scanning
books with only texts, tables and more complicated layouts are
difficult. Also the orientation recognition (how the paper lies on the
scanner) does not work satisfying. These are problems of Tesseract and
this program is only useful if you use Tesseract &amp;gt; Version 3.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Have fun!&lt;/em&gt;&lt;/p&gt;</content></entry><entry><title>Virtualisation With Braille And Speech</title><link href="https://crustulus.de/2013/03/virtualization-with-braille-and-speech/" rel="alternate"></link><published>2013-03-30T00:00:00+01:00</published><updated>2017-03-18T00:00:00+01:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2013-03-30:/2013/03/virtualization-with-braille-and-speech/</id><summary type="html">&lt;p&gt;I keep translating the Debian wiki page about accessibility into German. This
helps me following the latest accessibility developments within the project.
This way, I recently learned about accessible virtualization, which I am
going to introduce here.&lt;/p&gt;
&lt;p&gt;I already knew about the &lt;code&gt;-curses&lt;/code&gt;
option for QEMU/KVM to start a …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I keep translating the Debian wiki page about accessibility into German. This
helps me following the latest accessibility developments within the project.
This way, I recently learned about accessible virtualization, which I am
going to introduce here.&lt;/p&gt;
&lt;p&gt;I already knew about the &lt;code&gt;-curses&lt;/code&gt;
option for QEMU/KVM to start a guest on the console, which gives basic
accessibility through the host's command line screen reader.
However, qemu supports sound card pass through and the simulation of a braille
device, which both together enable the full usage of the guest system.&lt;/p&gt;
&lt;p&gt;To enable braille in the guest, qemu simulates a braille display of a specific
vendor. All requests from the guest system to this virtual device are then
passed onto &lt;a href="https://brltty.com"&gt;BRLTTY&lt;/a&gt;, which has to run on the host system.
BRLTTY is a command line screen reader and it also features a braille API
(&lt;em&gt;BRLAPI&lt;/em&gt;), so that other applications can control the braille device. Qemu uses
this facility to pass-through output from the screen reader in the guest system
to the physical device on the host machine.&lt;/p&gt;
&lt;p&gt;The discussed options are:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;-soundhw all -usbdevice braille
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;That's it, assuming you have BRLTTY set up and you know how to use qemu.\
Please have a look at &lt;a href="http://wiki.debian.org/accessibility"&gt;the Debian Wiki page about
accessibility&lt;/a&gt; for more details.&lt;/p&gt;</content></entry><entry><title>Own Radio Stream With Icecast</title><link href="https://crustulus.de/2012/12/own-radio-stream-with-icecast/" rel="alternate"></link><published>2012-12-26T00:00:00+01:00</published><updated>2012-12-26T00:00:00+01:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2012-12-26:/2012/12/own-radio-stream-with-icecast/</id><summary type="html">&lt;p&gt;I like to listen my music everywhere where I want:wq , not only at the
computer . My smart phone has not enough space for all my music and
anyway, I don't like to keep the music on my notebooks &lt;strong&gt;and&lt;/strong&gt; my smart
phone synchronized. Therefore a own streaming server is …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I like to listen my music everywhere where I want:wq , not only at the
computer . My smart phone has not enough space for all my music and
anyway, I don't like to keep the music on my notebooks &lt;strong&gt;and&lt;/strong&gt; my smart
phone synchronized. Therefore a own streaming server is the easiest
solution. I'll describe here a quick setup which assumes Debian
GNU/Linux (or Ubuntu), but can be done on other *nixes as well.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;The first step is the installation of Icecast, on Debian or Ubuntu:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;# apt-get install icecast2
&lt;/pre&gt;&lt;/div&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Then the admin, source and relay-password need to be changed (in the
    file &lt;span class="inlineverbatim"&gt;/etc/icecast2/icecast.xml&lt;/span&gt;.
    On Debian/Ubuntu, you will be automatically prompted for those
    during the installation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Verify that the service is up and running by visiting &lt;span
    class="inlineverbatim"&gt;http://localhost:8000&lt;/span&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Icecast is only the service which handles the incoming client
connections. The real noise comes from a &lt;span
class="inlineverbatim"&gt;source&lt;/span&gt; which is provided by other
programs. One of those is Icegenerator, which will stream mp3 or ogg
audio files.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download the source from
    &lt;a href="http://www.becrux.com/index.php?page=projects&amp;amp;name=icegenerator"&gt;http://www.becrux.com/index.php?page=projects&amp;amp;name=icegenerator&lt;/a&gt;
    (where you also find basic instructions on how to set up
    the program).&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now some dependencies must be installed, on Debian/Ubuntu:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;# apt-get install libshout3-dev libid3-dev
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;(I hope I haven't forgot one)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the unpacked source the typical ritual: &lt;span
    class="inlineverbatim"&gt;./configure; make; make install&lt;/span&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Afterwards, the program is located in &lt;span
    class="inlineverbatim&gt;/usr/share/local/bin/icegenerator&lt;/b&gt;. The configuration needs to adjusted now, which can be found under &lt;span class="
    inlineverbatim"=""&gt;/usr/local/etc/icegenerator.conf&lt;/span&gt;. There
    various things can be set like the server where Icecast runs
    (here 127.0.0.1) or the port. More interesting is to set the mount
    point, which is the location where your stream becomes available, I
    chose /listen:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;MOUNT=/listen
&lt;/pre&gt;&lt;/div&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Then the user name and password to login into the Icecast service
    need to be set. The password is the one you chose during the
    Icecast installation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;The format is automatically set to mp3, which you can leave
    untouched, if you don't want to stream ogg vorbis files.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now set the path to the audio files and activate recursive search:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;MP3PATH=/path/to/mp3s
RECURSIVE=1
&lt;/pre&gt;&lt;/div&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The logging output can be set to a different file path which makes
    it possible to start Icegenerator as user.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;Finally, you can start Icegenerator by invoking &lt;span
    class="inlineverbatim"&gt;/usr/local/bin/icegenerator&lt;/span&gt; and enter
    in your player &lt;a href="http://localhost:8000/listen"&gt;http://localhost:8000/listen&lt;/a&gt; (or the URL which
    was configured).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I was not able to add path's (&lt;span
class="inlineverbatim""&gt;MP3PATH&lt;/span&gt;) containing spaces. It's simpler
to create a separate directory with lots of symlinks to the desired
music.&lt;/p&gt;</content></entry><entry><title>Tunneling Ports Behind NAT over SSH</title><link href="https://crustulus.de/2012/12/tunneling-ports-behind-nat-over-ssh/" rel="alternate"></link><published>2012-12-26T00:00:00+01:00</published><updated>2012-12-26T00:00:00+01:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2012-12-26:/2012/12/tunneling-ports-behind-nat-over-ssh/</id><summary type="html">&lt;p&gt;It can be useful to make a service from your machine available for
others, might it be a http server, a game server or even a icecast
streaming server. Unfortunately the pain called NAT can prohibit that
sometimes. The simple solution is to forward the port from your local
machine …&lt;/p&gt;</summary><content type="html">&lt;p&gt;It can be useful to make a service from your machine available for
others, might it be a http server, a game server or even a icecast
streaming server. Unfortunately the pain called NAT can prohibit that
sometimes. The simple solution is to forward the port from your local
machine to a server. The problem I had was that most sources in the
internet explain how to forward a port from a host to the local computer
by binding the port on this local machine. The fastest way for tunneling
is in my opinion to tunnel over SSH, since it has already all facilities
for this task. Throughout this article I'll use the term &lt;strong&gt;host&lt;/strong&gt; for
referring to the server which will tunnel the port out of the NAT.&lt;/p&gt;
&lt;p&gt;First of all, a configuration option has to be set in the host's
sshd_config, located at &lt;span
class="inlineverbatim"&gt;/etc/ssh/sshd_config&lt;/span&gt;. There has to be
set:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;GatewayPorts yes

in order to allow binding ports on the host not only on the loop back interface
but also on all others. Then the service needs to be restarted, on Debian/Ubuntu
with 
sudo service ssh restart
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;After that the service on the local computer can be started and the
tunnel created with the following command&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ssh -N -R &amp;lt;bind_address&amp;gt;:&amp;lt;local_port&amp;gt;:localhost:&amp;lt;host_port&amp;gt; &amp;lt;your_host&amp;gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Explanation:&lt;/p&gt;
&lt;div class="inlineverbatim"&gt;

-N

&lt;/div&gt;

&lt;p&gt;Do not spawn a shell&lt;/p&gt;
&lt;div class="inlineverbatim"&gt;

-R

&lt;/div&gt;

&lt;p&gt;Forward the port with &lt;strong&gt;from-to syntax&lt;/strong&gt;. See below&lt;/p&gt;
&lt;div class="inlineverbatim"&gt;

&amp;lt;bind\_address&amp;gt;

&lt;/div&gt;

&lt;p&gt;Specify the address (interface) where the port should be bound to.
Standard is loop back (where it isn't reachable from outside).&lt;/p&gt;
&lt;p&gt;The lazy can use &lt;span class="inlineverbatim"&gt;'*'&lt;/span&gt; to bind it to
all interfaces.&lt;/p&gt;
&lt;div class="inlineverbatim"&gt;

&amp;lt;local\_port&amp;gt;

&lt;/div&gt;

&lt;p&gt;The port on the local computer.&lt;/p&gt;
&lt;div class="inlineverbatim"&gt;

&amp;lt;host\_port&amp;gt;

&lt;/div&gt;

&lt;p&gt;Port on the host where the service becomes available.&lt;/p&gt;
&lt;div class="inlineverbatim"&gt;

&amp;lt;your\_host&amp;gt;

&lt;/div&gt;

&lt;p&gt;The host where the ssh server runs.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ssh -N -R &amp;#39;*&amp;#39;:1234:localhost:5678 myuser@foobar.org
&lt;/pre&gt;&lt;/div&gt;</content></entry><entry><title>Notes In LaTeX Made Easy</title><link href="https://crustulus.de/2012/09/notes-in-latex-made-easy/" rel="alternate"></link><published>2012-09-30T00:00:00+02:00</published><updated>2012-09-30T00:00:00+02:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2012-09-30:/2012/09/notes-in-latex-made-easy/</id><summary type="html">&lt;p&gt;I'm nearly writing everything in LaTeX, this ranges from letters to
scientific works over taking notes. Yes, taking notes can be easy even
with LaTeX, which I now want to explain. The idea behind is that I like
to take notes when reading a scientific book to remember later on …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I'm nearly writing everything in LaTeX, this ranges from letters to
scientific works over taking notes. Yes, taking notes can be easy even
with LaTeX, which I now want to explain. The idea behind is that I like
to take notes when reading a scientific book to remember later on what
was in there. Also in a lecture it can be quite handy to take some notes
and to have them structured later on in a nice way.&lt;/p&gt;
&lt;p&gt;The most annoying thing when writing down notes in LaTeX is the ever
repeating&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;\begin{itemize}
\item ...
\end{itemize}
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I like to be able to use the dash for a new item, as I would on the
paper. That's not hard, one must only understand how LaTeX handles
signs. First of all, you need to know that you can redefine every letter
in TeX. Then you have to know that you can rename control sequences.\
When renaming a command, you give the old command a new name and the old
one doesn't exist anymore. Consider the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;\newcommand\myname{\text{Erasmus Fuerchtegott von Gerstenbein}}
\let\notmyname\myname
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Newcommand&lt;/strong&gt; just creates an alias for the argument in braces.
&lt;strong&gt;\let&lt;/strong&gt; does the actual renaming. If I would use&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;\newcommand\notmyname\myname
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I would have two times the same command, using &lt;strong&gt;\let&lt;/strong&gt; removes the old
&lt;strong&gt;\myname&lt;/strong&gt;. In order to rename the dash, &lt;strong&gt;\let&lt;/strong&gt; is the best choice.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;\let\--
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I decided to overwrite &lt;strong&gt;\-&lt;/strong&gt; with the &lt;strong&gt;-&lt;/strong&gt;, because I think that I'll
never need to insert hyphens in notes. You can of course be creative and
choose something better.&lt;/p&gt;
&lt;p&gt;Then you have to make the dash active, which means that you can use the
dash actually as a control sequence. For this you need catcode, please
see &lt;a href="http://en.wikibooks.org/wiki/TeX/catcode"&gt;http://en.wikibooks.org/wiki/TeX/catcode&lt;/a&gt; for details.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;\catcode`-=\active
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Then you can simply define the dash as &lt;strong&gt;\item&lt;/strong&gt; using let:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;\let-\item
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If you structure your notes, you also need to insert headings or
something similar which interrupt the itemize environment. Because&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;\begin{itemize}...\end{itemize}
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;means a bit of overhead, I redefined them to the lesser and greater
signs. Those I stored in &lt;strong&gt;\lesser&lt;/strong&gt; and &lt;strong&gt;\greater&lt;/strong&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;\let\lesser&amp;lt;
\let\greater&amp;gt;

% redefinition:
\catcode`&amp;lt;=\active
\catcode`&amp;gt;=\active
\def&amp;lt;{\begin{itemize}}
\def&amp;gt;{\end{itemize}}
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;After all, we now can write something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;\documentclass&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;scrartcl&lt;span class="nb"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;% ...&lt;/span&gt;

&lt;span class="k"&gt;\begin&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;document&lt;span class="nb"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;\section&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;Love Live Of The Butterfly&lt;span class="nb"&gt;}&lt;/span&gt;

&amp;lt;
- live of butterfly in four states (egg, larva, pupa, adult)
- produces eggs
- has interesting courtship ritual with some kind of dance
&amp;gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If you want to use HTLatex in order to get an nice HTML file with links
and a table of contents, you need to insert the definitions &lt;strong&gt;below&lt;/strong&gt;
the &lt;strong&gt;\begin{document}&lt;/strong&gt;, otherwise the compilation will fail.&lt;/p&gt;
&lt;p&gt;I have put those redefinitions into a file which you can &lt;a href="http://crustulus.de/blog/attachments/latexkeynotes.tex"&gt;download
here&lt;/a&gt;. You can
use it by typing &lt;strong&gt;\input{latexkeynotes.tex}&lt;/strong&gt; (it applies the same
regarding htlatex).\
Please note that this prohibits dashes in filenames, if you plan to
input more files.&lt;/p&gt;</content></entry><entry><title>Debian/Backporting a package (or how to rebuild a package for your architecture</title><link href="https://crustulus.de/2012/05/debianbackporting-a-package-or-how-to-rebuild-a-package-for-your-architecture/" rel="alternate"></link><published>2012-05-27T00:00:00+02:00</published><updated>2012-05-27T00:00:00+02:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2012-05-27:/2012/05/debianbackporting-a-package-or-how-to-rebuild-a-package-for-your-architecture/</id><summary type="html">&lt;p&gt;In this article, I will summarize here what is needed to build Bitlbee 3.0 for 64
bit and how to rebuild a package in general.&lt;/p&gt;
&lt;p&gt;For proper building of a package, you should have "dpkg-buildpackage"
installed, which you can get using&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;aptitude install dpkg-dev
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Then you should install all …&lt;/p&gt;</summary><content type="html">&lt;p&gt;In this article, I will summarize here what is needed to build Bitlbee 3.0 for 64
bit and how to rebuild a package in general.&lt;/p&gt;
&lt;p&gt;For proper building of a package, you should have "dpkg-buildpackage"
installed, which you can get using&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;aptitude install dpkg-dev
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Then you should install all the needed dependencies for the package
you're planning to build. Either you know them or you look them up in
the README of your package. The debian-ic way would be&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;apt-get build-dep &amp;lt;package&amp;gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Having said this you have to make sure that the new version of your
package has no additional dependencies. For Bitlbee, just download the
source you find in my blog article.&lt;/p&gt;
&lt;p&gt;I now assume that you have your new source available. Do an&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;apt-get source &amp;lt;package&amp;gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;to fetch the "debian" directory of the package you want to build. The
debian directory is a special directory containing information about how
to build the package. If you choose to backport a package, copy the
debian-directory from the just downloaded source to the source of the
new version.&lt;/p&gt;
&lt;p&gt;You now have to look into three files which are in the debian directory
(not necessary if your just rebuilding Bitlbee for 64 bit):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;control: are all dependencies met (have a look at this file, it
    should be self-explanatory)&lt;/li&gt;
&lt;li&gt;debian/rules: ideally, there are rules like build: install: etc. If
    you never have looked into a Makefile, you should not make any
    changes.\
    For Bitlbee, I had to modify some of the ./configure arguments in
    order to includeOTR.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;changelog: This one tracks the changes as well as the
    version numbers. You need to add a new entry at the top, looking
    similar to this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;accessodf (3.0~b-1) unstable; urgency=low

  * backport of the package for Debian Squeeze
  * included OTR support.

 -- Sebastian Humenda &amp;lt;nospam@thanks.com&amp;gt;  Mon, 21 Mai 2012 14:21:13 +0200
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Please be careful with the spaces, all of them must be entered
exactly as shown. (two before the "*", else always one space)\
Some hints on versioning:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Debian version is always the last part of the number and
    begins with the "-". It's usually a 1.&lt;/li&gt;
&lt;li&gt;The version is always something like major.minor.minorminor. By
    adding a "\~b", you make sure that your package is labeled with
    3.0, but it has actually a lower priority than 3.0 (like a
    beta release). With this you make sure, that the Debian version
    of Bitlbee will be installed, when you upgrade.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When you have done all modifications to the debian directory (or none if
not needed), you can build the package as follows (assuming you are in
the source directory of your program):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;dpkg-buildpackage
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;In the directory above (".."), you need the orig.tar.gz-file, which you
got with the "aptitude source" command. Without this file dpkg will
report an error. For Bitlbee it's
&lt;a href="http://crustulus.de/deb/bitlbee_3.0~b-1.tar.gz"&gt;http://crustulus.de/deb/bitlbee_3.0\~b-1.tar.gz.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If everything went fine, you will have some warnings on the screen and
afterwards a Debian package in "..".&lt;/p&gt;
&lt;p&gt;Congratulations!&lt;/p&gt;</content></entry><entry><title>Braille-accessible output of Gnuplot</title><link href="https://crustulus.de/2012/04/braille-accessible-output-of-gnuplot/" rel="alternate"></link><published>2012-04-27T00:00:00+02:00</published><updated>2012-04-27T00:00:00+02:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2012-04-27:/2012/04/braille-accessible-output-of-gnuplot/</id><summary type="html">&lt;p&gt;There is no easy way for blind people to have a quick look at a
mathematical function or at a data plot of measurements. All
available solutions rely on sighted assistance.&lt;/p&gt;
&lt;p&gt;Recently, I had to plot some measurement data that I had taken from an
oscilloscope.
It was dissatisfactory to …&lt;/p&gt;</summary><content type="html">&lt;p&gt;There is no easy way for blind people to have a quick look at a
mathematical function or at a data plot of measurements. All
available solutions rely on sighted assistance.&lt;/p&gt;
&lt;p&gt;Recently, I had to plot some measurement data that I had taken from an
oscilloscope.
It was dissatisfactory to not be able to see what kind of curve I had plotted,
so I wondered whether I could get an ASCII representation of the plot. In the
old days, where the text console was the norm and not the exception, people
needed a solution to have a look at their plots without printing it to paper,
first. So they developed a "dumb" terminal driver for  Gnuplot, which
approximates the plot in ASCII art. This is extremely handy, because a braille
display for the blind is made exactly for this purpose: to display text.&lt;/p&gt;
&lt;p&gt;The following example illustrates how to plot
$x^2$ optimized for a 40 cell braille display. Open Gnuplot and enter the
commands (as shown below behind the &lt;code&gt;gnuplot&amp;gt;&lt;/code&gt; prompt):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;gnuplot&amp;gt; set terminal dumb 42 20
Terminal type set to &amp;#39;dumb&amp;#39;
Options are &amp;#39;feed  size 42, 20&amp;#39;
gnuplot&amp;gt; f(x) = x*x
gnuplot&amp;gt; plot f(x)


   100 *+------+-------+------+------+*
       **      +       +  f(x)+********
    90 +*                            *+
    80 ++*                          *++
       | **                        ** |
    70 ++ *                        * ++
    60 ++ **                      ** ++
       |   *                      *   |
    50 ++   *                    *   ++
    40 ++   **                  **   ++
       |     **                **     |
    30 ++     **              **     ++
    20 ++      **            **      ++
       |        **          **        |
    10 ++      +  ***  + ***  +      ++
     0 ++------+----******----+------++
      -10     -5       0      5       10
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;To ease the understanding of the characters for a braille display user, I'm
going to explain a few of the used signs here.
The "-" sign marks a
horizontal line, the "|" sign a vertical line. The "+" signs are just to
show where the numbers are. The most interesting sign is the "*", since
the function is plotted with it.&lt;/p&gt;
&lt;p&gt;The commands above do the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;set terminal dumb 42 20: Set the output to ASCII with 42 characters
    on each line and 20 lines in total.\&lt;/p&gt;
&lt;p&gt;Details on width and hight of the resulting graphic can be found
further below.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;f(x) = x*x&lt;/code&gt; defines the function. You can define variables before
    and use them in the expression. There are already functions
    predefined (e. g. sin and log) so you can use them in your function
    definitions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;plot f(x)&lt;/code&gt;: plots the defined function.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;\&lt;/p&gt;
&lt;p&gt;A second example with measurement data could look like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;gnuplot&amp;gt; set terminal dumb 42 20
Terminal type set to &amp;#39;dumb&amp;#39;
Options are &amp;#39;feed  size 42, 20&amp;#39;
gnuplot&amp;gt; plot &amp;#39;data.dat&amp;#39; with points


   90 ++---+-----+----+----+-----+---++
      +    +     +  &amp;#39;data.dat&amp;#39;   A    +
   80 ++                             +A
      |                               |
   70 ++                             ++
      |                               |
   60 ++                   A         ++
      |                               |
      |                               |
   50 ++                             ++
      |          A                    |
   40 ++                             ++
      |                               |
   30 ++                             ++
      +    +     +    +    +     +    +
   20 A+---+-----+----+----+-----+---++
      1   1.5    2   2.5   3    3.5   4
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;code&gt;data.dat&lt;/code&gt; contains measurement data, as you might have guessed. The data
points are represented using the character &lt;code&gt;A&lt;/code&gt;. Gnuplot is clever enough to
distinguish between different data sources, a second data file within the same
plot would have different point markers (for this example &lt;code&gt;B&lt;/code&gt;).&lt;/p&gt;
&lt;div class="note"&gt;

About width, height and the margin

&lt;/div&gt;

&lt;p&gt;Different braille displays have different length and therefore it makes sense to
adjust the size of the plot to your needs.
The &lt;code&gt;dumb&lt;/code&gt; terminal of Gnuplot accepts two options: width and height. For a 80
cell display, you could therefore type:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;gnuplot&amp;gt; set terminal 80 30
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The number of lines always depends on how much you want to navigate up
and down, but also on how big your graph is. In general, I like to use
20 lines with a 40 character display.&lt;/p&gt;
&lt;p&gt;Gnuplot likes to make plots look nice. For an ASCII plot, this is useless and
for blind users, this is simply a waste of space. Therefore the margin
(left/right) can be omitted or decreased:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;gnuplot&amp;gt; set rmargin 0
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The left margin can be left unchanged or calculated manually. There is
always one space from the y-Axis label and it is followed by the number.
For a two-digit number you would use:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;gnuplot&amp;gt; set lmargin 3
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;(or even 4 if you have also negative numbers). But again, I suggest
leaving the left margin unchanged.&lt;/p&gt;
&lt;p&gt;You can save those instructions into a file and load it every time you
open Gnuplot, so that you save some typing. Open e. g. &lt;code&gt;braille.plt&lt;/code&gt; and put something like this into
it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;set terminal dumb 40 20
set rmargin 0
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;and load this file using&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;gnuplot&amp;gt; load braille.plt
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;You can there predefine some functions too, if you like.&lt;/p&gt;</content></entry><entry><title>AccessODF now in Debian (and Ubuntu)</title><link href="https://crustulus.de/2012/04/accessodf-now-in-debian-(and-ubuntu)/" rel="alternate"></link><published>2012-04-09T00:00:00+02:00</published><updated>2017-03-18T00:00:00+01:00</updated><author><name>Sebastian Humenda</name></author><id>tag:crustulus.de,2012-04-09:/2012/04/accessodf-now-in-debian-(and-ubuntu)/</id><summary type="html">&lt;p&gt;I now have packaged another program for Debian (and for Ubuntu), which will
eventually tripple down into the next release: AccessODF. The
&lt;a href="http://accessodf.sf.net"&gt;web site&lt;/a&gt;
describes it as follows:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;AccessODF is an extension that can be used in OpenOffice.org Writer
and in LibreOffice Writer. It enables authors to find and …&lt;/p&gt;&lt;/blockquote&gt;</summary><content type="html">&lt;p&gt;I now have packaged another program for Debian (and for Ubuntu), which will
eventually tripple down into the next release: AccessODF. The
&lt;a href="http://accessodf.sf.net"&gt;web site&lt;/a&gt;
describes it as follows:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;AccessODF is an extension that can be used in OpenOffice.org Writer
and in LibreOffice Writer. It enables authors to find and repair
accessibility issues in their documents, i.e. issues that make their
documents difficult or even impossible to read for people with
disabilities.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But such a tool is only handy if you can install it easily; in Debian,
use your favorite program to install the package &lt;strong&gt;accessodf&lt;/strong&gt;. E. g.
type:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;apt-get install accessodf
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Odt2braille (&lt;a href="http://sf.net/p/odt2braille"&gt;http://sf.net/p/odt2braille&lt;/a&gt;) depends on AccessODF in
order to perform checks on the document before converting to braille. So
this helps you also to write your documents correctly in the first
place, if you want to emboss it later in braille. And there's another
handy thing: if you plan to export your ODF file later to a PDF, you'll
probably get a bit more accessible PDF too.&lt;/p&gt;</content></entry></feed>