Skip to content

Removing useless locale data from xfce shortcuts

Xfce, just like kde/gnome can use an application menu which can have shortcuts. Each one of those shortcuts is actually a file, and all of those files are located in “/usr/share/applications/” on most systems running xfce4.

If you trawl around “/usr/share/applications/” and take a look at some of those files, you will notice that some of them have a lot of locale data which you probably do not need. It is possible to remove that locale data, and thus save a very small amount of hard disk space. I decided to write a script which can open each shortcut in a directory, and then remove all the locale data from each file in that directory. The end result is, on a standard Xubuntu system I can save almost 200kb of filespace just from removing the locale data from those shortcuts. It is also possible that the shortcuts will load faster on old machines as they don’t have to load as much data.. although that would be almost unnoticable at best.

If you want to remove all your locale data, I created a script using python to automate the process and remove it from all files in “/usr/share/applications/”. It can also create a backup automatically if you specify. This script should work with any system running Xfce4, but has only been tested in Xubuntu 7.04.

You can find it at http://kahrn.wordpress.com/scripts/, and 0.2.1 at http://kahrn.pastebin.com/f555d1315

Published inUncategorized
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x