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
  •  


Cisco Nexus 48-Port 10G SFP+ Switch N9K-9396PX w/ 9K-M12PQ 12-Port 40G QSFP picture

Cisco Nexus 48-Port 10G SFP+ Switch N9K-9396PX w/ 9K-M12PQ 12-Port 40G QSFP

$249.99



Cisco 24-Port Managed Gigabit Switch WS-C3750G-24TS-S picture

Cisco 24-Port Managed Gigabit Switch WS-C3750G-24TS-S

$49.99



Cisco IE-3000-8TC Industrial Ethernet 8 Ports Managed Switch 1 Year Warranty picture

Cisco IE-3000-8TC Industrial Ethernet 8 Ports Managed Switch 1 Year Warranty

$114.00



Cisco SG200-26 26-Port Gigabit Network Smart Switch picture

Cisco SG200-26 26-Port Gigabit Network Smart Switch

$76.49



HP 2530-48G 48 Port Gigabit Ethernet Network Switch J9775A picture

HP 2530-48G 48 Port Gigabit Ethernet Network Switch J9775A

$30.95



New Linksys SE3005 5-port Gigabit Ethernet Switch picture

New Linksys SE3005 5-port Gigabit Ethernet Switch

$18.99



New 10/100 Mbps 8 Ports Fast Ethernet LAN Desktop RJ45 Network Switch Hub picture

New 10/100 Mbps 8 Ports Fast Ethernet LAN Desktop RJ45 Network Switch Hub

$11.49



Linksys SE3008 8 Ports Rack Mountable Gigabit Ethernet Switch picture

Linksys SE3008 8 Ports Rack Mountable Gigabit Ethernet Switch

$21.99



HP ProCurve 2530-24G J9776A 24 Port Gigabit Ethernet Managed Network Switch picture

HP ProCurve 2530-24G J9776A 24 Port Gigabit Ethernet Managed Network Switch

$34.99



Juniper Networks EX3300-48P 48-Port PoE+ 4x SFP+ Network Switch w/ Power Cord picture

Juniper Networks EX3300-48P 48-Port PoE+ 4x SFP+ Network Switch w/ Power Cord

$43.95