Tuesday·26·October·2010
ratpoison and focus follows mouse //at 00:22 //by abe
I use ratpoison as window manager on my ASUS EeePC netbook “nemo” for more than two years now. But although I’m very happy with ratpoison in the EeePC, there are two feature wishes which have been refused by upstream: One is more flexibel window name matching for the unmanage command. The other one is “focus follows mouse” between ratpoison frames.
Well, I always guessed that it was possible, but it took until now to find outhow to implement “focus follows mouse” for ratpoison.
There’s an ancient but still useful tool called Not a Window Manager (nawm) which is a small awk-like interpreter offering mostly window handling functions.
The following .nawmrc implements “focus follows mouse” in nawm:
window newwin; # stores window to raise window lastwin; # stores previous window to prevent race conditions leave { lastwin = currentwindow; } enter { newwin = pointerwindow(); if (name(newwin) != "" && newwin != lastwin) { raise newwin; sync; } }
The leave hook is necessary to prevent flapping between two windows if switched between them via ratpoison’s commands.
I also had to add the following hook to my .ratpoisonrc to work around some cases where ratpoison’s own window switching didn’t work anymore. Only happened with more than one frame — with one frame banishing the mouse cursor was annoying, so I filtered that case:
addhook switchwin exec if [ `ratpoison -c fdump|fgrep -o frame|wc -l` -gt 1 ]; then ratpoison -c banish; fi
Unfortunately nawm has been removed from Debian Sid about a year ago due to being buggy and orphaned. There was not upstream development for seven years or so either.
So for the moment you can get nawm either from Debian Lenny or from snapshot.debian.org.
But I had to fix a segfault in nawm when calling name() on a window without name to be able to use it at all, so you will probably have to rebuild it anyway with the following patch:
diff -u nawm-0.0.20030130/builtins.c nawm-0.0.20030130-patched/builtins.c --- nawm-0.0.20030130/builtins.c 2010-10-25 06:00:02.000000000 +0200 +++ nawm-0.0.20030130-patched/builtins.c 2010-10-25 04:15:25.000000000 +0200 @@ -546,8 +546,12 @@ *name = gcstrdup(""); else { - *name = gcstrdup((char *)nm); - XFree(nm); + if ((char *)nm) { + *name = gcstrdup((char *)nm); + XFree(nm); + } else { + *name = gcstrdup(""); + } } }
And yes, I’m thinking about adopting and reintroducing the nawm package into Debian Sid.
But I’d prefer if anyone could give me a hint how to do this with more
current and still maintained tools (or a patch against ratpoison :-).
I looked into suckless-tools, but I haven’t found anything in
there which provides hooks on X events. And the Perl module Tk seems
to be able to set X event hooks, but only within the application being
written itself.
Tagged as: ASUS, awk, Debian, dwm, EeePC, FocusFollowsMouse, Hack, Hacks, hook, Lenny, nawm, nemo, ratpoison, segfault, Sid, Squeeze, suckless, Window Manager, X
// show without comments // write a comment
Related stories
Monday·25·October·2010
SuSE sucks! //at 05:44 //by abe
Since SuSE closes the security support two years after release and the recent KDE JavaShit remote code execution hole wasn’t patched as fast as I would have expected it (the patch came out after the upgrade I’m writing about here) in the SuSE 9.0 which was installed on my 2.66 GHz AMD desktop at work (it started as in 2002 as a SuSE 7.3 on a 400 MHz box and has been upgraded since then to 8.0, 8.2 and 9.0 IIRC), I decided, it’s now really time to upgrade to SuSE 10.0. (Although 10.1 will be out soon, I just don’t want to wait for it.) And since my boss only wants SuSE boxes and neither Debian (which I would prefer) nor Gentoo (which a colleague prefers), I couldn’t simply install Sarge on this box although I would have chosen that option if it would have been available.
Since my former SuSE experiences told me that this would mean a lot of trouble, I took notes from the beginning, once for the blog and once for my boss to show him, that most trouble doesn’t come from me being a power user used to being allowed to touch any config file (like I am on Debian).
Preparations
So I begin with the preparations: Starting the 400 MHz Debian Woody box on my desktop (whose operating system is more than a year older than SuSE 9.0 and still has security support, yeah!) I usually need to build custom Debian packages for customers. There I could chat in IRC and took notes while trying to upgrade and get the whole thing working again.
When everything was ready, I put the SuSE DVD in — just to notice, that it’s just a CD-ROM. So I put the SuSE 10.0 CD1 in the CD-ROM drive and typed “sudo shutdown -r now” in the shell. The box starts shutting down and tells me:
Please stand by while rebooting the system…
But it didn’t reboot. I waited for several minutes, nothing happend. Well, seems as if the SuSE upgrade already starts as I expect it to end: Horrible.
Tagged as: Debian, Emacs, Epiphany, Fläsch, FocusFollowsMouse, fvwm, Galeon, Gentoo, GNOME, gq, JavaShit, KDE, lilo, Linux, mpg123, mpg321, mutt, Novell, Other Blogs, Plug'n'Pray, Quiz, RIP, Sarcasm, Sarge, SuSE, SuSE 10.0, SuSE 9.0, Ubuntu, Unicode, USB, Woody, WTF, YaST, You bastards!
// show without comments // write a comment
Related stories
Thursday·21·October·2010
New upstream versions of xrootconsole and keynav in Debian Experimental //at 16:45 //by abe
I recently uploaded new upstream versions of two neat small X tools to Debian Experimental:
- xrootconsole displays on a transparent or shaded layer on the root window what it gets as input on STDIN, from a FIFO or from a file, and
- keynav, a way to control your mouse cursor efficiently with the keyboard.
Both packages introduce several new features and I’d be happy if users of these packages in Debian Sid or Debian Sid users curious about them could test the versions in Debian Experimental.
xrootconsole 0.6 + patches
xrootconsole saw no love since 2006 with the last maintainer upload having been in 2002. Nevertheless it never got kicked out of Debian just because of this. The package had been forcibly orphaned just less than a year ago. So it’s no big wonder that this new upstream version I packaged was released already back in 2004. :-)
But besides packaging a new upstream version, bumping Standards-Version and debhelper compatibility, fixing tons of lintian warnings and some bugs, I also added two patches which add new features not (yet) available upstream:
- UTF-8 support: Upstream xrootconsole just drops all bytes where the 8th bit is set which only allows ASCII. Miroslav Jezbera submitted a patch to allow at least displaying localized text containing single byte 8 bit characters as used in all ISO-Latin encodings. Inspired by the patch to add UTF-8 support to ratmenu, I wrote a patch to add UTF-8 support for xrootconsole, too.
- ANSI color support: Last year, Julien Viard de Galbert, who is also active in Debian, posted a patch in his blog to support ANSI colors as produced by many log colorizers like e.g. loco (RIP), colortail, lwatch, or ccze. (Didn’t get colortail and lwatch to work with xrootconsole yet, though.) I included this patch and made it compatible with my UTF-8 support patch. The patch raises the memory consumption per displayed character by one byte, but effectively I just saw an overall memory usage increase of about 25% which seems acceptable.
Of course I informed upstream about these feature patches, but I haven’t got any feedback yet.
But I got feedback from Julien Viard de Galbert, and he’ll join me in packaging xrootconsole as co-maintainer.
keynav 0.20101014.3067
I adopted the Debian package of keynav recently, subscribed to the keynav mailing list (well, it’s a Google group), got a nice welcome mail from the very friendly upstream developer Jordan Sissel who offered to help with any keynav issues.
I told him what features I’d like to see in keynav to fit better the setup where I’m using it. And just a few days later there was a new upstream release including both features I suggested, some more neat new features, and one bug fix. Jordan Sissel writes in the upstream changelog (emphasis and italic text by me):
- Added ‘restart’ command. Makes keynav restart. Useful for binding a key to reload the config.
- Added ‘loadconfig’ command. This lets you include additional config files to load on the command line or in one of the default keynavrc files. (requested by Axel Beckert) … and already in use here.
- keynav will now restart if it receives SIGHUP or SIGUSR1
- Map ‘Enter’ by default to ‘warp,click 1,end’ (requested by Axel Beckert)
- Fix a bug causing the point under the mouse cursor to not click through the keynav window in certain conditions. Reported via mailing list by Eric Van Dewoestine and Krister Svanlund.
Both packages will be reuploaded to Debian Sid (Unstable) after the
release of Debian Squeeze (currently “testing”).
Tagged as: ANSI, ASCII, color, Debian, Experimental, Google, Google Groups, ITA, keynav, Sid, Squeeze, UTF-8, X, xrootconsole
// show without comments // write a comment
Related stories
Friday·15·October·2010
Thoughts on Gitorious and GitHub plus a useful git hook //at 11:36 //by abe
When I took over the developement of xen-tools, I looked around for an appropriate git hosting. I especially had a look at GitHub and Gitorious.
If you just regard the features, GitHub is definitely more targetted on single developers and Gitorious more towards projects:
At GitHub, every repository has its URL under the URL of a user page which makes it nearly impossible to have user independent, “official” repositories for projects which have more than one official developer.
At Gitorious, every hosted repository needs to belong to a project, even if it’s only a published configuration. But a project can have more than one git repository. You only seem to be able to have personal repositories if you clone some existing Gitorious repository.
So from a feature point of view, the xen-tools git repositories fit way better to Gitorious’ hosting while the git repositories with zshrc, conkerorrc and desktop configuration files defintely have a more fitting addresses on GitHub, in my case http://github.com/xtaran/$repository. On Gitorious, they are now together under a “project” called “Axel’s configuration files” at http://gitorious.org/abe which contains git repositories of my on grml’s .zshrc based .zshrc, my configuration for Conkeror and all the files necessary for my ratpoison/xmobar based netbook/laptop desktop.
I though feel a little bad for giving the project the very short “slug” name “abe” instead of “abe-config” (as I did initially) since “abe” is IMHO not a proper “project name” for my configuration files and possibly other projects would have a more reasonable claim for that project name on Gitorious. But that way it suites more its purpose: Gather some of my git repositories which don’t belong to a proper project.
But there’s another important point when comparing Gitorious and GitHub: Free Software needs free tools as Benjamin Mako Hill posted recently on Planet Debian. Despite my (probably well known) distrust against Google and therefore also Google Code, and despite knowing the history of SourceForge becoming non-free, I was not that much aware that GitHub’s software is only partially open source and therefore also not free software while Gitorious is both as it’s licensed under the GNU Affero General Public License (like StatusNet/identi.ca for example) which is basically GPLv3, but its ideas applied to hosted web applications scenario (where the GPL itself doesn’t grasp), too.
Initially I just had the xen-tools git repositories on Gitorious and all my small one-repository “projects” as copies of the repositories on my own git server on GitHub to get some more publicity for them and allow “social cloning”. After reading Mako’s article, I decided to at least have repository clones on Gitorious of all repositories I mirror at GitHub, too.
That way I force nobody to use the non-free tools on GitHub for
“social cloning” one of my git repositories. And of course I have
copies of my code somewhere on the net as backup. Or to say it with
Linus Torvalds’ (slightly updated) words: Only wimps use tape
backup: real men just upload their important stuff on git, and let the
rest of the world clone it.
;-)
But isn’t that tedious to always push your code to three repositories?
No, it isn’t. I just push my code to git.noone.org where I have configured the according remotes and
the following post-receive
hook:
#!/bin/sh read oldrev newrev refname git push gitorious ${refname:t} git push github ${refname:t}
The only other thing necessary is to use ssh-agent and SSH agent
forwarding to at least the host you’re pushing to.
Tagged as: .zshrc, abe, Agent Forwarding, AGPL, Conkeror, Free Software, git, GitHub, Gitorious, gitweb, Google, Google Code, GPL, grml, Hook, Hosting, identi.ca, Linus Torvalds, mako, non-free, Open Source, Planet Debian, Ratpoison, Real Man, Social Coding, Social Networking, SourceForge, SSH, ssh-agent, StatusNet, xen-tools, zsh
// show without comments // write a comment
Related stories
Thursday·14·October·2010
xen-tools 4.2 released //at 13:55 //by abe
Last night, I released xen-tools 4.2 and also uploaded it to Debian Unstable. It also should become part of the upcoming Debian stable release called Squeeze. (Thanks, Mehdi!)
For those who are missing xen-tools in Ubuntu 10.04 Lucid Lynx or Ubuntu 10.10 Maverick Meerkat, there’s now a xen-tools PPA containing the current stable package for both Ubuntu releases.
Major changes since the 4.2 release candidate 1:
- Tons of documentation improvements
- Preliminary support for Ubuntu 11.04 Natty Narwhal and Debian 7.0 Wheezy (Closes #597521)
- More robustness on exotic combinations of command-line options
Major changes since 4.2 beta 1:
- Uses GeoIP for Debian mirrors: Default Debian mirror is now cdn.debian.net
- Uses
apt-config
to parse Dom0’sapt.conf
. (Closes #560011) - With
--verbose
, the output of commands called by xen-tools (e.g. debootstrap) is not only logged, but also printed toSTDOUT
. (Closes #513126) - Adds btrfs support.
New Team Member
I’d also like to welcome Stéphane Jourdois as member of the xen-tools development team who contributed quite a lot of the new code in 4.2. See GitHub’s Impact Graph or Ohloh’s List of Contributors.
Roadmap
If there’s no need for a bug fix release, the next release will be 5.0 and will be the result of some heavy refactoring. Our aim is:
- less code duplication
- more modularity
- more consistency over all included scripts and hooks
We will probably also use Perl::Critic to improve the code consistency and
quality further. (Thanks Renée for the idea!)
Tagged as: 42, btrfs, code duplication, debbugs, Debian, GeoIP, GitHub, Gitorious, hook, kwisatz, Lucid, Maverick, Natty, Ohloh, Perl, Perl::Critic, post-receive, PPA, Refactoring, Release, Sid, Squeeze, Ubuntu, Wheezy, Xen, xen-tools
// show without comments // write a comment
Related stories
xen-tools back in Debian Unstable //at 13:54 //by abe
After xen-tools had been removed from Debian Unstable by the upstream developer last December due to no more upstream development, I took over upstream development as well as Debian package maintainership in January.
Since then a lot happened:
- Development moved from Mercurial to a set of git repositories at gitorious.org.
- Dmitry Nedospasov joined my effort to revive xen-tools.
- Via gitorious’ clone tracking we noticed that there were useful patches in clones of xen-tools and incorporated most of them back into our master branch.
- We created a second mailing list xen-tools-dev which is mainly thought for communication between the xen-tools developers.
- The xen-tools.org website and the xen-tools mailing lists moved from Steve’s to my server. The website has been slightly overhauled and the mailing lists now use Mailman.
- Support for all recent Debian and Ubuntu releases including Squeeze and Lucid.
- Full support for pygrub and DomU distribution kernels installed in the DomU. Now you easily can install DomUs whose udev doesn’t fit to your Dom0 kernel.
- Full support for cdebootstrap in addition to debootstrap.
- Tons of bugs fixed
- I’m on the quest to find the holy grail of bug tracking systems. ;-) More on this in another blog posting.
But despite all the things which were to fix after Steve discontinued the xen-tools developement, Steve Kemp did a great job to bring xen-tools so far initially. I’m really happy that this software exists and that’s the reason why I won’t let it die so fast. :-)
xen-tools 4.2 beta 1 released
Last weekend I released xen-tools 4.2 beta 1 which I also uploaded to Debian Unstable. And thanks to the active ftp-master team, xen-tools went through the NEW queue in less than 12 hours and is now available again in Debian Unstable.
4.2 beta 1 still has some known bugs, the worst ones are in xen-delete-image. But no fear, it doesn’t delete more than wanted, just not enough or things which don’t exist anyway. :-) There are also some smaller issues to fix for a final 4.2 release.
We may also create an PPA for Ubuntu Lucid in the future to work around the lack of xen-tools in Ubuntu Lucid.
What about Fedora/RedHat/CentOS support?
Since rinse is out of date with regards to current Fedora releases, rpmstrap seems to be out of date for even longer (it has been removed from Debian before the Lenny release) and febootstrap neither seems to work out of the box nor seems to support bootstrapping to mount points (because it wants to delete them first and fails), bootstrapping Fedora ist currently not supported. The “copy” installation method should work though.
rinse still is able to bootstrap CentOS 4 and 5, but the installation seems incomplete. We’ll try to work around these issues for the final 4.2 release.
We haven’t looked at mach and mock so far, but according to Lucas, both are out of date, too.
Sure, implementing Lucas’ howto in form of a script would be a possible way, but we think it would just create yet another not so well supported clone of rinse, rpmstrap, mach, mock or febootstrap.
Because of that, Dmitry works on support for the installation of Xen DomUs via kickstart.
Fate of xen-shell?
Xen-shell has also been removed from Debian Unstable last December because Steve stopped its developement, too.
But in comparison to xen-tools itself, we didn’t resurrect xen-shell since none of us currently has use for it.
So if you are currently using xen-shell and intend to continue to do
so, you should hurry up if you want to see it in Debian Squeeze. We
can also help you, but we surely can’t and won’t do it alone nor will
we take the majority of the necessary workload.
Tagged as: bootstrap, cdebootstrap, CentOS, Debian, debootstrap, febootstrap, Fedora, ftp-master, GitHub, Gitorious, ITP, Lucid, mach, mock, NEW, Planet Debian, RedHat, rinse, RM, rpm, rpmstrap, Sid, Squeeze, Ubuntu, Xen, xen-shell, xen-tools, yum
// show without comments // write a comment
Related stories
Tuesday·12·October·2010
Still happy with the ASUS EeePC 701 //at 16:02 //by abe
Recently Eric asked on the LUG Vorarlberg mailing list about netbook experience. I wrote a lengthy reply summarizing my experiences with the ASUS EeePC 701. And I thought this is something I probably should share with more people than only one LUG:
I ordered an ASUS EeePC 701 (4G) with US keyboard layout at digitec in Spring 2008, got it approximately one month later and posted a first resumé after one month in my blog.
I’m still very happy with the EeePC 701, despite two commonly mentioned drawbacks (the small screen resolution and the small SSD – which I both don’t see as real problems) and some other minor issues.
What matters
- Very robust and compact case. And thanks to a small fan being the only moving part inside, the EeePC 701 is also very robust against mobile use.
- Very pleasing always-in-my-daypack size (despite the 7" screen it’s the typical 9" netbook size) and easily held with one hand.
- Black. No glossy display. Neither clear varnish nor piano laquer. Short: No bath room tile. Textured surface, small scratches don’t stick out and don’t matter.
- Debian (previously Lenny, now Sid) runs fine on it, even the webcam works out-of-the-box.
- Despite all those neat features, it was fscking cheap at that time. And it was available without Windows.
Nice to have
- There’s power on the USB sockets even if the EeePC is turned off but the power supply is plugged in.
- The speakers are impressingly good and loud for their size. (But my demands with regards to audio are probably not too high, so audiophiles shouldn’t run to ebay because of this. ;-)
- It has three external USB sockets.
What doesn’t matter
- The small 7" 800×480 screen: I like small fonts and do most things inside a terminal anyway. And even with 800×480, those terminals are still much bigger than 80×25 characters. Only some applications and webpages have no heart for small screens.
- The small disk size: Quite a lot of programs fit on 4 GB of disk space. Additionally I use tmpfs a lot. And music and video files are either on a external 500 GB Western Digital 2.5" “My Passport” disk (which I need quite seldomly) or much more come via sshfs and IPv6 from my home server anyway. :-)
- The small keyboard: I just don’t have any problems with the size or layout (right shift right of the cursor up key, etc.) of the keyboard. Well, maybe except that any standard sized keyboard feels extremely large after having used the EeePC exclusively for some weeks. ;-)
- The to 630 MHz underclocked 900 MHz Intel Celeron: It’s enough for most of the things I do with the EeePC. Also the original 512 MB RAM are somehow ok, but for using tmpfs, but no swap space at all, 1 GB or 2 GB are surely the better choice.
- A battery runtime of 2.5h to 3h is fine for me.
What’s not so nice
- The “n” key needs to be pressed slighty stronger than other keys, otherwise no “n” appears. So if one of my texts in average misses more “n” than other letters, I typed it on the EeePC. ;-)
- Home, End, Page-Up, and Page-Down need the Fn key. This means that these keys can only be used with two hands (or one very big hand and I have quite small hands). This is usually no problem and you get used to it. It’s just annoying if you hold the EeePC with one hand and try to type with the other.
- What looks like a single mouse button is a seesaw and therefore
two mouse buttons below one button. This makes it quite hard to press
both at the same time, e.g. for emulating a middle mouse button press.
It usually works in about half of all cases I tried it. My solution
was to bind some key combination to emulate a middle mouse button in
my window manager, ratpoison:
bind y ratclick 2
And that mouse button bar already fell off two times. - The battery reports only in 10% steps, and reporting in percentage instead of mAh is an ACPI standard violation because reporting in percentage is only allowed for non-rechargable batteries. It also doesn’t report any charging and discharging rates. But in the meanwhile nearly all battery meter can cope with these hardware bugs. This was quite a problem in the early days.
- Now, after approximately 1.5 years, the battery slowly fritzes: When charging there are often only seconds between 10% and 40%. Rigorously using up all power of the battery helped a little bit. Looks like some kind of memory effect althought the battery is labeled Li-Ion and not Ni-MH and Li-Ion batteries are said to have no memory effect.
- The SD card reader only works fine if you once completed the setup of the original firmware or set the corresponding BIOS switch appropriately. No idea why.
Similar models
Technically, most of this also counts for the EeePC 900SD (not 901) which only differs in screen, resolution and disk size as well as CPU, but not on the the case. So same size, same robustness, same battery, same mainboard, bigger screen, resolution, disk and faster CPU. (The 901 has a different CPU, a different battery, and a different, glossy and partially chromed case.) See Wikipedia for the technical specifications of all EeePC models.
ASUS’ only big FAILure
Stopping to sell most EeePCs with Linux and cowardly teaming up with Microsoft after having shown big courage to come out with a Linux only netbook. Well, you probably already know, but it’s better without Windows…
So basically you no more get these really neat netbooks from ASUS anymore and you get nearly no netbooks with Linux from ASUS in the stores anymore. It’s a shame.
Would I buy it again?
Sure.
Well, maybe I would also buy the 900SD, 900AX (replacing the harddisk with an SSD) or 702 (8G) instead of the 701, but basically they’re very similar. See Wikipedia for the differences between these EeePC models. And of course I still prefer the versions without Windows.
But despite the low price, the EeePC 701 is surprisingly robust and
still works as on the first day (ok, except battery, the mouse button
bar and the “n” key ;-), so I recently bought a second power supply
(only white ones were available *grrrr*
)
and ordered a bigger third party battery plus an adapter to load the
battery directly from the (second) power supply without EeePC
inbetween.
What desktop do I use on the EeePC?
None.
I use ratpoison as window manager, uxterm, urxvt, and yeahconsole as terminal emulators (running zsh with grml based .zshrc even as root’s login shell :-), wicd-curses as network manager and xmobar (previously dzen2) with i3status as text-only panel. Installed editors are GNU Emacs 23, GNU Zile and nvi. (No vim. :-)
And of course a netbook wouldn’t be a netbook if it wouldn’t have a
lot of network applications installed. For me the most important ones
are: ssh, scp, autossh, sshfs, miredo, conkeror, git,
hg, and rsync.
Tagged as: 701, 900A, 900SD 900AX, 901, ASUS, autossh, Badezimmerkachel, black, Conkeror, curses, Debian, EeePC, Emacs, FAIL, git, grml, Hardware, hg, i3status, IPv6, Lenny, Linux, miredo, nemo, Netbook, nvi, ratpoison, review, rsync, Sid, SSH, sshfs, teredo, tmpfs, urxvt, uxterm, wicd, Windows, xmobar, yeahconsole, zile, zsh
// show without comments // write a comment