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
  •  


IBM CS821 20-Core 2.827GHz 128Gb 1.92Tb SSD 1U Linux Server - 8005-12N Power 8 picture

IBM CS821 20-Core 2.827GHz 128Gb 1.92Tb SSD 1U Linux Server - 8005-12N Power 8

$479.96



Red Hat Enterprise Linux 5 Server - New and Sealed picture

Red Hat Enterprise Linux 5 Server - New and Sealed

$19.99



Red Hat Enterprise Linux 5 Server RHF032US-R1 NEW Sealed picture

Red Hat Enterprise Linux 5 Server RHF032US-R1 NEW Sealed

$59.95



2 x HP ProLiant BL460c (447707-B21) Blade Servers No RAM No HDD picture

2 x HP ProLiant BL460c (447707-B21) Blade Servers No RAM No HDD

$30.00



Asus ESC4000 G3 Barebones 0GB HDD Linux picture

Asus ESC4000 G3 Barebones 0GB HDD Linux

$200.00



IBM E850 Power8 2x 12C 3.02GHz 512Gb 1.8Tb SAS 10GbE 16Gb Linux Server 8408-E8E picture

IBM E850 Power8 2x 12C 3.02GHz 512Gb 1.8Tb SAS 10GbE 16Gb Linux Server 8408-E8E

$799.96



1U BareMetal pfsense opnsense Router Firewall DNS Server 6x 10GB Ethernet Ports picture

1U BareMetal pfsense opnsense Router Firewall DNS Server 6x 10GB Ethernet Ports

$149.00



IBM Power 9 S922 8-Core 3.4-3.9Ghz 128Gb DDR4 2U Linux Server - 9009-22a picture

IBM Power 9 S922 8-Core 3.4-3.9Ghz 128Gb DDR4 2U Linux Server - 9009-22a

$3439.96



IBM System X 3250 M5 Single Xeon Quad Core E3-1220 v3 @3.1GHz,8GB RAM,Linux SUSE picture

IBM System X 3250 M5 Single Xeon Quad Core E3-1220 v3 @3.1GHz,8GB RAM,Linux SUSE

$199.87



POGO Linux WEBWARE 1150 Rack-Mount Server Pentium 4 2.8GHz 512MB - No Drives picture

POGO Linux WEBWARE 1150 Rack-Mount Server Pentium 4 2.8GHz 512MB - No Drives

$179.99