X-Git-Url: http://pere.pagekite.me/gitweb/homepage.git/blobdiff_plain/8571a1d6d3c2aa28c67d3a898b2f812867c4342e..6827c20a65667b2d54f665b5c49539dd75f228c0:/blog/index.html?ds=inline diff --git a/blog/index.html b/blog/index.html index b7968a9505..4408d5a52e 100644 --- a/blog/index.html +++ b/blog/index.html @@ -19,6 +19,340 @@ +
+
The new "best" multimedia player in Debian?
+
6th June 2016
+

When I set out a few weeks ago to figure out +which +multimedia player in Debian claimed to support most file formats / +MIME types, I was a bit surprised how varied the sets of MIME types +the various players claimed support for. The range was from 55 to 130 +MIME types. I suspect most media formats are supported by all +players, but this is not really reflected in the MimeTypes values in +their desktop files. There are probably also some bogus MIME types +listed, but it is hard to identify which one this is.

+ +

Anyway, in the mean time I got in touch with upstream for some of +the players suggesting to add more MIME types to their desktop files, +and decided to spend some time myself improving the situation for my +favorite media player VLC. The fixes for VLC entered Debian unstable +yesterday. The complete list of MIME types can be seen on the +Multimedia +player MIME type support status Debian wiki page.

+ +

The new "best" multimedia player in Debian? It is VLC, followed by +totem, parole, kplayer, gnome-mpv, mpv, smplayer, mplayer-gui and +kmplayer. I am sure some of the other players desktop files support +several of the formats currently listed as working only with vlc, +toten and parole.

+ +

A sad observation is that only 14 MIME types are listed as +supported by all the tested multimedia players in Debian in their +desktop files: audio/mpeg, audio/vnd.rn-realaudio, audio/x-mpegurl, +audio/x-ms-wma, audio/x-scpls, audio/x-wav, video/mp4, video/mpeg, +video/quicktime, video/vnd.rn-realvideo, video/x-matroska, +video/x-ms-asf, video/x-ms-wmv and video/x-msvideo. Personally I find +it sad that video/ogg and video/webm is not supported by all the media +players in Debian. As far as I can tell, all of them can handle both +formats.

+
+
+ + + Tags: debian, debian edu, english, multimedia, video. + + +
+
+
+ +
+
A program should be able to open its own files on Linux
+
5th June 2016
+

Many years ago, when koffice was fresh and with few users, I +decided to test its presentation tool when making the slides for a +talk I was giving for NUUG on Japhar, a free Java virtual machine. I +wrote the first draft of the slides, saved the result and went to bed +the day before I would give the talk. The next day I took a plane to +the location where the meeting should take place, and on the plane I +started up koffice again to polish the talk a bit, only to discover +that kpresenter refused to load its own data file. I cursed a bit and +started making the slides again from memory, to have something to +present when I arrived. I tested that the saved files could be +loaded, and the day seemed to be rescued. I continued to polish the +slides until I suddenly discovered that the saved file could no longer +be loaded into kpresenter. In the end I had to rewrite the slides +three times, condensing the content until the talk became shorter and +shorter. After the talk I was able to pinpoint the problem – +kpresenter wrote inline images in a way itself could not understand. +Eventually that bug was fixed and kpresenter ended up being a great +program to make slides. The point I'm trying to make is that we +expect a program to be able to load its own data files, and it is +embarrassing to its developers if it can't.

+ +

Did you ever experience a program failing to load its own data +files from the desktop file browser? It is not a uncommon problem. A +while back I discovered that the screencast recorder +gtk-recordmydesktop would save an Ogg Theora video file the KDE file +browser would refuse to open. No video player claimed to understand +such file. I tracked down the cause being file --mime-type +returning the application/ogg MIME type, which no video player I had +installed listed as a MIME type they would understand. I asked for +file to change its +behavour and use the MIME type video/ogg instead. I also asked +several video players to add video/ogg to their desktop files, to give +the file browser an idea what to do about Ogg Theora files. After a +while, the desktop file browsers in Debian started to handle the +output from gtk-recordmydesktop properly.

+ +

But history repeats itself. A few days ago I tested the music +system Rosegarden again, and I discovered that the KDE and xfce file +browsers did not know what to do with the Rosegarden project files +(*.rg). I've reported the +rosegarden problem to BTS and a fix is commited to git and will be +included in the next upload. To increase the chance of me remembering +how to fix the problem next time some program fail to load its files +from the file browser, here are some notes on how to fix it.

