Results 1 to 2 of 2

Thread: 7.4.2 - KDE brain damage fixes - ep.2 - file size in Konqueror, say what??

Threaded View

  1. #1
    Member registered user
    Join Date
    Oct 2004
    Posts
    32

    7.4.2 - KDE brain damage fixes - ep.2 - file size in Konqueror, say what??

    This episode will deal with another "IQ enhancing" feature in today's software, namely konqueror's New Age of Dumbness style of displaying file sizes.

    Ever since 2008, I got used with my konqueror showing me file sizes in bytes. That's because I set it up that way, which is because I prefer precision. In all my activity I need exact file sizes so I can have an exact idea where I stand.

    But when I started digging in Knoppix 7.4.2, I was shocked to find a dumb perversion of what I once knew as "konqueror" courtesy of the influence of brain donor users. I've seen a lot of discussions dating a while ago when they were still trying to figure what new inventions they should use for units measuring the size of a file. Boy, it borders the philosophical nightmare! Just reading that could get a sane man in a mental institution!

    Apparently now we have to put up with a lot of users (and sometimes programmers) born yesterday who came up with the idea to follow "standards" invented by some who were also born yesterday.

    You open up your brand new konqueror and good luck trying to find out what the size of a file is: KiKiMiMiBiBi baloney!!!

    Eversince the invention of the modern computers people used base 2 numbers to calculate data sizes. For those born yesterday, just so you don't remain in the dark, there is a very good reason for that. The entire circuitry of computer uses binary logic. The memory of a computer is quite always a power of 2. Why? Simple! The total memory addressable by a computer is 2 to the power of the CPU address bus width. That's why eversince the 70's and even earlier they used a unit called kB (kilobyte) where kilo meant not 1000 but 1024 (2 to the power of 10). And then of course they called 1048576 (2 to the power of 20) a MB (MegaByte) and so on. And the IT world managed perfectly fine ever since, measuring file sizes in Bytes kiloBytes MegaBytes, GigaBytes and so on, where kilo, Mega, Giga had nothing to do with the decimal numbering system.

    Some argued that because harddisk and flash disk manufacturers are using 1M=1000 we should make that the standard. Well news flash for you: THEY ARE DOING THAT BECAUSE THEY WANT MORE MONEY!!! THEY ARE SIMPLY A BUNCH OF CROOKS!!!
    So basically what you are saying is we should legalize theft. Well guess what, some still don't agree to that.

    And just because some born yesterday woke up this morning whining to their mothers that they can't wrap this binary logic around the 23 or less corners of their brains, doesn't mean that the rest of the world should fall on their knees and bow down to their new "revolutionary" BS(c).

    So now, the brand new konqueror doesn't even have the option of letting the user choose whatever unit they want to see their file sizes in. They probably just assume that everyone was born yesterday, like them. (How dumb is that? Well dumber than a cowpie!)

    Instead the user is supposed to put up with some KiKiMiMiBiBi garbage that happens to make some sense for diaper users only.

    Well I wasn't going to put up with this garbage so I took the matter in my own hands. I contacted a developer from KDE asking what file(s) need to be modified in order to change the display, without wasting their time to give me a patch or anything. I got a very straight and precise answer from a very straight and precise professional:

    Code:
    cd kde-baseapps-4.8.4; ack -i formatbytesize
    So here's what I did: I downloaded the following files from snapshot.debian.org:

    Code:
    kde-baseapps_4.8.4-2.debian.tar.gz
    kde-baseapps_4.8.4-2.dsc
    kde-baseapps_4.8.4.orig.tar.xz
    These are the sources for the exact version (4.8.4-2) of konqueror in Knoppix 7.4.2

    Then I ran this command in the same dir where I saved the files:

    Code:
    dpkg-source -x kde-baseapps_4.8.4-2.dsc
    This extracted the sources in a new subdir "kde-baseapps-4.8.4". (took me a while to figure out what the mama they did with the old 4.8.4-2.diff.gz style of storing the patch versions... boy, another New Age Debianish nightmare, whatever!)

    Then I used the piece of info from the developer.

    And right away I found in the "kde-baseapps-4.8.4" source tree in the file "dolphin/src/kitemviews/kfileitemlistwidget.cpp" the place where the file size format is being established: line 255:

    Code:
    text = KGlobal::locale()->formatByteSize(size);
    If we change that with, for instance:

    Code:
    text = i18n("%1 Bytes", QString::number(size));
    then we get a simple file size format like "nnnnnnnnn Bytes"

    Of course you can try and do a little prettyprinting, separating groups of 3 digits, but as far as I'm concerned this was enough.

    So after changing this line, I typed this, in the root of the "kde-baseapps-4.8.4" source tree:

    Code:
    dpkg-source --commit
    so the change I made can be "endorsed" by the debian building system.

    Then I typed:

    Code:
    dpkg-buildpackage -us -uc
    This one took a while to execute and unfortunately ended up with an error, but fortunately the error was not during the compilation but during the actual deb packaging process. This was the error:

    Code:
    make[2]: Leaving directory `/home/knoppix/Downloads/kde-baseapps-4.8.4/obj-i586-linux-gnu'
    dh_install
    cp: cannot stat `debian/tmp/usr/lib/libdolphinprivate.so.4.8.0': No such file or directory
    dh_install: cp -a debian/tmp/usr/lib/libdolphinprivate.so.4.8.0 debian/dolphin//usr/lib/ returned exit code 1
    make[1]: *** [pre_install_dh_install] Error 2
    make[1]: Leaving directory `/home/knoppix/Downloads/kde-baseapps-4.8.4'
    make: *** [debian/dhmk_install] Error 2
    dpkg-buildpackage: error: debian/rules binary gave error exit status 2
    But even so, we can still accomplish our target. Just copy the following 3 files:

    Code:
    libdolphinprivate.so
    libdolphinprivate.so.4
    libdolphinprivate.so.4.13.3
    from "debian/tmp/usr/lib/" in the "kde-baseapps-4.8.4" source tree to "/usr/lib/" in the system tree, overwriting the existing file there (libdolphinprivate.so, libdolphinprivate.so.4).

    And once I did this, konqueror showed me again the exact file sizes. See the attachment of this message.
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Supermicro 4U 36 Bay Storage Server 2.2Ghz 16-C 128GB 1x1280W Rails TrueNAS ZFS picture

Supermicro 4U 36 Bay Storage Server 2.2Ghz 16-C 128GB 1x1280W Rails TrueNAS ZFS

$725.06



H261-Z61 2U 24SFF AMD Server 8x EPYC 7551 256-Cores 256GB RAM 8x25G NIC 2x2200W picture

H261-Z61 2U 24SFF AMD Server 8x EPYC 7551 256-Cores 256GB RAM 8x25G NIC 2x2200W

$2612.18



HP ProLiant DL360 G9 Server | 2 x E5-2660V3 2.6Ghz | 64GB | 2 x 900GB SAS HDD picture

HP ProLiant DL360 G9 Server | 2 x E5-2660V3 2.6Ghz | 64GB | 2 x 900GB SAS HDD

$339.00



CSE-118 Supermicro 1U GPU Server 2.6Ghz 28-C 128GB 2x Nvidia K40 GPU 2x1600W PSU picture

CSE-118 Supermicro 1U GPU Server 2.6Ghz 28-C 128GB 2x Nvidia K40 GPU 2x1600W PSU

$580.03



DELL PowerEdge R730 Server 2x E5-2690v3 2.6GHz =24 Cores 32GB H730 4xRJ45 picture

DELL PowerEdge R730 Server 2x E5-2690v3 2.6GHz =24 Cores 32GB H730 4xRJ45

$274.00



Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 128GB RAM No HDD picture

Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 128GB RAM No HDD

$389.99



HP Proliant DL360 Gen9 28 Core SFF Server 2X E5-2680 V4 16GB RAM P440ar No HDD picture

HP Proliant DL360 Gen9 28 Core SFF Server 2X E5-2680 V4 16GB RAM P440ar No HDD

$196.95



Dell PowerEdge R720XD Xeon E5-2680 V2 2.8GHz 20 Cores 256GB RAM 12x4TB picture

Dell PowerEdge R720XD Xeon E5-2680 V2 2.8GHz 20 Cores 256GB RAM 12x4TB

$510.00



HP ProLiant DL380 Gen9 16SFF 2x E5-2680v4 2.4GHz =28 Cores 64GB P840 4xRJ45 picture

HP ProLiant DL380 Gen9 16SFF 2x E5-2680v4 2.4GHz =28 Cores 64GB P840 4xRJ45

$353.00



Dell Poweredge R730xd 2.5in 2x E5-2690 v3 2.6ghz 24-Cores  64gb  H730  2x 750w picture

Dell Poweredge R730xd 2.5in 2x E5-2690 v3 2.6ghz 24-Cores 64gb H730 2x 750w

$189.99