Merry Christ mas!

Israel israeldahl at
Wed Dec 25 00:58:00 UTC 2013

@Dale Visser
This isn't sophisticated enough to include in the release, IMHO.  It
converts all of the icons, including ones that are other sizes.  It
would be better if it could be integrated into the menu updating script
(whatever that is), so it checks what the image's size is and if the
size is above some amount it will resize the icon to a reasonable size
every time an app is installed.  It seems that this issue is solely
related to the xpm format.
@Lubuntu User List
It seems that it should be able to be resolved in a different way, but
this is a nice hack to get icons that aren't crazy.  I suppose it would
be even better if the script would convert to png format, and parse the
desktop file and change the Icon= field to use the new icon, rather than
using the old icon, and leave the old xpm alone. Though that might be
too hard to do.... I am no Bash expert.  When I find a bug, I try to
figure out a way to fix it if no one else does.  That is the beauty of a
GNU/Linux OS.  There is almost always a way to do virtually anything you
want... you just have to want to do it enough to figure it out :)

On 12/24/2013 05:28 PM, Dale Visser wrote:
> Great job, Israel! While I hadn't mentioned it, I've hit this issue,
> too. It's good to know there's now a way to address it. If you have a
> blog, this would be great to share there as well, for anybody using
> LXDE, and not using the upcoming 14.04, which I bet will include some
> version of your script.
> Best regards,
> Dale Visser
> The plural of 'anecdote' is not 'data'.
> ------------------------------------------------------------------------
> From: Israel <mailto:israeldahl at>
> Sent: ‎12/‎24/‎2013 4:22 PM
> To: lubuntu user list <mailto:lubuntu-users at>
> Subject: Merry Christ mas!
> Hey everyone, I have made a little script to convert the icons to a
> specific size.
> It also makes a backup of your current xpm files.
> I am no  Bash programmer, but it works.... so I would suggest someone
> who is knowledgeable about it look at my file and see if there is some
> better programming that can be done to make this nicer, and if any of
> the devs are around (after the holidays of course) I'd like to know if
> this can be adapted to be used in the menu updating script.
> You can tweak this to make different sizes...
> This is something that requires SUDO.
> Please make sure you are comfortable running potentially dangerous
> commands before testing this out.  I have tested it on my computer,
> and it works for me.  I'll attach the file, and put it into the e-mail
> so it is available to look at before you download it or run it.  If
> anything about it needs to be explained I'd be glad to explain what I
> did, though if you are good a shell scripting, I am sure you can think
> of a better way of doing this.
> the things you can edit are
> size=24x24  make this whatever size you like... I find 24x24 is good
> for the menu...
> I have 2 backup directories....  if you try it once backup is
> created.  if backup exists extraBackup is created.
> If you keep trying it you will get an error that extraBackup already
> exists.
> backup=/usr/share/pixmaps/backup/
> extraBackup=/usr/share/pixmaps/extraBackup/
> You will not be prompted for anything except your password at the
> beginning.
> Here it is:
> #!/bin/bash
> shopt -s nullglob
> iconDir=/usr/share/pixmaps/
> backup=/usr/share/pixmaps/backup/
> extraBackup=/usr/share/pixmaps/extraBackup/
> cd "$iconDir"
> putfiles=(*.xpm)
> size=24x24
> echo "This will require a password to backup and convert your icons"
> if [ ! -d "$backup" ]; then
> echo "Making a backup of $iconDir"
> sudo mkdir ${backup}
> for file in "${putfiles[@]}"; do
>    sudo cp ${file} ${backup}
>    echo "$file has been saved to $backup"
> done
> fi
> if [ -d "$backup" ]; then
> echo "You have already backed up your files once...  I'll make another
> directory called $extraBackup"
> sudo mkdir ${extraBackup}
> for file in "${putfiles[@]}"; do
>    sudo cp ${file} ${extraBackup}
>    echo "$file has been saved to $extraBackup"
> done
> fi
> echo "This will convert the xpm files to $size"
> for file in "${putfiles[@]}"; do
>   echo "Processing $file"
>   sudo convert ${file} -scale $size ${iconDir}${file}
>   echo "Saved to $iconDir $file"
> done
> echo "Done!"
> -- 
> Regards


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Lubuntu-users mailing list