Par*_*rto 5 firefox thunderbird cache ubuntu-tweak
我通常使用 Ubuntu 调整在我的电脑上做清理工作。这包括 apt 和程序缓存数据以及旧内核。除了基于 Mozilla 的应用程序 - Firefox 和 Thunderbird,这对于大多数程序来说都是正常的。
Ubuntu 调整似乎不知道他们的缓存文件夹在哪里,即使缓存文件夹已满,也总是返回“可以清除零个包”。检查下面的屏幕截图:

我正在寻找一种方法来一次性清理所有缓存数据和不需要的包。
如果有人知道如何更改 Firefox 和 Thunderbird 的 ubuntu 调整缓存文件夹,那就太完美了。
我最后尝试过漂白位,但它使我的电脑崩溃,我不得不重新安装 Ubuntu。
我正在使用 Ubuntu 调整 0.8.6。
编辑
这个问题的截图同样的问题:为什么 Ubuntu Tweak's Janitor 不工作?
编辑 2
对于那里的 python 程序员,这个答案显示了 Ubuntu 调整管理员运行以清理系统的命令。也许里面的一些东西会更清楚地说明这个问题。
当我在 Ubuntu 13.10 中测试 Ubuntu Tweak 0.8.6 时。对于这两个版本,Mozilla Firefox 和 Thunderbird 的最新版本似乎将其缓存文件夹移动到了~/.cache. 配置文件配置保存在同一位置~/.mozilla/firefox/profiles.ini并且~/.thunderbird/profiles.ini.
火狐浏览器:~/.mozilla/firefox/→~/.cache/mozilla/firefox/
雷鸟:~/.thunderbird/→~/.cache/thunderbird/
快速补丁:
sudo nano /usr/share/pyshared/ubuntutweak/janitor/mozilla_plugin.py
Run Code Online (Sandbox Code Playgroud)
添加/更改我包含cache_path在其中的所有行(3 个新行,2 个修改app_path→ cache_path,保留app_pathprofiles.ini):
import os
import logging
from ubuntutweak.janitor import JanitorCachePlugin
from ubuntutweak.settings.configsettings import RawConfigSetting
log = logging.getLogger('MozillaCachePlugin')
class MozillaCachePlugin(JanitorCachePlugin):
__category__ = 'application'
targets = ['Cache',
'OfflineCache']
app_path = ''
cache_path = ''
@classmethod
def get_path(cls):
profiles_path = os.path.expanduser('%s/profiles.ini' % cls.app_path)
if os.path.exists(profiles_path):
config = RawConfigSetting(profiles_path)
try:
profile_id = config.get_value('General', 'StartWithLastProfile')
for section in config.sections():
if section.startswith('Profile'):
relative_id = config.get_value(section, 'IsRelative')
if relative_id == profile_id:
return os.path.expanduser('%s/%s' % (cls.cache_path, config.get_value(section, 'Path')))
except Exception, e:
log.error(e)
path = config.get_value('Profile0', 'Path')
if path:
return os.path.expanduser('%s/%s' % (cls.cache_path, path))
return cls.root_path
class FirefoxCachePlugin(MozillaCachePlugin):
__title__ = _('Firefox Cache')
app_path = '~/.mozilla/firefox'
cache_path = '~/.cache/mozilla/firefox'
class ThunderbirdCachePlugin(MozillaCachePlugin):
__title__ = _('Thunderbird Cache')
cache_path = '~/.cache/thunderbird'
app_path = '~/.thunderbird'
Run Code Online (Sandbox Code Playgroud)
我为此填写了一份上游错误报告,请参阅Mozilla Firefox 和 Thunderbird 的缓存路径更改为 ~/.cache #24

| 归档时间: |
|
| 查看次数: |
1488 次 |
| 最近记录: |