顯示具有 nautilus 標籤的文章。 顯示所有文章
顯示具有 nautilus 標籤的文章。 顯示所有文章

2014年11月19日

nautilus大量改檔名

有家長向我說:在整相片時,會有需要把相機裡的檔案整理成方使識別的檔名,在新北市教育作業系統裡有沒有大量改檔名的功能,我記得nautilus有這個功能,找了一下,也試了一些程式,發現這個最好用。
程式引用:https://gist.github.com/hackedbellini/1230574/

我把它中文化並且稍微改了小地方,下載點:
https://drive.google.com/file/d/0Bz6-J_NwALFBQzV0S2hWZWVETlU/view?usp=sharing

下載放在家目錄中再開啟終端機,執行下列指令(不需要最高權限)
chmod +x ~/大量更名
cp ~/大量更名 ~/.local/share/nautilus/scripts/

如果其他使用者要用也需把它拷貝到使用者的家目錄中。

這個功能會收錄進下一版的新北市教育作業系統中。

使用方式很簡單,先選擇多個檔案,在檔案上按滑鼠右鍵選擇命令稿/大量更名

2014年5月15日

nautilus-open-as-root ubuntu 14.04

在ubuntu 14.04中又找不到nautilus-open-as-root套件,想把它裝起來,找到做法,記錄一下
1.在使用者的家目錄
$cd ~/.local/share/nautilus/scripts
$touch open-as-root
$chmod 755 open-as-root
$vim open-as-root
加入以下內容

#!/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

另一做法(事實上做法差不多)