1. Connecting lights to a Swytch e-bike kit

    By Andrej Shadura

    Last year I purchased an e-bike upgrade kit for my mother in law. We decided to install it on a bicycle she originally bought back in the 80s, which I fixed and refurbished a couple of years ago and used until September 2022 when I bought myself a Dutch Cortina U4.

    When I used this bicycle, I installed a lightweight Shutter Precision dynamo hub and compatible lights, XLC at the front, Büchel at the back. Unfortunately, since Swytch is a front wheel with a built-in electric motor, these lights don’t have a dynamo to connect to anymore, and Swytch doesn’t have a dedicated connector for lights. I tried asking the manufacturer for more documentation or schematics, but they refused to do so.

  2. To England by train (part 2)

    By Andrej Shadura

    My attempt to travel to the UK by train last year didn’t go quite as well as I expected. As I mentioned in that blog post, the NightJet to Brussels was cancelled, forcing me to fly instead. This disappointed me so much that I actually unpublished the blog post minutes after it was originally put online. The timing was nearly perfect: I type make publish and I get an email from ÖBB saying they don’t know if my train is going to run. Of course it didn’t, as Deutsche Bahn workers went ahead with their strike. The blog post sat in the drafts for more than half a year until yesterday, when I finally updated and published it.

  3. Coffee gear upgrade

    By Andrej Shadura

    Two weeks ago I decided to make myself a combined birthday and Christmas present and upgrade my coffee gear.

    I’ve got my first espresso machine back in 2013, it was a cheap Saeco Philips Poemia, which made reasonably drinkable coffee, but not being able to make good coffee made me increasingly unhappy about it. However, since it worked, I wasn’t motivated enough to change anything — until it stopped working. One day the nut holding the ‘shower screen’ broke, and I couldn’t replace it.

  4. To England by train (part 1)

    By Andrej Shadura

    This post was written in August 2021. Just as I was going to publish it, I received an email from ÖBB stating that due to a railway strike in Germany my night train would be cancelled. Since the rest of the trip has already been booked well in advance, I had to take a plane to Charleroi and a bus to Brussels to catch my Eurostar. Ultimately, I ended up publishing it in April 2022, just as I’m about to leave for a fully train-powered trip to the UK once again.

  5. Transitioning to a new OpenPGP key

    By Andrej Shadura

    Following dkg ’s example, I decided to finally transition to my new ed25519/cv25519 key.

    Unlike Daniel, I’m not yet trying to split identities, but I’m using this chance to drop old identities I no longer use. My new key only has my main email address and the Debian one, and only those versions of my name I still want around.

    My old PGP key (at the moment in the Debian keyring) is:

  6. Making the blog part of the Fediverse and IndieWeb

    By Andrej Shadura

    I’ve just made my blog available on the Fediverse, at least partially.

    Yesterday while browsing Hacker News, I saw Carl Schwan’s post Adding comments to your static blog with Mastodon(m) about him replacing Disqus with replies posted at Mastodon. Just on Monday I was thinking, why can’t blogs participate in Fediverse? I tried to use WriteFreely as a replacement for Pelican, only to find it very limited, so I thought I might write a gateway to expose the Atom feed using ActivityPub. Turns out, someone already did that: Bridgy, a service connecting websites to Twitter, Mastodon and other social media, also has a Fediverse counterpart, Fed.brid.gy — just what I was looking for!

  7. Vendoring Rust dependencies for a Debian derivative

    By Andrej Shadura

    Recently, I needed to package a Rust crate libslirp for a Apertis, a Debian derivative. libslirp is used by the newly release UML backend of debos, our Debian image build tool. Unfortunately, this crate hasn’t yet been properly packaged for Debian proper, so I could not simply pull the packaging from Debian. Even worse, its build dependencies haven’t all been packaged yet. Most importantly, I have only uploaded zbus to Debian today, and at that time none of its dependencies were in Debian either.

  8. Useful FFmpeg commands for video editing

    By Andrej Shadura

    As a response to Antonio Terceiro’s blog post, I’m publishing some FFmpeg commands I’ve been using recently.

    Embedding subtitles

    Sometimes you have a video with subtitles in multiple languages and you don’t want to clutter the directory with a lot of similarly-named files — or maybe you want to be able to easily transfer the video and subtitles at once. In this case, it may be useful to embed to subtitles directly into the video container file.

  9. Follow-up on the train journey to FOSDEM

    By Andrej Shadura

    Here’s a recap of my train journey based on the Twitter thread I kept posting as I travelled.

    To FOSDEM…

    The departure from Bratislava was as planned:

    Ready to depart from Bratislava hl. st.
    Ready to depart from Bratislava hl. st.

    Half an hour in Vienna was just enough for me to grab some coffee and breakfast and board the train to Frankfurt without a hurry:

    Boarding a Deutsche Bahn ICE to Frankfurt am Main
    Boarding a Deutsche Bahn ICE to Frankfurt am Main

  10. Using gcc sanitisers to get a nasty bug fixed

    By Andrej Shadura

    A couple of days ago a colleague at Collabora asked me to help create a Debian package for the tool he needed to complete his task. The tool happened to be an NXP code signing tool, used to sign OS images to be run on i.MX systems using ‘High Assurance Boot’.

    As it often happens, the tool was distributed in a manner typical for many big corporations: no direct link to the tarball, custom buildsystem, compiled binaries in the same tarball as the sources. A big relief was that the tool has been distributed under a three-clause BSD license since version 3.3.0 (the sources were not provided at all before that).

  11. FOSDEM by train

    By Andrej Shadura

    I’ve always loved train journeys, but with flygskam changing people’s travel preferences across Europe (and possibly worldwide, though probably not that much), I decided to take train to FOSDEM this time.

    When I first went to FOSDEM which, just in case you don’t know, happens each February in Brussels at ULB, I flew with Ryanair from Bratislava to Charleroi because it was cheaper. After repeating the same journey a couple of times and I once nearly missed the last bus coach to Brussels because of a late flight, and decided to rather pay more but travel with more comfort to Brussels Zaventem, the main airport of Brussels. It’s well-connected with Brussels, trains run fast and run often, which is a significant upgrade in comparison to Charleroi, where the options were limited to bus coaches and a slow train connection from Charleroi the town.

  12. Rust-like enums in Kotlin

    By Andrej Shadura

    Rust has an exciting concept of enumeration types, which is much more powerful than enums in other languages. Notably C has the weakest type of enum, since there’s no type checking of any kind, and enum values can be used interchangeably with integers:

    :::c
    enum JobState {
        PENDING,
        STARTED,
        FAILED,
        COMPLETED
    };
    

    You can opt for manually assigning integers instead of leaving this to the compiler, but that’s about it.

  13. resvg: worth having in Debian?

    By Andrej Shadura

    Yesterday I have discovered resvg, an MPL 2.0-licensed SVG rendering and optimisation library and a tool, written in Rust. It is said to be faster than some SVG renderers while currently slower than librsvg. It aims to support the static subset of SVG better than other libraries:

    SVG test suite results: resvg 1272, Inkscape 967, librsvg 998

    The author writes:

    One of the major differences from other rendering libraries is that resvg does a lot of preprocessing before rendering. It converts shapes to paths, resolves attributes, removes groups and invisible elements, fixes a lot of issues in malformed SVG files. Then it creates a simple render tree with all elements and attributes resolved. And only then it starts to render. So it’s very easy to implement a new rendering backend.

  14. Help the Conservancy raise the remaining $14 000

    By Andrej Shadura

    The Software Freedom Conservancy is having the last 7 days to collect the remaining less than $14 000 of the fundraiser generously matched by Private Internet Access. All donations up to $90 000 will be matched until 15 January.

    Conservancy is an organisation sponsoring nearly 50 free software projects helping them, most importantly with accounting, paying developers and defending their trademarks and ensuring license compliance.

    Conservancy is currently home to almost fifty member projects

  15. wpa-supplicant and hostapd 2.7 in Debian

    By Andrej Shadura

    Hostapd and wpa-supplicant 2.7 have been in Debian experimental for some time already, with snapshots available since May 2018, and the official release since 3 December 2018. I’ve been using those 2.7 snapshots myself since May, but I do realise my x250 with an Intel Wi-Fi card is probably not the most representative example of hardware wpa-supplicant would often run on, so before I upload 2.7 to unstable, it would be great if more people tested it. So please try to install it from experimental and see if it works for your use cases. In the latest upload, I have enabled a bunch of new upstream features which previously didn’t exist or were still experimental, so it would be great to give them a go.

  16. Bye-bye binary vconfig(1)

    By Andrej Shadura

    This morning I have decided that this is the time. The time to finally remove the binary vconfig utility (which used to help people configure VLANs) from Debian. But fear not, the command isn’t going anywhere (yet), since almost six years ago I’ve written a shell script that replaces it, using ip(8) instead of the old and deprecated API.

    If you’re still using vconfig, please give it a test and consider moving to better, newer ways of configuring your VLANs.

  17. GNU indent 2.2.12

    By Andrej Shadura

    As the maintainer of GNU indent, I have just released version 2.2.12 (signature), the first release GNU indent saw in eight years.

    Highlights include:

    • New options:
      • -pal / --pointer-align-left and -par/–pointer-align-right`
      • -fnc / --fix-nested-comment
      • -gts / --gettext-strings
      • -slc / --single-line-conditionals
      • -as / --align-with-spaces
      • -ut / --use-tabs
      • -nut / --no-tabs
      • -sar / --spaces-around-initializers
      • -ntac / --dont-tab-align-comments
    • C99 and C11 keywords and typeof are now recognised.
    • -linux preset now includes -nbs.
    • -kr preset now includes -par.
    • Lots of bug fixes

    I’d like to thank all of the contributors of this release, most importantly:

  18. Linux Vacation Eastern Europe 2018

    By Andrej Shadura

    On Friday, I will be attending LVEE (Linux Vacation Eastern Europe) once again after a few years of missing it for various reasons. I will be presenting a talk on my experience of working with LAVA; the talk is based on a talk given by my colleague Guillaume Tucker, who helped me a lot when I was ramping up on LAVA.

    Since the conference is not well known outside, well, a part of Eastern Europe, I decided I need to write a bit on it. According to the organisers, they had the idea of having a Linux conference after the newly reborn Minsk Linux User Group organised quite a successful celebration of the ten years anniversary of Debian, and they wanted to have even a bigger event. The first LVEE took place in 2005 in a middle of a forest near Hrodna.

  19. Upcoming git-crecord release

    By Andrej Shadura

    More than 1½ years since the first release of git-crecord, I’m preparing a big update. Not aware how exactly many people are using it, I neglected the maintenance for some time, but last month I’ve decided I need to take action and fix some issues I’ve known since the first release.

    First of all, I’ve fixed a few minor issues with setup.py-based installer some users reported.

    Second, I’ve ported a batch of updates from a another crecord derivative merged into Mercurial. That also brought some updates to the bits of Mercurial code git-crecord is using.

  20. Working in open source: part 1

    By Andrej Shadura

    Three years ago on this day I joined Collabora to work on free software full-time. It still feels a bit like yesterday, despite so much time passing since then. In this post, I’m going to reconstruct the events of that year.

    Back in 2015, I worked for Alcatel-Lucent, who had a branch in Bratislava. I can’t say I didn’t like my job — quite contrary, I found it quite exciting: I worked with mobile technologies such as 3G and LTE, I had really knowledgeable and smart colleagues, and it was the first ‘real’ job (not counting the small business my father and I ran) where using Linux for development was not only not frowned upon, but was a mandatory part of the standard workflow, and running it on your workstation was common too, even though not official.

  21. Porting inputplug to XCB

    By Andrej Shadura

    5 years ago I wrote inputplug, a tiny daemon which connects to your X server and monitors its input devices, running an external command each time a device is connected or disconnected.

    I have used a custom keyboard layout and a fairly non-standard settings for my pointing devices since 2012. I always annoyed me those settings would be re-set every time the device was disconnected and reconnected again, for example, when the laptop was brought back up from the suspend mode. I usually solved that by putting commands to reconfigure my input settings into the resume hook scripts, but that obviously didn’t solve the case of connecting external keyboards and mice. At some point those hook scripts stopped to work because they would run too early when the keyboard and mice were not they yet, so I decided to write inputplug.

  22. Goodbye Octopress, hello Pelican

    By Andrej Shadura

    Hi from MiniDebConf in Hamburg!

    As you may have noticed, I don’t update this blog often. One of the reasons why this was happening was that until now it was incredibly difficult to write posts. The software I used, Octopress (based on Jekyll) was based on Ruby, and it required quite specific versions of its dependencies. I had the workspace deployed on one of my old laptops, but when I attempted to reproduce it on the laptop I currently use, I failed to. Some dependencies could not be installed, others failed, and my Ruby skills weren’t enough to fix that mess. (I have to admit my Ruby skills improved insignificantly since the time I installed Octopress, but that wasn’t enough to help in this case.)

  23. Say no to Slack, say yes to Matrix

    By Andrej Shadura

    Of all proprietary chatting systems, Slack has always seemed one of the worst to me. Not only it’s a closed proprietary system with no sane clients, open source or not, but it not just one walled garden, as Facebook or WhatsApp are, but a constellation of walled gardens, isolated from each other. To be able to participate in multiple Slack communities, the user has to create multiple accounts and keep multiple chat windows open all the time. Federation? Self-hosting? Owning your data? All of those are not a thing in Slack. Until recently, it was possible to at least keep the logs of all conversations locally by connecting to the chat using IRC or XMPP if the gateway was enabled.

  24. How to stop gnome-settings-daemon messing with keyboard layouts

    By Andrej Shadura

    In case you, just like me, want to have a heavily customised keyboard layout configuration, possibly with different layouts on different input devices (I recommend inputplug to make that work), you probably don’t want your desktop environment to mess with your settings or, worse, re-set them to some default from time to time. Unfortunately, that’s exactly what gnome-settings-daemon does by default in GNOME and Unity. While I could modify inputplug to detect that and undo the changes immediately, it turned out this behaviour can be disabled with an underdocumented option:

  25. Manual control of OpenEmbedded -dbg packages

    By Andrej Shadura

    In December last year, OpenEmbebbed introduced automatic debug packages. Prior to that, you’d need to manually construct FILES_${PN}-dbg variable in your recipe. If you need to retain manual control over precisely what does into debug packages, set an undocumented NOAUTOPACKAGEDEBUG variable to 1, the same way Qt recipe does:

    NOAUTOPACKAGEDEBUG = "1"
    FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
    FILES_${PN}-dbg = "/usr/src/debug/"
    FILES_${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
    

    P.S. Knowing this would have saved me and my colleagues days of work.

  26. Migrate to systemd without a reboot

    By Andrej Shadura

    Yesterday I was fixing an issue with one of the servers behind kallithea-scm.org: the hook intended to propagage pushes from Our Own Kallithea to Bitbucket stopped working. Until yesterday, that server was using Debian’s flavour of System V init and djb’s dæmontools to keep things running. To make the hook asynchronous, I wrote a service to be managed to dæmontools, so that concurrency issued would be solved by it. However, I didn’t implement any timeouts, so when last week wget froze while pulling Weblate’s hook, there was nothing to interrupt it, so the hook stopped working since dæmontools thought it’s already running and wouldn’t re-trigger it. Killing wget helped, but I decided I need to do something with it to prevent the situation from happening in the future.

  27. Phulud? No, Phulad.

    By Andrej Shadura

    If you bought an North India travel guide by Vanessa Betts and Victoria McCulloch, and tried to figure out where is ‘Phulud’ and how to get there from Deogarh (and how to get to Deogarh itself from Udaipur), don’t waste your time googling, as it’s not Phulud, but Phulad.

    It does seem that the narrow gauge journey from Deogarh to Phulad is indeed beautiful:

    Meanwhile, I have also found this very interesting post by Mary Anne Erickson: Impressions of India: Udaipur to Deogarh. I’m not yet sure we’re going to follow that route, but it seems promising.

  28. Community time at Collabora

    By Andrej Shadura

    I haven’t yet blogged about this (as normally I don’t blog often), but I joined Collabora in June last year. Since then, I had an opportunity to work with OpenEmbedded again, write a kernel patch, learn lots of things about systemd (in particular, how to stop worrying about it taking over the world and so on), and do lots of other things.

    As one would expect when working for a free software consultancy, our customers do understand the value of the community and contributing back to it, and so does the customer for the project I’m working on. In fact, our customer insists we keep the number of locally applied patches to, for example, Linux kernel, to minimum, submitting as much as possible upstream.

  29. Public transport map of Managua

    By Andrej Shadura

    Holger Levsen writes about the public transport map of Managua, Nicaragua, which is, according to him, the first detailed map of Managua’s bus network:

    If you haven’t been to Managua, you might not be able to immediatly appreciate the usefulness of this. Up until now, there has been no map nor timetable for the bus system, which as you can see now easily and from far away, is actually quite big and is used by 80% of the population in a city, where the streets still have no names.

  30. Support Software Freedom Conservancy

    By Andrej Shadura

    The Software Freedom Conservancy are desperately looking for financial support after one of their corporate supporters have stopped their sponsorship. This week, there’s an anonymous pledge to match donations from new supporters.

    Becoming an SFC supporter will help them fight for our software freedom. I have signed up for a monthly donation, and I suggest you do so too here.

  31. Power button and logind

    By Andrej Shadura

    If you have configured your laptop’s power button to act as sleep button using acpid, then installed systemd or systemd-shim and pressed the button only to find your laptop to shut down after it wakes up from sleep, set these options in /etc/systemd/logind.conf:

    [Login]
    HandlePowerKey=ignore
    HandleSuspendKey=ignore
    HandleHibernateKey=ignore
    HandleLidSwitch=ignore
    
  32. UI translation tools and version control

    By Andrej Shadura

    Today I decided to try some translation tools I could install on my laptop locally to translate Kallithea, so I’d not need to be on-line to use Michal Čihař’s wonderful Weblate.

    The first tool I tried was Gtranslator. I edited about 5 strings, and then wanted to commit my changes. To my surprise, the diff was huge. Apart from obvious changes in the file header, like changing the team address or X-Generator field, Gtranslator has reformatted almost every other entry in the file, adding meaningless line breaks or reflowing the strings I didn’t edit.

  33. Kallithea 0.2 released

    By Andrej Shadura

    This post is almost a carbon copy of the Kallithea 0.2 release notes.

    Kallithea project have just released Kallithea 0.2. Kallithea is a Python-based GPLv3 source code management software for web-based hosting of Mercurial and Git repositories.

    This release brings many changes since 0.1. Notably, pull requests system have been improved, making contributing changes more robust. The visual appearance has also been refined: modern font-based symbolic icons from FontAwesome and GitHub Octicons have replaced the previously used bitmap icons, and revision graphs are now drawn with HiDPI display support. Kallithea now supports Mercurial 3.3 and Dulwich 0.9.9. Several fixes in the database code boosted performance significantly.

  34. Tired of autotools? Try this: mk-configure

    By Andrej Shadura

    mk-configure is a project which tries to be autotools done right. Instead of supporting an exceedingly large number of platforms, modern and ancient, at costs of generated unreadable multi-kilobyte shell scripts, mk-configure aims at better support of less platforms, but those which are really in use today. One of the main differences of this project is that it avoids code generation as much as possible. The author of mk-configure, Aleksey Cheusov, a 38 years old NetBSD hacker from Belarus, uses NetBSD make (bmake) and shell script snippets instead of monstrous libraries written in m4 interleaved with shell scripts. As the result, there’s no need in a separate step of package configuration or bootstrapping the configure script, everything is done by just running bmake, or a convenience wrapper for it, mkcmake, which prepends a proper library path to bmake arguments, so you don’t have to specify it yourself.

  35. ifupdown and command status handling

    By Andrej Shadura

    In 2011, I first tried to fix a Debian bug #547587. The bug was about hook script result codes not being checked, so if a script fails, this isn’t detected. Unfortunately, just checking the return code wasn’t enough, as lots of scripts didn’t care about their return code at all, so I had to unapply the patch.

    Now, after 2.5 years, I think it’s time to try again, as most of the scripts have been fixed since then. At the same time, I’ve changed error handling a little bit further: errors in any commands or scripts during interface configuration are considered fatal, but when interface is deconfigured, errors are ignored. However, this may change break configurations which depend on previous behaviour.

  36. hgk misbehaviour with Tk 8.4

    By Andrej Shadura

    Strangely enough, running hgk (a port of gitk to Mercurial, also known as hg view) with Tk 8.4 crashes my X server. Updating both Tk and the X doesn’t help. I don’t feel like I want to debug X now, but probably that’s what I have to do :(

    Backtrace:
    0: /usr/bin/X (xorg_backtrace+0x49) [0xb7712ed9]
    1: /usr/bin/X (0xb7572000+0x1a4c64) [0xb7716c64]
    2: linux-gate.so.1 (__kernel_rt_sigreturn+0x0) [0xb755040c]
    3: /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xb711d000+0x772f0) [0xb71942f0]
    4: /lib/i386-linux-gnu/i686/cmov/libc.so.6 (__libc_calloc+0xab) [0xb7196d5b]
    5: /usr/bin/X (0xb7572000+0x55ca9) [0xb75c7ca9]
    6: /usr/bin/X (0xb7572000+0x48005) [0xb75ba005]
    7: /usr/bin/X (0xb7572000+0x491c3) [0xb75bb1c3]
    8: /usr/bin/X (0xb7572000+0x12c621) [0xb769e621]
    9: /usr/bin/X (XkbHandleActions+0x20b) [0xb76c8c1b]
    10: /usr/bin/X (XkbProcessKeyboardEvent+0xbc) [0xb76c937c]
    11: /usr/bin/X (AccessXFilterPressEvent+0xcd) [0xb76c181d]
    12: /usr/bin/X (0xb7572000+0x157675) [0xb76c9675]
    13: /usr/bin/X (mieqProcessDeviceEvent+0x1e6) [0xb76f3226]
    14: /usr/bin/X (mieqProcessInputEvents+0xfd) [0xb76f335d]
    15: /usr/bin/X (ProcessInputEvents+0x14) [0xb75ef3e4]
    16: /usr/bin/X (0xb7572000+0x3c25d) [0xb75ae25d]
    17: /usr/bin/X (0xb7572000+0x2a51a) [0xb759c51a]
    18: /lib/i386-linux-gnu/i686/cmov/libc.so.6 (__libc_start_main+0xf5) [0xb71368c5]
    19: /usr/bin/X (0xb7572000+0x2a8f8) [0xb759c8f8]
    
  37. Process isolation support in start-stop-daemon

    By Andrej Shadura

    Yesterday I played with LXC a bit, and I liked it, as LXC provides a very lightweight isolation of processes, much like enchanced chroot. However, I realised, I don’t always need the chroot-like part of LXC, sometimes what I need is just to make sure the process is unable to see the other processes and talk to them in any other way except the filesystem, but I don’t want a whole separate root file system for that. LXC provides a simple utility, lxc-unshare, which uses Linux-specific clone(2) call to run a process with new PID, IPC and other namespaces. However, this utility can’t be used for running forking daemons, as the container is destroyed when its PID 1 exits.

  38. Clearlooks-Phénix update

    By Andrej Shadura

    Once upon a time, GTK+ 3.0 was released. That release brought at least one Bad Thing™: incompatibility with GTK+ 2.x themes. At the same time, previously popular Clearlooks theme hasn’t been ported. Many people didn’t like that, but only one decided to DTRT — to do the Right Thing. Jean-Philippe Fleury wrote Clearlooks-Phénix (originally, Clearwaita), a GTK+ 3 theme which was supposed to have a look and feel as close as possible to the original Clearlooks. He based his work on an engine of a new GTK+ default, Adwaita theme. Quite soon, however, GTK+ 3 theme API has changed, and it became easily possible to rewrite the theme without using any additional theming engines, with just plain GTK+ stuff involved.

  39. Not coming to FOSDEM

    By Andrej Shadura

    It turnes out moving to a different city takes more time and effort than I originally expected, so I’m skipping FOSDEM this year. That’s unlike I originally planned to spend the beginning of February — I had my flight booked already, but apparently that’s not the best idea ever to go travelling right in the middle of relocation :)

  40. A bit more on TrueCrypt

    By Andrej Shadura

    Few days ago I was discussing my last blog post with a colleague of mine, Lukaš Tvrdý, and he’s mentioned that it actually is possible to harmlessly decrypt the TrueCrypted filesystem in online mode, resize it, and encrypt it back again. Well, I decided to try, because I have had some problems with that setup. Apart from init script reordering I had to make (not covered in the post, as I did it later and haven’t found time yet to write about that), I ran into a trouble while trying to enable swapping. As the only partition I had was formatted into NTFS, placing a swap file there isn’t the best idea ever. I actually tried doing so, but after two deadlocks I had in few hours I had to rethink that. Indeed, as NTFS is implemented in the user space using ntfs-3g, as soon as this process gets swapped out, the system is left helpless. The swap is on the file system driver of which is in the swap, which is on the file system driver of which is… well, you get the idea.

  41. How to run Debian from a loop device on a TrueCrypt'ed NTFS partition

    By Andrej Shadura

    After I have changed my job recently I had to meet the security policies which are enforced in the company I’m now working for. First of all, I’m not allowed to use my own laptop, and the company-provided laptop has Windows installed. As my job is, unfortunately, not directly related to Linux, I’m not allowed to re-install the OS. However, working in the comfortable environment is what I really need to do my job effectively, so I have designed a workaround.

  42. Bohdan Zograf and so-called “Belorussian” translations

    By Andrej Shadura

    I’d like to bring some attention to activity of a person mostly known as Bohdan Zograf. If you Google that name, you’ll find that he seems to be a person who knows Belarusian language very well, and is interested in translating as many texts as he can into Belarusian for no money. Unfortunately, he isn’t. Trust me, I’m really a native speaker, I was born in Minsk, Belarus, and have lived there for 25 years of my life (at least this person: (1, 2) may prove I really am the person I’m telling you I am, if you’re interested). Said that, I think I really have a right to say: those translations are fake. These texts are just machine-translated versions of the original articles or web pages, published in some strange weblog at some strange web site without being structured or systematised. This already has been pointed out by Jonathan Wakely, but, well, some people may not believe him as he doesn’t seem to know Belarusian.

  43. Linux, snd_hda_intel and Sigmatel STAC9200

    By Andrej Shadura

    Strange and interesting thing has happened to me recently. I’m a user of Dell D620 laptop, which has Intel’s HDA controller and Sigmatel’s STAC9200 codec. This has always worked perfectly fine, and in my mixer I could see at least two volume controls: Master and PCM. Changing volume using both worked.

    Once I’ve upgraded my Linux 3.2 to 3.4, and have noticed that Master volume control is no more. What’s up I thought, but did nothing. Update to 3.5 hasn’t fixed the problem. Okay, it’s time to bisect stuff.

  44. Removing accounts from Android devices

    By Andrej Shadura

    It’s a well-known problem that Android offers no easy way to completely remove the primary Google account, at least sometimes.

    Well, there’s one not really easy for people not involved with computer stuff, but at least it works.

    Once you have adb shell working, you need to log into your Android device and type sqlite3 /data/system/accounts.db. That’s the place where accounts are actually stored. In that database, there are tables named accounts, grants and authtokens. Those you need to clean up:

  45. ifupdown news

    By Andrej Shadura

    A new version of ifupdown has been uploaded to experimental yesterday, which brings some important changes.

    First of all, now it’s possible to specify default values for various interface configuration options. This eliminates the need of hard coding of them in C source, as Ubuntu has been doing for some time. End users are not affected by this change at all, of course.

    Second, now ifup behaves differently when it’s called with --all option. Previously, that was causing all interfaces marked as ‘auto’ to be brought up. Now, it does exactly the same if --allow option isn’t used. Otherwise, it brings up the interfaces which are declared to belong to a specified class using allow-* directive. In other words, ‘auto’ directive indeed declares interface as belonging to a class ‘auto’, and the default class for ifupdown is also ‘auto’, so when user runs ifup -a only those interfaces are brought up.

  46. GTK+ 3 done right

    By Andrej Shadura

    Ever wanted your GTK+ 3 look better? Unsatisfied with the default settings of Adwaita theme? Add these configuration files to your ~/.config/gtk-3.0:

    gtk.css:

    .menu {
        border-style: solid;
        border-width: 1;
    }
    
    .menubar .menuitem *:prelight,
    .menubar .menuitem:prelight {
        background-color: @theme_selected_bg_color;
        color: @theme_selected_fg_color;
    }
    

    This will add some nice borders to menus as well proper background to menu items.

    settings.ini:

    [Settings]
    gtk-theme-name = Adwaita
    gtk-fallback-icon-theme = gnome
    gtk-font-name = Sans 9
    

    And this will set font to Sans 9 and not anything else which is for some reason is the default.

  47. Piano man

    By Andrej Shadura

    Those who had chance to be in the ‘Stolitsa’ shopping mall in the centre of Minsk yesterday, could enjoy a wonderful performance which was happening there.

    There’s a grand piano installed in the central hall of this mall. I guess that piano was supposed to advertise some company which sells them, but that day there was something completely different. That piano wasn’t silent yesterday. A young man was playing classics on it.

  48. Sixxs suxxs?

    By Andrej Shadura

    Recenly I’ve decided to register at Sixxs to be able to use IPv6 at my new location as they seem to use tunnelling protocol which bypasses NAT, so that was exactly what I needed. I’m a long time HE.NET user, so I expected the same quality of service and ease of use. I went to their website and filled in the registration form.

    Soon I got the reply: ‘User Rejected’

  49. Binary watch: NG

    By Andrej Shadura

    LED binary watch is a one of the most common geek gadgets available. The only problem with binary watch is that while it’s done to be ‘cool’ and unusual, it’s also not very convenient to use even for geeks, at least in my opinion. I think so because it fundamentally breaks the way people use watch usually. Correct me if I am wrong, but in my opinion the exact numbers don’t have any real meaning for everyone who uses watch. What’s important is which part of some interval of time is now: morning, evening, noon or midnight, and a fraction which tells us how far we are from one important point in time or from another. The same applies to shorter time intervals: usually an hour’s divided into quarters or 5-minute intervals.

  50. Extra large image editing

    By Andrej Shadura

    How often do you need to do something with extra-large images? Usually, I don’t need to, but recently I’ve received one such an image, and really needed to crop it. That image was 21 MiB 16 Kpixel×12 KPixel aerial image in a JPEG file. As anybody knows, JPEG files can be converted without decoding the whole image in the memory, you can read why on the Wikipedia. You just need to go through all image blocks sequentially and write them in the new format. If the image is progressive JPEG, this is even easier. The same with cropping: you can just skip some image blocks without decoding them.