04 10 | 2013

Using a Plantronics USB headset under X.Org/Linux

Written by Tanguy

Classified in : Homepage, Debian, Miscellaneous, To remember

I just received an USB headset from Plantronics. Since it has a keypad on it, with buttons to mute the microphone and to adjust the volume, it appears as both a sound card and a keyboard. Problem: that keyboard sends a mouse ButtonPress 1 (yes, a mouse button event, do not ask me how that is materially and logically possible) when the microphone is muted, and only sends the corresponding ButtonRelease 1 when it is unmuted. As a result, the pointer behaves as if the mouse button was pressed continuously, rendering the desktop quite unusable.

Read more Using a Plantronics USB headset under X.Org/Linux

24 09 | 2013

Working with XML using standard Unix tools

Written by Tanguy

Classified in : Homepage, Debian, Command line, To remember

Like it or not, XML has been used everywhere, even in cases where text-based formats would have been sufficient. Unfortunately, standard tools such as grep, sed or awk are not really adapted to work with XML. Let us take the following example:

<chapter
    xmlns="http://docbook.org/ns/docbook" version="5.0">
    <title>The Debian distribution</title>

    <para>Debian is a free operating system, describing itself as “the
    universal operating system”. It is mostly known as a GNU/Linux
    distribution, but it also exist in other variants such as GNU/Hurd
    and GNU/kFreeBSD…</para>
</chapter>

Read more Working with XML using standard Unix tools

06 09 | 2013

WebPG, a PGP addon for web browsers

Written by Tanguy

Classified in : Homepage, Debian, To remember

WebPG logo, i.e. GnuPG logo with a web over a spider web

One problem with PGP, at least with GnuPG, is that it does not interact with the web. There used to be a Firefox addon for that, called FirePGP, but its development was stopped.

So, good news, a new addon has come to fill the gap it left: WebPG, an addons for Firefox and Chrome. I am using it since a while, and it seems to work fine, being able to encrypt, sign, decrypt and check text blocks. Of course, it cannot handle PGP/MIME unless explicitly adapted to the webmail you use, but there seem to be some experimental support for GMail.

12 08 | 2013

grep --only-matching

Written by Tanguy

Classified in : Homepage, Debian, Command line, To remember

Magnifying glass over a sheet of text

grep is designed to print lines matching a given pattern, but I often need to print only the matching part, discarding the remaining.

I used to do that with sed, but it involves several actions: match, replace the line by only the matching pattern and print. Fortunately, GNU grep has an option to do just that:

-o, --only-matching
Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line.

Unfortunately it is not a standard option, so it may be missing on non-GNU systems.

05 03 | 2013

Suspend your computer from a non-mainstream desktop environment

Written by Tanguy

Classified in : Homepage, Debian, Command line, To remember

Battery icon

UPower for regular users

Major desktop environments usually provide a user-friendly menu to suspend your computer. Internally, if seems to use something called UPower, which uses something called PolicyKit, which in turn may or may not use another piece called ConsoleKit (do not ask me what all these pieces are and how they relate to each other, I do not know and I do not want to know). For the regular user, the result is the following: when they click on that button, it suspends their computer.

Read more Suspend your computer from a non-mainstream desktop environment

Rss feed of the category

«previous page 4 of 6 next »

Archives