13,009
回編集
編集の要約なし |
|||
13行目: | 13行目: | ||
sudo zypper install bleachbit | sudo zypper install bleachbit | ||
<br> | <br> | ||
==== | ==== BleachBitの起動 ==== | ||
まず、依存関係のライブラリをインストールする。<br> | まず、依存関係のライブラリをインストールする。<br> | ||
# CentOS | # CentOS | ||
36行目: | 36行目: | ||
<br> | <br> | ||
コマンドを入力することが面倒な場合は、以下のようにシェルスクリプトを作成して実行するとよい。<br> | コマンドを入力することが面倒な場合は、以下のようにシェルスクリプトを作成して実行するとよい。<br> | ||
# | # bleachbit.sh | ||
#!/bin/bash | #!/bin/bash | ||
python3 ./bleachbit.py | python3 ./bleachbit.py | ||
<br> | <br> | ||
# | # bleachbit_as_root.sh | ||
#!/bin/bash | #!/bin/bash | ||
xdg-su -c ./bleachbit.py | xdg-su -c ./bleachbit.py | ||
<br> | |||
==== デスクトップエントリファイルの作成 ==== | |||
以下の例では、一般ユーザ向けおよびスーパユーザ向けの2つのデスクトップエントリファイルを作成している。<br> | |||
<br> | |||
まず、BleachBitの起動スクリプトを、BleachBitのインストールディレクトリに作成する。<br> | |||
<syntaxhighlight lang="sh"> | |||
# StartBleachBit.sh | |||
#!/bin/sh | |||
appname="bleachbit.py" | |||
# new dirname procedure | |||
# use -f to make the readlink path absolute | |||
dirname="$(dirname -- "$(readlink -f -- "${0}")" )" | |||
if [ "$dirname" = "." ]; then | |||
dirname="$PWD/$dirname" | |||
fi | |||
cd $dirname | |||
# Initialize interpreter path | |||
export LD_LIBRARY_PATH="$dirname:$LD_LIBRARY_PATH" | |||
# Run BleachBit binary | |||
"$dirname/$appname" "$@" | |||
</syntaxhighlight> | |||
<br> | |||
次に、デスクトップエントリファイルを作成する。<br> | |||
# BleachBit.desktop (一般ユーザ向け) | |||
#!/usr/bin/env xdg-open | |||
[Desktop Entry] | |||
Version=1.1 | |||
Type=Application | |||
Name=BleachBit x.x.x | |||
GenericName=BleachBit | |||
Comment=Free space and maintain privacy | |||
Exec=/<BleachBitのインストールディレクトリ>/StartBleachBit.sh %F | |||
Icon=/<BleachBitのアイコンが存在するディレクトリ>/BleachBit.png | |||
Terminal=false | |||
Categories=Utility; | |||
Keywords=cache;clean;free;performance;privacy; | |||
StartupNotify=true | |||
X-DBUS-ServiceName= | |||
X-DBUS-StartupType= | |||
X-GNOME-UsesNotifications=true | |||
X-KDE-SubstituteUID=false | |||
X-KDE-Username= | |||
X-SuSE-translate=false | |||
<br> | |||
# BleachBit_as_Root.desktop (スーパユーザ向け) | |||
#!/usr/bin/env xdg-open | |||
[Desktop Entry] | |||
Version=1.1 | |||
Type=Application | |||
Name=BleachBit x.x.x as Root | |||
GenericName=BleachBit | |||
Comment=Free space and maintain privacy | |||
Exec=xdg-su -c /<BleachBitのインストールディレクトリ>/StartBleachBit.sh %F | |||
Icon=/<BleachBitのアイコンが存在するディレクトリ>/BleachBit.png | |||
Terminal=false | |||
Categories=Utility; | |||
Keywords=cache;clean;free;performance;privacy; | |||
StartupNotify=true | |||
X-DBUS-ServiceName= | |||
X-DBUS-StartupType= | |||
X-GNOME-UsesNotifications=true | |||
X-KDE-SubstituteUID=false | |||
X-KDE-Username= | |||
X-SuSE-translate=true | |||
<br><br> | <br><br> | ||
__FORCETOC__ | __FORCETOC__ | ||
[[カテゴリ:CentOS]][[カテゴリ:SUSE]] | [[カテゴリ:CentOS]][[カテゴリ:SUSE]] |