site  contact  subhomenews

Desktop drive icon size display fixed

June 13, 2010 — BarryK
Bm has been reporting for ages that the desktop drive icons display their sizes as 0 bytes. He has a Belgian keyboard and nl_BE@euro locale.

Bm sent me a pm that gave me a hint where to look for the cause of the problem. I tracked it down. It has nothing to do with keyboard layout, only the locale setting.

The problem is that nl_BE uses a comma ',' in numerical values instead of a "normal" decimal point '.'.

The script /sbin/pup_event_frontend_d has "export LANG=C" at the beginning, which my testing showed made the script run faster. However, when the 'dc' application is executed it outputs the normal decimal point, which when fed to the Busybox 'printf' causes an error.

This is actually quite strange, as the 'printf' applet should read the exported LANG=C and accept the '.' decimal point.

Anyway, I fixed it by exporting the correct locale just for those two:

SIZE="`LANG=$OLDLANG dc $SIZE 1024 \/ p`" #100613
SIZE="`LANG=$OLDLANG printf "%.1f" $SIZE`MB" #100613

Comments

Typo in shebang
Username: ecube
Hmmmm! In my puppy installations the problem was solved by correcting a typo in the shebang of /sbin/pup_event_frontend_d [b]/binin/ash[/b] should be [b]#!/bin/bash[/b]"13 Jun 2010, 24:04"01662"84.217.243.93'commas"drongo"Many mainland (i.e. not British) Europeans use commas for decimal places and spaces to replace commas in numbers. I think decimal points with full-stops are only "normal" in English-speaking countries such as UK, USA, Canada, Australia, NZ, etc. So this may affect a lot of European keyboard/locale combinations."14 Jun 2010, 2:33"01662"82.69.134.238'ash not a typo"technosaurus"ash is the busybox alternative for bash and is typically much faster. It may alternatively be fixed with an updated busybox. Recent static uclibc versions of binaries are here: http://busybox.net/downloads/binaries/ There are some new applets available too: unxz, fg_console, bootchartd, rfkill, flock, lsusb, lspci, traceroute6, ntpd, flashcp, mkfs.reiser, wall, tune2fs, mkfs_ext2, beep, volname, fsync, flash_lock, flash_unlock, scriptreplay, lzop, ifplugd, mkdosfs, ftpd, ionice, tunctl, mkpasswd, acpid, timeout, sha256, sha512"14 Jun 2010, 3:01"01662"98.134.7.81'comas"aarf"" full-stops are only "normal" in English-speaking countries such as UK, USA, Canada, Australia, NZ, etc." wrong more accurate would be: commas are used in some european language speaking countries. full stop is easily the majority world wide. ..... if you are tracking down mouse over errors there is still the interchange of the - and + signs in the timezone mouse over. and the battery app mouseover in some puppies needs a look too. these affects are seen by everyone not just one language specific section."14 Jun 2010, 10:41"01662"118.173.152.240'commas"drongo"OK, I'll give you India and China, but that isn't really the point is it? It's not a vote. If I'm French or German I'll be wanting to use a comma, it doesn't really matter to me if three billion people are using a full-stop does it?"14 Jun 2010, 14:07"01662"82.69.134.238'LC_NUMERIC"shinobar"Which decimal point is controlled by LC_NUMERIC, maybe not by LANG. The solution is 'export LC_NUMERIC=C' or 'export LC_ALL=C' before printf."15 Jun 2010, 8:46"01662"219.75.240.92'LC_NUMERIC"shinobar"Which decimal point is controlled by LC_NUMERIC, maybe not by LANG. The solution is 'export LC_NUMERIC=C' or 'export LC_ALL=C' before printf. They should be restore when launching pmount at line 711. Such as: LANG=$OLDLANG LC_ALL= pmount"15 Jun 2010, 8:02"01662"219.75.240.92'Good catch shinobar!"eden6000"Your trick worked for me shinobar! my puppy is set for it_IT@euro and now desktop drive icons show regularly their size! Thanks!"16 Jun 2010, 2:35"01662"151.21.234.35'

Tags: woof