+ +

The file browsers in Debian in general operates on MIME types. +There are two sources for the MIME type of a given file. The output from +file --mime-type mentioned above, and the content of the +shared MIME type registry (under /usr/share/mime/). The file MIME +type is mapped to programs supporting the MIME type, and this +information is collected from +the +desktop files available in /usr/share/applications/. If there is +one desktop file claiming support for the MIME type of the file, it is +activated when asking to open a given file. If there are more, one +can normally select which one to use by right-clicking on the file and +selecting the wanted one using 'Open with' or similar. In general +this work well. But it depend on each program picking a good MIME +type (preferably +a +MIME type registered with IANA), file and/or the shared MIME +registry recognizing the file and the desktop file to list the MIME +type in its list of supported MIME types.

+ +

The /usr/share/mime/packages/rosegarden.xml entry for +the +Shared MIME database look like this:

+ +

+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+  <mime-type type="audio/x-rosegarden">
+    <sub-class-of type="application/x-gzip"/>
+    <comment>Rosegarden project file</comment>
+    <glob pattern="*.rg"/>
+  </mime-type>
+</mime-info>
+

+ +

This states that audio/x-rosegarden is a kind of application/x-gzip +(it is a gzipped XML file). Note, it is much better to use an +official MIME type registered with IANA than it is to make up ones own +unofficial ones like the x-rosegarden type used by rosegarden.

+ +

The desktop file of the rosegarden program failed to list +audio/x-rosegarden in its list of supported MIME types, causing the +file browsers to have no idea what to do with *.rg files:

+ +

+% grep Mime /usr/share/applications/rosegarden.desktop
+MimeType=audio/x-rosegarden-composition;audio/x-rosegarden-device;audio/x-rosegarden-project;audio/x-rosegarden-template;audio/midi;
+X-KDE-NativeMimeType=audio/x-rosegarden-composition
+%
+

+ +

The fix was to add "audio/x-rosegarden;" at the end of the +MimeType= line.

+ +

If you run into a file which fail to open the correct program when +selected from the file browser, please check out the output from +file --mime-type for the file, ensure the file ending and +MIME type is registered somewhere under /usr/share/mime/ and check +that some desktop file under /usr/share/applications/ is claiming +support for this MIME type. If not, please report a bug to have it +fixed. :)

+
+
+ + + Tags: debian, english. + + +
+
+
+ +
+
Tor - from its creators mouth 11 years ago
+
28th May 2016
+

A little more than 11 years ago, one of the creators of Tor, and +the current President of the Tor +project, Roger Dingledine, gave a talk for the members of the +Norwegian Unix User group (NUUG). A +video of the talk was recorded, and today, thanks to the great help +from David Noble, I finally was able to publish the video of the talk +on Frikanalen, the Norwegian open channel TV station where NUUG +currently publishes its talks. You can +watch the live stream using a web +browser with WebM support, or check out the recording on the video +on demand page for the talk +"Tor: Anonymous +communication for the US Department of Defence...and you.".

+ +

Here is the video included for those of you using browsers with +HTML video and Ogg Theora support:

+ +

+ +

I guess the gist of the talk can be summarised quite simply: If you +want to help the military in USA (and everyone else), use Tor. :)

+
+
+ + + Tags: english, frikanalen, nuug, video. + + +
+
+
+ +
+
Isenkram with PackageKit support - new version 0.23 available in Debian unstable
+
25th May 2016
+

The isenkram +system is a user-focused solution in Debian for handling hardware +related packages. The idea is to have a database of mappings between +hardware and packages, and pop up a dialog suggesting for the user to +install the packages to use a given hardware dongle. Some use cases +are when you insert a Yubikey, it proposes to install the software +needed to control it; when you insert a braille reader list it +proposes to install the packages needed to send text to the reader; +and when you insert a ColorHug screen calibrator it suggests to +install the driver for it. The system work well, and even have a few +command line tools to install firmware packages and packages for the +hardware already in the machine (as opposed to hotpluggable hardware).

+ +

