在Arch中安装Bleachbit

其实这也不是很难的事,关键是 Arch Linux 有些地方比较蛋疼。

Arch Linux 嘛,简洁激进是它的优点,但是有的地方激进过头了。

比如默认的 Python3 。

这就头疼了,如果说 Python 对 Linux 的重要性,那么卸载掉 Linux 的 Pyhton 就相当于“自杀”。

当然,主要原因还是 Python 版本众多,有 “不兼容” 情况。

由于本人有“洁癖”……所以,不管是用 Linux 还是 Windows ,我都喜欢时不时“清理垃圾”。。

但是 Bleachbit 是基于 Python2 编写的,所以,无法直接在 Arch Linux 默认的 Python3 运行。

起码我用 yaourt 安装Bleachbit的时候,是无法运行的,不知道现在好了没。

不过还好,我们可以“手工安装”。

首先下载Bleachbit:

wget http://sourceforge.net/projects/bleachbit/files/bleachbit/0.8.7/bleachbit-0.8.7.tar.gz/download

tar vzfx download

cd bleachbit-0.8.7/

make -C po local

sudo mkdir /opt/bleachbit

sudo cp -r * /opt/bleachbit/

sudo chown -R root:root /opt/bleachbit

sudo chmod -R 755 /opt/bleachbit

好吧,基本准备完毕,接下来我们要制作自己的 “Bleachbit启动器” 了。

关键是如何使用 root+python2 方式来运行 bleachbit。

这里配合 gksu 进行提权。

sudo pacman -S gksu

然后:    sudo gedit /usr/share/applications/Bleachbit-Root.desktop

把下面内容粘贴进去:

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[zh_CN]=bleachbit
Exec=gksu python2 /opt/bleachbit/bleachbit.py
Name[zh_CN]=Bleachbit-Root
Name=Bleachbit
Icon=bleachbit
Categories=GNOME;System;

其实,关键是 Exec 那一行啦,通过 gksu 来调用 root 运行 python2,然后用  python2 运行  bleachbit 的 py 脚本。

保存退出后就可以在这里找到 Bleachbit 了:

运行后,输入密码就可以全面清理 Arch Linux 的垃圾啦:

About Mucid

My life is brilliant !
This entry was posted in Technology and tagged , , , , . Bookmark the permalink.

64 Responses to 在Arch中安装Bleachbit

  1. 御风而行 says: Firefox 16.0 Firefox 16.0 Ubuntu Ubuntu

    “卸载掉 Linux 的 Pyhton 就相当于“自杀””?

  2. 艳文 says: Firefox 3.6.17 Firefox 3.6.17 Windows 7 Windows 7

    嘿嘿 不错 过来瞧瞧~~ 2.6的好像还有很多用户嘛 嘿嘿

  3. freetstar says: Google Chrome 10.0.648.205 Google Chrome 10.0.648.205 GNU/Linux x64 GNU/Linux x64

    自己搞一个小脚本。。。定期清理 :twisted:

  4. 花脸猴 says: Firefox 4.0 Firefox 4.0 Windows XP Windows XP

    没折腾过

  5. vastar says: Firefox 3.6.13 Firefox 3.6.13 Ubuntu 10.10 Ubuntu 10.10

    右边的ubuntu倒计时有意思 :eek:

  6. yetone says: Google Chrome 9.0.597.84 Google Chrome 9.0.597.84 GNU/Linux GNU/Linux

    你这wordpress主题跟Dawn有异曲同工之妙哦 :grin:

  7. 卢松松 says: Firefox 4.0 Firefox 4.0 Windows 7 Windows 7

    Arch Linux 这是说明操作系统?

  8. Angel says: Google Chrome 10.0.648.204 Google Chrome 10.0.648.204 Windows Server 2003 Windows Server 2003

    server 2003下依旧使用python 2.6 :roll: