<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

    <title>Tomáš Janoušek, a bug slayer</title>
    <link href="http://work.lisk.in/atom.xml" rel="self"/>
    <link href="http://work.lisk.in/"/>
    <updated>2011-06-30T02:37:33-07:00</updated>
    <id>http://work.lisk.in/</id>
    <author>
	<name>Tomáš Janoušek</name>
	<email>tomi@nomi.cz</email>
    </author>

    
    <entry>
	<title>Vibration bell for PuTTY for Symbian</title>
	<link href="http://work.lisk.in/2010/10/08/s2putty-vibrabell.html"/>
	<updated>2010-10-08T00:00:00-07:00</updated>
	<id>http://work.lisk.in/2010/10/08/s2putty-vibrabell</id>
	<content type="html">&lt;p&gt;&lt;a href=&quot;http://bd.kicks-ass.net/koodaus/putty/&quot;&gt;PuTTY&lt;/a&gt; is probably the most used application on my phone. I use it to
connect to my server where I read/write e-mails in &lt;a href=&quot;http://www.mutt.org/&quot;&gt;mutt&lt;/a&gt; and communicate
with the outer world using &lt;a href=&quot;http://www.irssi.org/&quot;&gt;irssi&lt;/a&gt; and &lt;a href=&quot;http://www.bitlbee.org/&quot;&gt;bitlbee&lt;/a&gt;. I suppose most PuTTY
users start it only whenever they need to fix something at their servers, not
as a primary communication tool. They didn't miss a function to alert the user
whenever something happens in a terminal.&lt;/p&gt;

&lt;p&gt;I did, however. I wanted to start PuTTY, attach a &lt;a href=&quot;http://www.gnu.org/software/screen/&quot;&gt;screen&lt;/a&gt; session and put
the phone in my pocket, knowing that it would vibrate whenever something
interesting happens. I always hated that whenever I had sent a message to
someone, I had to look at the screen regularly to check whether he replied or
not. So that's my motivation.&lt;/p&gt;

&lt;p&gt;The solution was obvious, I implemented the &lt;code&gt;do_bell&lt;/code&gt; function in PuTTY for
Symbian and made it vibrate for a few hundred milliseconds. The source code is
here: &lt;a href=&quot;http://github.com/liskin/s2putty&quot;&gt;http://github.com/liskin/s2putty&lt;/a&gt;. A prebuilt package for s60v5 is in
&lt;a href=&quot;http://github.com/liskin/s2putty/downloads&quot;&gt;downloads&lt;/a&gt;. Let me know if you need a binary for some other version of
Symbian.&lt;/p&gt;
</content>
    </entry>
    
    <entry>
	<title>Multiseat on demand: Split your computer into two whenever you want</title>
	<link href="http://work.lisk.in/2009/11/22/multiseat-on-demand.html"/>
	<updated>2009-11-22T00:00:00-08:00</updated>
	<id>http://work.lisk.in/2009/11/22/multiseat-on-demand</id>
	<content type="html">&lt;p&gt;We needed to make three computers out of two yesterday, so multiseat was the
keyword I googled for. Having found a bunch of howtos all starting with “make
these changes to xorg.conf and gdm.conf”, I took the best from all of them and
put together a solution requiring no single restart of X server. What I got
was this:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://store.lisk.in/tmp/perm/multiseat.jpg&quot; alt=&quot;Multiseat photo&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Well, what's the problem? Why didn't I just take the first howto I found? I
wanted to have a sort of “on demand” multiseat, that I can start and stop
whenever I want, without ever touching my main X server and its configuration,
without losing my open windows — even without having to rearrange them.&lt;/p&gt;