The system was initially written using aptdaemon, because I found +good documentation and example code on how to use it. But aptdaemon +is going away and is generally being replaced by +PackageKit, +so Isenkram needed a rewrite. And today, thanks to the great patch +from my college Sunil Mohan Adapa in the FreedomBox project, the +rewrite finally took place. I've just uploaded a new version of +Isenkram into Debian Unstable with the patch included, and the default +for the background daemon is now to use PackageKit. To check it out, +install the isenkram package and insert some hardware dongle +and see if it is recognised.

+ +

If you want to know what kind of packages isenkram would propose for +the machine it is running on, you can check out the isenkram-lookup +program. This is what it look like on a Thinkpad X230:

+ +

+% isenkram-lookup 
+bluez
+cheese
+fprintd
+fprintd-demo
+gkrellm-thinkbat
+hdapsd
+libpam-fprintd
+pidgin-blinklight
+thinkfan
+tleds
+tp-smapi-dkms
+tp-smapi-source
+tpb
+%p
+

+ +

The hardware mappings come from several places. The preferred way +is for packages to announce their hardware support using +the +cross distribution appstream system. +See +previous +blog posts about isenkram to learn how to do that.

+
+
+ + + Tags: debian, english, isenkram. + + +
+
+
+ +
+
Discharge rate estimate in new battery statistics collector for Debian
+
23rd May 2016
+

Yesterday I updated the +battery-stats +package in Debian with a few patches sent to me by skilled and +enterprising users. There were some nice user and visible changes. +First of all, both desktop menu entries now work. A design flaw in +one of the script made the history graph fail to show up (its PNG was +dumped in ~/.xsession-errors) if no controlling TTY was available. +The script worked when called from the command line, but not when +called from the desktop menu. I changed this to look for a DISPLAY +variable or a TTY before deciding where to draw the graph, and now the +graph window pop up as expected.

+ +

The next new feature is a discharge rate estimator in one of the +graphs (the one showing the last few hours). New is also the user of +colours showing charging in blue and discharge in red. The percentages +of this graph is relative to last full charge, not battery design +capacity.

+ +

+ +

The other graph show the entire history of the collected battery +statistics, comparing it to the design capacity of the battery to +visualise how the battery life time get shorter over time. The red +line in this graph is what the previous graph considers 100 percent: + +

+ +

In this graph you can see that I only charge the battery to 80 +percent of last full capacity, and how the capacity of the battery is +shrinking. :(

+ +

The last new feature is in the collector, which now will handle +more hardware models. On some hardware, Linux power supply +information is stored in /sys/class/power_supply/ACAD/, while the +collector previously only looked in /sys/class/power_supply/AC/. Now +both are checked to figure if there is power connected to the +machine.

+ +

If you are interested in how your laptop battery is doing, please +check out the +battery-stats +in Debian unstable, or rebuild it on Jessie to get it working on +Debian stable. :) The upstream source is available from github. +Patches are very welcome.

+ +

As usual, if you use Bitcoin and want to show your support of my +activities, please send Bitcoin donations to my address +15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b.

+
+
+ + + Tags: debian, english. + + +
+
+
+
French edition of Lawrence Lessigs book Cultura Libre on Amazon and Barnes & Noble
21st May 2016
@@ -228,216 +562,6 @@ first computer being sold with Debian preinstalled?

-
-
NUUG contests Norwegian police DNS seizure of popcorn-time.no
-
18th April 2016
-

It is days like today I am really happy to be a member of -the Norwegian Unix User group, a -member association for those of us believing in free software, open -standards and unix-like operating systems. NUUG announced today it -will -try -to bring the seizure of the DNS domain popcorn-time.no as -unlawful, to stand up for the principle that writing about a -controversial topic is not infringing copyrights, and censuring web -pages by hijacking DNS domain should be decided by the courts, not the -police. The DNS domain was seized by the Norwegian National Authority -for Investigation and Prosecution of Economic and Environmental Crime -a month ago. I hope this bring more paying members to NUUG to give -the association the financial muscle needed to bring this case as far -as it must go to stop this kind of DNS hijacking.

-
-
- - - Tags: english, nuug, offentlig innsyn, opphavsrett. - - -
-
-
- -
-
Ny utgave (v2.2) av den frie norske stavekontrollen gitt ut
-
15th April 2016
-

