Results 1 to 5 of 5

Thread: 7.4.2 - Desktop icon spacing in LXDE - Are you kidding???

Threaded View

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

    7.4.2 - Desktop icon spacing in LXDE - Are you kidding???

    By now someone should have noticed (if they really need to make a usable OS out of 7.4.2) that the desktop icon spacing in LXDE is completely out of whack!
    If you plan on using this desktop manager (PCManFM) for every day's tasks, having your desktop icons spread one per square mile is simply not going to cut it.

    I noticed this the other day when, while doing some tests with the "mkdesktophdicons" script (which by the way I see it vanished from the recent knoppix distributions), I saw my external drive desktop icons spread out like a platoon under fire.

    I started of course googling for a fix, but it seems there is no fix yet (well, it's listed as a bug somewhere but it's "pending" so far... and when it will be available that will mean the usual "please update to the latest and greatest" BS, because they won't bother to mention exactly what the mama they did to fix it !!).

    So I took the matter in my own hands and you can see the result in the attached snapshot.
    In this snapshot you can see the external harddrive icons generated by the modified "mkdesktophdicons" script I was testing, plus a few dozens of .desktop files I grabbed from /usr/share/applications/ just to test the behaviour of the desktop icons on multiple columns on the screen.

    My idea was to have the icons aligned as tight together as possible, while still allowing for maximum 3 lines of text in the icon description

    The desktop icon size at the time of this snapshot was set to 32x32 but by using the patch presented here, the alignment rule described above will maintain regardless of the desktop icon size you choose (and by the way, I changed the desktop icon font size too, by going in /home/knoppix/.config/pcmanfm/LXDE/desktop-items-0.conf and changing "desktop_font=Sans 10" with "desktop_font=Sans 8").

    The place where you can set the desktop icon size is not easy to figure, because it's not the "Desktop Preferences" from the Start Menu/Preferences. No. That would be too logical, and since the Earth population expanded exponentially ever since the Flood, intelligence and logic became too hard to find (they actually don't exist anymore as the new specimens are born without it and the old ones are dying and taking it with them to the grave).

    This setting can be done in PCManFM, if you open a PCManFM window and go to the menu, in Edit/Preferences and then in the Preferences window select "Display" in the left pane and then modify the "Size of big icons" dropdown list.
    Yeah! Way to go! Now this actually makes sense, right? Any child knows, "big icons" means "the desktop icons"!

    So here is what you need to do in order to fix this (yet another) software brain damage:

    Copy-paste the script below in to a file and name it for instance "update.sh". Save it in an empty dir.

    Code:
    #!/bin/sh
    
    # this is "update.sh", a script to fix the "one desktop icon per square mile" issue in LXDE
    
    mkdir deb
    cd deb
    ### we need some dependencies for the rebuilding process
    #apt-get install intltool    or, even better
    wget http://snapshot.debian.org/archive/debian/20120330T223249Z/pool/main/i/intltool/intltool_0.50.2-2_all.deb
    wget http://snapshot.debian.org/archive/debian/20140704T103056Z/pool/main/libf/libfm/libfm-gtk-dev_1.2.1-1_i386.deb
    wget http://snapshot.debian.org/archive/debian/20140624T162322Z/pool/main/g/gtk+2.0/gir1.2-gtk-2.0_2.24.24-1_i386.deb
    wget http://snapshot.debian.org/archive/debian/20140624T162322Z/pool/main/g/gtk+2.0/libgtk2.0-dev_2.24.24-1_i386.deb
    cd ..
    
    ### we need the sources for the version of PCManFM in Knoppix 7.4.2
    wget http://snapshot.debian.org/archive/debian/20140704T103056Z/pool/main/p/pcmanfm/pcmanfm_1.2.1-1.debian.tar.xz
    wget http://snapshot.debian.org/archive/debian/20140704T103056Z/pool/main/p/pcmanfm/pcmanfm_1.2.1-1.dsc
    wget http://snapshot.debian.org/archive/debian/20140704T103056Z/pool/main/p/pcmanfm/pcmanfm_1.2.1.orig.tar.xz
    
    ### next we install the required deps
    dpkg -i deb/intltool_0.50.2-2_all.deb
    dpkg -i deb/libfm-gtk-dev_1.2.1-1_i386.deb
    dpkg -i deb/gir1.2-gtk-2.0_2.24.24-1_i386.deb
    dpkg -i deb/libgtk2.0-dev_2.24.24-1_i386.deb
    
    ### extracting the pcmanfm sources in Debian "style"
    dpkg-source -x pcmanfm_1.2.1-1.dsc
    
    cd pcmanfm-1.2.1
    ### applying the patch
    patch -p1 <../desktop_icon_spacing.patch
    ### "endorsing" the modification
    dpkg-source --commit
    ### rebuilding the deb package
    dpkg-buildpackage -us -uc
    cd ..
    
    exit 0
    
    # now you should have 3 new files besides this script:
    
    # pcmanfm_1.2.1-1_i386.changes
    # pcmanfm_1.2.1-1_i386.deb
    # pcmanfm-dbg_1.2.1-1_i386.deb
    
    # "dpkg -i pcmanfm_1.2.1-1_i386.deb" will install the modified pcmanfm
    # in place of the original one, but you need to do that with X shut down
    Download the attached patch and save it in the same empty dir.
    Then type:
    Code:
    gunzip desktop_icon_spacing.patch.gz
    to extract the patch file

    Now either make the script executable and run it, or simply type:

    Code:
    . update.sh
    During the rebuild, you will get a prompt to enter a file name for the patch describing the modification.
    This is Debian's idea, not mine, but just type whatever, a few letters and then Enter.
    You will be thrown in a text editor showing the patch (which we already had to begin with, but whatever ...!!).
    Just press Ctrl+X and you will exit the editor and the script will continue.

    When the script execution is finished, you should see some .deb files beside the script you just executed:

    Code:
    pcmanfm_1.2.1-1_i386.changes
    pcmanfm_1.2.1-1_i386.deb
    pcmanfm-dbg_1.2.1-1_i386.deb
    "pcmanfm_1.2.1-1_i386.deb" holds the modified pcmanfm we just hacked and needs to be installed over the existing one.

    So next, you need to stop the X server and, in one of the 4 consoles, manually install the "pcmanfm_1.2.1-1_i386.deb" package.

    In order to stop the X server, you need to Alt+Fn (where n=1...4), type "init 2" in that console, then you need to go back to the LXDE session with Alt+F5 and from the Start Menu, choose "Logout" and then in the "Logout" popup window click again on the green "Logout" button.

    That will throw you back to a console, where you need to manually cd to the directory holding the script and the rebuilt package and type:

    Code:
    dpkg -i pcmanfm_1.2.1-1_i386.deb
    Then you can type "init 5" and start X + LXDE again and check out the new look of your desktop with multiple icons on it.

    Now, of course, the next logical step would be to include this in a remaster, so you don't have to reinstall the package every time you restart the computer.
    Attached Images Attached Images
    Attached Files Attached Files

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 Server Tower Xeon BOOTS E5-2620 v4 2.10GHz 64GB RAM NO HDD NO OS picture