&lt;p&gt;What did I need?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;new enough X.org server and Xephyr server with input hotplug support
(I used 1.6.5),&lt;/li&gt;
&lt;li&gt;spare USB keyboard and mouse, spare monitor,&lt;/li&gt;
&lt;li&gt;clever window manager with per-screen workspaces (that's the feature that
lets me switch the external monitor to workspace 12 and still be able to
switch workspaces on my laptop's display) — I used xmonad, of course.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The theory is that the other seat will run in Xephyr, using the keyboard and
mouse I tell it to use. Xephyr can do that, nowadays, we only need to solve
three little problems:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;main X server uses that keyboard and mouse as well, and we need to disable
that in runtime,&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/dev/input/eventN&lt;/code&gt; is accessible to root only by default,&lt;/li&gt;
&lt;li&gt;a lot of keys don't work in Xephyr at all :-).&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Feel tree to skip the explanation of these:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The xinput command can be used to set device properties, and the “Device
Enabled” property is what we're looking for. Given a device id, this is how
we disable the device in the main X server:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; $ xinput list-props id | \
 perl -ne 'if (/Device Enabled \((\d+)\):/){ print $1 }' | \
 { read prop; xinput set-int-prop id $prop 8 0; }
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Being in a hurry, I added Xephyr for my user to &lt;code&gt;/etc/sudoers&lt;/code&gt;. You may
want to create udev rules to set correct permissions instead.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This seems to be caused by Xephyr not using the evdev ruleset for XKB
configuration by default. Running &lt;code&gt;setxkbmap&lt;/code&gt; with &lt;code&gt;-rules evdev&lt;/code&gt; seems to
fix this problem (see the script for details). Xephyr still seems to have
problems with autorepeat, and I guess that tweaking it for each keycode
with &lt;code&gt;xset r&lt;/code&gt; might fix it.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Having solved these problems, I wrote a small script that disables the input
devices in your main X server and launches Xephyr that uses them, fixing
keyboard afterwards: &lt;a href=&quot;http://store.lisk.in/tmp/perm/multiseatxephyr&quot;&gt;http://store.lisk.in/tmp/perm/multiseatxephyr&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If called without parameters, it prints a short usage instructions. You'll
have to look into &lt;code&gt;/proc/bus/input/devices&lt;/code&gt; to get event devices, and at the
xinput list output to find input device ids. It isn't very robust, but in most
cases you'll be interested in the last two input devices.&lt;/p&gt;

&lt;p&gt;Xephyr is running, with access control disabled, all you need to do now is to
su to another user, &lt;code&gt;export DISPLAY=:1&lt;/code&gt; and run &lt;code&gt;startkde&lt;/code&gt; (or anything else).&lt;/p&gt;

&lt;p&gt;If in trouble, consult the documentation. There are a few links at the X.org
wiki: &lt;a href=&quot;http://www.x.org/wiki/Development/Documentation/Multiseat&quot;&gt;http://www.x.org/wiki/Development/Documentation/Multiseat&lt;/a&gt;&lt;/p&gt;
</content>
    </entry>
    
    <entry>
	<title>Going tiled.</title>
	<link href="http://work.lisk.in/2009/10/28/going-tiled.html"/>
	<updated>2009-10-28T00:00:00-07:00</updated>
	<id>http://work.lisk.in/2009/10/28/going-tiled</id>
	<content type="html">&lt;p&gt;I had been using &lt;a href=&quot;http://fluxbox.org/&quot;&gt;Fluxbox&lt;/a&gt; for 7 years when I finally decided it's time for
change last Friday. As my friends expected, I left it for &lt;a href=&quot;http://xmonad.org/&quot;&gt;xmonad&lt;/a&gt;. Seven
years is a long time and for me it meant that I became a Fluxbox developer.
Therefore, I should say some nice goodbye.&lt;/p&gt;

&lt;p&gt;It all started in 2002 when a friend of mine switched me to Linux. I installed
it onto my father's laptop, which only had 32 MB of memory and quickly
realized that GNOME, KDE and Mozilla aren't for me. Someone gave me a tarball
of fluxbox 0.1.12, I installed it, and liked it. Unfortunately, I have no
screen shots or photos from that time.&lt;br/&gt;
(just this one: &lt;a href=&quot;http://foto.nomi.cz/d/22669-2/ja_v_klobouku.jpg&quot;&gt;http://foto.nomi.cz/d/22669-2/ja_v_klobouku.jpg&lt;/a&gt; :-))&lt;/p&gt;

&lt;p&gt;Later that year, I installed fluxbox 0.1.14 (the last in 0.1 series) onto my
“workstation” and it turned out that I would stick with that old version for
another 4 years.&lt;/p&gt;

&lt;p&gt;The look of my workspace evolved a little over the years. I chose a few shots
that demonstrate that :-).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://store.lisk.in/tmp/perm/goingtiled_1.png&quot;&gt;&lt;img src=&quot;http://store.lisk.in/tmp/perm/goingtiled_1_small.jpg&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://store.lisk.in/tmp/perm/goingtiled_2.png&quot;&gt;&lt;img src=&quot;http://store.lisk.in/tmp/perm/goingtiled_2_small.jpg&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://store.lisk.in/tmp/perm/goingtiled_3.png&quot;&gt;&lt;img src=&quot;http://store.lisk.in/tmp/perm/goingtiled_3_small.jpg&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the meantime, Fluxbox team was working hard on the 0.9 series, hoping to
get it stable enough for 1.0. Every time I tried it, it seemed buggy and slow,
bringing nothing new other than transparency and eye candy. The one or two
little features I liked were easy to implement in 0.1.14, anyway. So I stayed
for 4 years.&lt;/p&gt;

&lt;p&gt;Then, Mark Tiefenbruck jumped in and made things move faster in 2006. Later
that year, seeing a lot of activity in its svn repo, I decided it was time for
me to jump in as well. Took me only a few patches and it was stable enough for
me to use. I even added some little features I wanted, and managed to get some
of them included in official Fluxbox repo.&lt;/p&gt;

&lt;p&gt;At the end of 2007, Fluxbox switched from svn to git and I was given push
(“commit” in svn terminology) access. That year X.org became capable of
switching between single- and dual-head without restarts and I added proper
handling of this stuff to Fluxbox. After that, I had a window manager I was
fully satisfied with. Those few features that never made it into the official
repo were waiting for some polishing on my side that I was supposed to do
after Mark does something I don't really remember what it was. I'm not sure if
he did it, for some time I thought he didn't, and then I focused on other
things and didn't want to hack the window manager that worked perfectly for
me. Well, my fluxbox binary is now more than a year old and will remain that
way. Sorry for that, Fluxbox is a great window manager, I'd like to thank the
people around it, I learned a lot thanks to Fluxbox and the team.&lt;/p&gt;

&lt;p&gt;The last day I used Fluxbox, it looked more or less like this:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://store.lisk.in/tmp/perm/goingtiled_4.png&quot;&gt;&lt;img src=&quot;http://store.lisk.in/tmp/perm/goingtiled_4_small.jpg&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And one day I switched to xmonad. That day was last Friday. Being a bug-magnet
(as you may have noticed), I've already submitted two patches. But that's
fine, neither was to xmonad core, both were for xmonad-contrib. (I don't want
to blame Fluxbox either. That old 0.1.14 was nearly perfect and latest
versions are probably quite stable as well.)&lt;/p&gt;

&lt;p&gt;I really like the configurability of xmonad and the layout modifiers concept.
Also, xmonad-contrib is a huge and very nice collection of useful stuff.
I feel that I'll be submitting more patches (hopefully more than bug fixes) in
the future.&lt;/p&gt;

&lt;p&gt;My workspace now looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://store.lisk.in/tmp/perm/goingtiled_5.png&quot;&gt;&lt;img src=&quot;http://store.lisk.in/tmp/perm/goingtiled_5_small.jpg&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, again, thanks and goodbye to Fluxbox, and I'm looking forward to having
some fun with xmonad :-).&lt;/p&gt;
</content>
    </entry>
    

</feed>