I dag tok jeg mot til meg og pakket sammen en ny versjon av den -frie norske stavekontrollen, ca. tre og et halvt år etter forrige -gang. Resultatet kan lastes ned fra -no.speling.org-prosjeksiden, både -som kildekodepakke og som "pack"-fil som kanskje fortsatt kan brukes -av OpenOffice.org/LibreOffice. Byggesystemet trenger oppussing, men i -denne omgang hadde jeg bare tid til å fikse byggefeil forårsaket av -endringer i GNU grep. De øvrige endringene var gjort tidligere i -påvente av en ny utgave.

- -

Her er det som er nytt (fra NEWS-fila i -kildekodepakken):

- -

Release 2.2 (2016-04-15)

- - -
-
- - - Tags: debian edu, norsk, stavekontroll. - - -
-
-
- -
-
I.F. Stone - an inspiration for us all
-
13th April 2016
-

I first got to know I.F. Stone when I came across an article by Jon -Schwarz on The Intercept -about -his extraordinary contribution to investigative journalism in -USA. The article is about a new documentary in two parts -(part one is 12 minutes and -part two is 30 minutes), and -I found both truly fascinating. It is amazing what he was able to -find by digging up public sources and government papers. He -documented lots of government abuse and cover ups, and I find -his weekly news letters -inspiring to read even today.

- -

-All governments are run by liars and nothing they say should be believed. -
- I. F. Stone -

- -

His starting point was that reporters should not assume governments -and corporations are telling the truth, but verify all their claims as -much as possible. I wonder how many Norwegian reporters can be said -to follow the principles of I. F. Stone. They are definitely in short -supply. If you, like me half a year ago, have never heard of him, -check him out.

-
-
- - - Tags: english, offentlig innsyn. - - -
-
-
- -
-
A French paperback edition of the book Free Culture by Lawrence Lessig is now available
-
12th April 2016
-

I'm happy to report that -the -French paperback edition of -my -project to translate the Free -Culture book by Lawrence Lessig is now available for sale on -Lulu.com. Once I have formally verified my proof reading copy, which -should be in the mail, the paperback edition should be available in -book stores like Amazon and Barnes & Noble too.

- -

This French edition, Culture Libre, is the work of the -dblatex developer Benoît -Guillon, who created the PO file from the initial translation -available from -the Wikilivres -wiki pages and completed and corrected the translation to match -the original docbook edition my project is using, as well as -coordinated the proof reading of the final result. I believe the end -result look great, but I am biased and do not read French. In -addition to the paperback edition, the book is available in PDF, EPUB -and Mobi format from the github project page linked to above.

- -

When enabling book store distribution on Lulu.com, I had to nearly -triple the price to allow the book stores some profit. I also had to -accept that I will get some revenue when a book is sold via Lulu.com. -But because of the non-commercial clause in the book license -(CC-BY-NC), this might be a problem. To bypass the problem I -discussed how to handle the revenue with the author, and we agreed -that the revenue for these editions go to the -Creative Commons non-profit -Corporation who handle donations to the Creative Commons project. -So far they have earned around USD 70 on sales of the -English -and -Norwegian -Bokmål editions, according to Lulu.com. They will get the revenue -for the French edition too. Their revenue is higher if you buy the -book directly from Lulu.com instead of via a book store, so I -recommend you buy directly from Lulu.com.

- -

Perhaps you would like to get the book published in your language? -The translation is done using a web based translator service, so the -technical bar to enter is fairly low. Get in touch if you would like -to make this happen.

-
-
- - - Tags: docbook, english, freeculture. - - -
-
-
- -
-
Lets make a Norwegian Bokmål edition of The Debian Administrator's Handbook
-
10th April 2016
-

During this weekends -bug -squashing party and developer gathering, we decided to do our part -to make sure there are good books about Debian available in Norwegian -Bokmål, and got in touch with the people behind the -Debian Administrator's Handbook -project to get started. If you want to help out, please start -contributing using -the -hosted weblate project page, and get in touch using -the -translators mailing list. Please also check out -the instructions for -contributors.

- -

The book is already available on paper in English, French and -Japanese, and our goal is to get it available on paper in Norwegian -Bokmål too. In addition to the paper edition, there are also EPUB and -Mobi versions available. And there are incomplete translations -available for many more languages.

-
-
- - - Tags: debian, english. - - -
-
-
-

RSS feed