Supermicro Server Tower Xeon BOOTS E5-2620 v4 2.10GHz 64GB RAM NO HDD NO OS

$199.99



HP PROLIANT MICROSERVER MICRO SERVER HSTNS-5151 T4 Used. picture

HP PROLIANT MICROSERVER MICRO SERVER HSTNS-5151 T4 Used.

$45.00



HPE PROLIANT MICROSERVER GEN10 PLUS MICRO TOWER SERVER - USED picture

HPE PROLIANT MICROSERVER GEN10 PLUS MICRO TOWER SERVER - USED

$550.00



HP ProLiant Xeon E3-1220L V2 16 GB RAM 2.30 GHz MicroServer Gen8 NO DRIVES picture

HP ProLiant Xeon E3-1220L V2 16 GB RAM 2.30 GHz MicroServer Gen8 NO DRIVES

$174.99



HPE Proliant Microserver Gen10 X3421 Perf AMS,  P03698-S01, 16GB Ram picture

HPE Proliant Microserver Gen10 X3421 Perf AMS, P03698-S01, 16GB Ram

$299.00



SuperMicro Server 505-2 Intel Atom 2.4GHz 8GB RAM SYS-5018A-FTN4 1U Rackmount picture

SuperMicro Server 505-2 Intel Atom 2.4GHz 8GB RAM SYS-5018A-FTN4 1U Rackmount

$202.49



HP ProLiant HSTNS-5151 Micro Server 8GB RAM No Drives/Key/Caddies *READ* picture

HP ProLiant HSTNS-5151 Micro Server 8GB RAM No Drives/Key/Caddies *READ*

$94.99



HP/HPE ProLiant AMD Opteron X3216 APU 16 GB RAM MicroServer Gen 10 NO DRIVES picture

HP/HPE ProLiant AMD Opteron X3216 APU 16 GB RAM MicroServer Gen 10 NO DRIVES

$299.99



1U Supermicro Server 10 Bay 2x Intel Xeon 3.3Ghz 8C 128GB RAM 480GB SSD 2x 10GBE picture

1U Supermicro Server 10 Bay 2x Intel Xeon 3.3Ghz 8C 128GB RAM 480GB SSD 2x 10GBE

$297.00



2U 12 Bay SAS3 SuperMicro Server 6028U-TR4T+ W/ X10DRU-i+ Barebone 12 Caddy RAIL picture

2U 12 Bay SAS3 SuperMicro Server 6028U-TR4T+ W/ X10DRU-i+ Barebone 12 Caddy RAIL

$299.00