[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Erase cache, clean registry in Linux



On Wed, Nov 26, 2008 at 19:09, lee <lee@yun.yagibdah.de> wrote:
> On Wed, Nov 26, 2008 at 05:46:29PM -0800, Kelly Clowers wrote:
>> On Wed, Nov 26, 2008 at 16:25, lee <lee@yun.yagibdah.de> wrote:
>>
>> >You probably have been using applications that create thumbnails more
>> >than I did. I'm using some gnome applications, but I'm not using
>> >gnome ...
>>
>> I probably just have more pics than you.
>
> Or that, yes :)
>
>> gthumb is probably the only app I use regularly that uses thumbnails
>> (I use Awesome and a lot of CLI apps).
>
> Hm, I never used gthumb --- and I'm not using thumbnails anyway, other
> than eventually displaying directory contents with nautilus. If that
> needs thumbnails, what do they do on windoze? Are they saving
> thumbnails there, or are they created as needed, and if so, how did
> they get that fast enough?

Windows NT 4, 2000 and XP (and I think ME, 98, 95 and NT 3) had
a hidden file called thumbs.db in each folder that had images that
had ever been displayed as thumbnails. Sometimes if you download
peoples image dump rar files, you get the thumbs.db as well.

Vista and newer have some central thumbnail store, but I do not
know the details.

>> > So how do I find out which programs create these thumbnails?
>>
>> strace can monitor every file a program opens, so:
>>
>> strace -e trace=open app_to_test 2> trace.txt
>>
>> then search trace.txt for thumbnails
>
> Yeah, but I'd need it the other way round: Monitor .thumbnails to see
> which programs access it.

Maybe lsof with the loop option and a tight loop? Still seems
hit or miss to me.

>> Also, i just found an interesting bug report for gnome
>> http://bugzilla.gnome.org/show_bug.cgi?id=150483
>>
>> It is now fixed, and gnome-settings-daemon >= 2.24 now prunes the
>> thumbnails dir if it is greater than 64 MB at login. I know I don't
>> really want to g-s-d just to trim thumbnails..
>
> Hm, that is not a fix, it's a poor workaround. And when I start
> nautilus and look at the preferences dialog, there is no mentioning of
> caching thumbnails whatsoever.

I meant it was marked as fixed.

Gnome would never allow a pref like that in the pref dialog, but you
can change it with gconf-editor: /desktop/gnome/thumbnail_cache/
There is an age option and a size option.

> The cache won't probably be cleaned anyway because I'm already logged
> in on the console from which I used startx before eventually starting
> nautilus. Purging the cache only on login is silly anyway: I can stay
> logged in for months.
>
>> I have thought for a while that some sort of lightweight CLI-level
>> session management (beyond simple shell login and logout scripts)
>> would be nice for a number of things, including things like this.
>
> What is session management?

Session Managers, along with Display Managers (login screen) and now
ConsoleKit, deal with auto-starting apps, resuming programs in the position
and state they were in when you logged out, and handling user switches.

> To maintain a thumbnail cache, you either have to have the program
> creating and using the cache constantly maintaining it, or you need a
> daemon (like squid) that maintains it and provides an API for programs
> that want to make use of the cache (which opens possibilities for
> implementing security holes ...). One problem with gnome is that it
> tries hard to hide its configuration and information about how it
> works from the user, so they won't tell you how to configure this
> daemon, and they won't even tell you that it's there :(
>
> For example:
>
>
> lee@cat:~$ nautilus
> Initializing gnome-mount extension
>
> ** (nautilus:14999): WARNING **: No description found for mime type
> "x-special/device-char" (file is ".recently-used"), please tell the
> gnome-vfs mailing list.
> ^C
> lee@cat:~$ ps xca |grep gno
> 14910 ?        S      0:00 gnome-vfs-daemo
> lee@cat:~$ kill 14910
> lee@cat:~$ ps xca |grep gno
> lee@cat:~$ man gnome-vfs-daemon
> No manual entry for gnome-vfs-daemon
> lee@cat:~$
>
>
> What the hell is "gnome-mount extension"?

It handles semiautomatic mounting and unmounting in Gnome.

> What is "gnome-vfs-daemon"?

gnome-vfs (recently replaced with gvfs and gio) is gnomes
virtual filesystem, similar to KDEs kio. It handles not only
file:/// URIs, but also ftp:, http:, smb:, ssh: and others.

> Why is there no man page about it? What is "bonobo"-something that
> sometimes starts running when using gnome programs? And so on ...

Bonobo is a component model / framework built on CORBA.
It is related in purpose to MS COM and KDE KParts. Corba
sucks, and Bonobo use is (very) gradually being phased out.

> Hm, and it doesn't seem to create thumbnails. It didn't give me a
> message that it can't write to .thumbnails, so something else must be
> creating them.

It just does not complain about it. A quick strace showed that
Nautilus does indeed use ~/.thumbnails.


Cheers,
Kelly Clowers


Reply to: