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

About these ads

~ by kahrn on September 4, 2007.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: