Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: HOWTO: New tool speeding up your desktop and saving disk space

  1. #1
    Join Date
    Sep 2006
    Beans
    45

    Talking HOWTO: New tool speeding up your desktop and saving disk space

    I wrote a new set of tools yesterday: trans-purge
    It's inspired by localepurge

    In our current desktop environment, there are a lot of
    useless translations, apart from locales.
    Many of them are in *.desktop files installed by each application.
    Another place containing useless translations is the mime-database

    Normally we only use English and our own native languages,
    but there are often translations for more than 10 locales in these files,
    which is a waste of disk space, and make our system slower.

    There are currently 3 tools contained: desktop-purge, mime-purge, and gconf-purge.

    desktop-purge will scan all installed *.desktop files on the system,
    remove useless translations, and then save it back.
    Usage: Run desktop-purge directly with root access.
    The main programs which benefit from this is gnome-panel and other desktop panels.
    The effect is apprant. The file size loaded at system startup decrease
    from 2 MB to 2xx KB.

    mime-purge removes unnecessary translations from mime-database
    The main programs which benefit from this are file managers.
    Usage: Run mime-purge directly with root access.

    gconf-purge will remove useless translations in gconf schema, which saves 20 MB or so on my system.
    Usage: Run gconf-purge directly with root access.

    All unnecessary translations will be removed (Without backup)
    The reserved translations contains English and the locale currently used.

    Download URL:
    http://pcman.sayya.org/desktop-purge.c
    http://pcman.sayya.org/mime-purge.c
    http://pcman.sayya.org/gconf-purge.c

    To compile, type following commands:

    gcc `pkg-config glib-2.0 --cflags --libs` -o desktop-purge desktop-purge.c

    gcc `pkg-config glib-2.0 --cflags --libs` -o mime-purge mime-purge.c

    gcc `pkg-config glib-2.0 --cflags --libs` -o gconf-purge gconf-purge.c

    Then copy these files to /usr/bin.

    Finally, I provide an automatic way.
    Create this file manually: /etc/apt/apt.conf.d/99-transpurge,
    and add following contents to it.

    DPkg
    {
    Post-Invoke {"if [ $(ps w -p "$PPID" | grep -c remove) != 1 ]; then /usr/bin/desktop-purge > /dev/null; /usr/bin/mime-purge >/dev/null; /usr/bin/gconf-purge > /dev/null ; else exit 0; fi";};
    };

    This will purge unnecessary translations after installing packages with apt.

    Warnings:
    This program is released under GPL without any warranty. Use it at your own risk. (Theoratically, the most serious side-effect is translations in your language is accidentally removed, and only English left. This could happen under incorrect locale settings.)

    I tested it on my system, and fonud it effective.
    If you run the programs manually, it will show you how much disk space is saved.

    Hope someone can create deb package for this, if there are not apparent bugs.
    The package name can be trans-purge. Cheers!
    Last edited by PCMan; October 15th, 2006 at 03:42 PM.

  2. #2
    Join Date
    May 2005
    Beans
    694

    Re: HOWTO: New tool speeding up your desktop and saving disk space

    I think this is a really good idea, but I'm a little scared that I will mess things up. Moreover, will this cause any problems during upgrades?
    Please, feel free to correct my english, so that I can improve it.

    Click here to join Dropbox. Both you and I get free extra space.

  3. #3
    Join Date
    Sep 2006
    Beans
    45

    Re: HOWTO: New tool speeding up your desktop and saving disk space

    You can backup following directories, and see if it cause problems.
    /usr/share/applications
    /usr/share/mime
    /usr/local/share/applications
    /usr/local/share/mime
    ~/.local/share/applications
    ~/.local/share/mime

    That's all.
    Actually most people only use the first 2 directories.

    If your locale is set up correctly, this should work without proplems; otherwise, only English will be left. Except this, there shouldn't be any other problem, but there is no warranty)

  4. #4
    Join Date
    Aug 2005
    Location
    California
    Beans
    201
    Distro
    Ubuntu 6.06

    Re: HOWTO: New tool speeding up your desktop and saving disk space

    I hope this is the lag I experience with nautilus.

  5. #5
    Join Date
    Sep 2006
    Beans
    45

    Re: HOWTO: New tool speeding up your desktop and saving disk space

    Here comes a new tool, gconf-purge.
    This can remove unnecessary translations from schema files of gconf.

  6. #6
    Join Date
    Oct 2006
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: HOWTO: New tool speeding up your desktop and saving disk space

    I installed Ubuntu in US english language. Not having any other language package present (supposedly), is this completely safe to use?

  7. #7
    Join Date
    May 2006
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: New tool speeding up your desktop and saving disk space

    My Ubuntu is in English, but my keyboard is not. Will this affect the keyboard settings?

  8. #8
    Join Date
    Oct 2006
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: HOWTO: New tool speeding up your desktop and saving disk space

    Quote Originally Posted by Somenoob View Post
    My Ubuntu is in English, but my keyboard is not. Will this affect the keyboard settings?
    Just compiled and used it. I also have a non-english keyboard and, as one might expect, it didn't interfere.

    No noticeable performance improvement either. Probably because I have a fast computer.

  9. #9
    Join Date
    May 2006
    Beans
    677
    Distro
    Ubuntu 6.06

    Re: HOWTO: New tool speeding up your desktop and saving disk space

    I'll download this as soon as there is precompiled version. Thanks.

  10. #10
    Join Date
    Dec 2005
    Location
    Kingston, Ontario
    Beans
    1,919
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: New tool speeding up your desktop and saving disk space

    Worked for me, no problems thus far.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •