■ このスレッドは過去ログ倉庫に格納されています
【初心者】Ubuntu Linux 100【祝】
- 665 :login:Penguin:2014/06/15(日) 19:17:37.83 ID:BgnjuVSM.net
- >>160
ソフトウェアーセンターでgksuを検索して出てきたGrahical frontend to su gksuをインストールして端末からnautilusでフォルダーを開いて Ctrl+H とキーを叩く
それからUSER Home -> .local -> share -> nautilus -> scripts.まで開いてopen-as-administratorファイルを制作して下記を書き込む
#!/bin/bash
#
# this code will determine exactly the path and the type of object,
# then it will decide use gedit or nautilus to open it by ROOT permission
#
# Determine the path
if [ -e -n $1 ]; then
obj="$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"
else
base="`echo $NAUTILUS_SCRIPT_CURRENT_URI | cut -d'/' -f3- | sed 's/%20/ /g'`"
obj="$base/${1##*/}"
fi
# Determine the type and run as ROOT
if [ -f "$obj" ]; then
gksu gedit "$obj"
elif [ -d "$obj" ]; then
gksu nautilus "$obj"
fi
exit 0
キーボードで Ctrl+Alt+T を叩き端末を起動して下記を書き込むコピペでもok
cd .local/share/nautilus/scripts/ && chmod 0755 open-as-administrator
最後に nautilus -q して終了、右クリックでスクリプトにopen-as-administratorが出てきたら成功
総レス数 1001
208 KB
新着レスの表示
掲示板に戻る
全部
前100
次100
最新50
read.cgi ver.24052200