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:
"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.
Lately I realized I needed more horizontal space for longer lines of text under icons.
That's because I started using longer volume labels for partitions and they show up in the device icons on my desktop.
So here's an updated patch that provides more (horizontal) space between columns of icons on desktop.
You can also check out the attached snapshot so you can have an idea about the result.
So, to recap, just copy-paste the script I posted previously and save it together with the (uncompressed, by gunzip) patch in an empty dir.
Then make the script executable and run it as root. The script will do everything provided you have an internet connection.
At the beginning of the rebuild process you will be prompted for a file name for the patch.
Just type a few letters (it doesn't matter) and then Enter. You will then be shown the patch in a text editor.
Press Ctrl+X to exit from it and wait for the execution to end.
You will find a debian package with the modified pcmanfm in the same dir where you saved the script.
Install it over the existing one. Enjoy your new desktop look!
At the beginning of the rebuild process you will be prompted for a file name for the patch.
Just type a few letters (it doesn't matter) and then Enter. You will then be shown the patch in a text editor.
Press Ctrl+X to exit from it and wait for the execution to end.
Greetings, chris_Xnest.
You've done a neat thing with the desktop icons.
My preference is no desktop icons, but smart menus.
I've recentlly been using another Debian-derived distribution which uses an Xfce desktop.
One of Xfce's useful features for me is its Whisker menu, which has a rather plain look at first
like LXDE, but includes a search box where you can put any program's name and it'll find it
for you. But it's smart, like google or garmin: type a couple of letters and it'll give
you a six to eight likely choices which become even better choices with three letters, etc.
I really like this Whisker menu. I'm hoping some smart person will adapt it to LXDE.
You've done a neat thing with the desktop icons.
My preference is no desktop icons, but smart menus.
I tried and found a fix for this issue because even if some users don't want icons on their desktops, a few icons on it are always useful.
I'm not a fan of truckloads of icons on desktop either. But in my previous remaster I have drive partition icons, dynamically updated as I plug in new flash drives or I unplug them. I can use the icons to mount/unmount and change between R/W and R/O for every individual partition.
This way I work a lot faster.
In Knoppix 7.4.2 this feature doesn't exist anymore. So I brought it back to life and even improved it.
(Maybe I'll even post what I did, if there's any interest for that.)
But seeing my desktop drive icons spread like that made me really mad, so I had to do something about it.
About the Whisker menu, I never used Xfce but you made me curious.
When I remaster 7.4.2 (which is pretty soon) I will install Xfce in it too and give it a try.
But I get the basic idea: sounds pretty cool and I'm tempted to try and implement it on my own, even independently of the taskbar or desktop manager.
About the Whisker menu, I never used Xfce but you made me curious.
When I remaster 7.4.2 (which is pretty soon) I will install Xfce in it too and give it a try.
But I get the basic idea: sounds pretty cool and I'm tempted to try and implement it on my own, even independently of the taskbar or desktop manager.