- sc_scripts - a gnome script package -

1. Download
2. What is it?
3. How to install the scripts
4. How to use the scripts
5. Add new scripts
6. Configuration

1. Download
You can download the script archive here...

sc_scripts package
(tested with gnome 2.2.1 and gnome 2.6.0)
Version: 19.4.2005

2. What is it?
The sc_script package contains bash script files which can be executed directly through the gnome desktop user interface. The scripts make use of gnome's ability to execute scripts with file arguments defined by selecting files and directories in the file manager (nautilus). You can access this feature through the context menu when clicking the right mouse button over a selection.
The provided scripts enable you to open an x terminal in a selected directory, to create zip archives, to backup automatically your files, to convert spaces to tabs in multiple files (or the other way), to count the number of lines in multiple files, and more.

3. How to install the scripts
Simply copy the content of the archive to ~/.gnome2/nautilus-scripts/. Do not forget to copy the hidden dot files and directories contained in the archive. If you want to execute the scripts from an ordinary shell, too, then you should add ~/.gnome2/nautilus-scripts/.scripts to your path (for example in ~/bash_profile).

4. How to use the scripts
Select some objects in the gnome file manager (nautilus) and click the right mouse button over your selection. There should be a menu point "Scripts" where you will find the installed scripts.
  • 01_nedit:
    This script opens all selected files with nedit, which is my favourite editor. Note that nedit must be installed when executing this script.
  • 02_terminal:
    This script opens a terminal in the currently selected directory.
  • 03_add_to_zip:
    This script quickly creates zip archives of all selected objects.
  • 04_backup:
    This script creates automatic backups (with the current date and time in the archive's name) of all selected directories. The backup archives are stored in your home directory.
  • 05_dir_size:
    This shows the size of all selected objects.
  • 06_root_terminal:
    This script opens a root terminal in the currently selected directory.
  • more_scripts/dos2unix:
    This script converts all selected files to unix ascii format. Selected directories are traversed recursively.
  • more_scripts/line_count:
    This script counts the number of code lines in all selected files. Selected directories are traversed recursively.
  • more_scripts/precise_size:
    This script computes a byte-precise size of all selected files. Selected directories are traversed recursively.
  • more_scripts/spaces_to_tabs:
    This script converts initial spaces to tabs in all selected files. Selected directories are traversed recursively.
  • more_scripts/tabs_to_spaces:
    This script converts initial tabs to spaces in all selected files. Selected directories are traversed recursively.

5. Add new scripts
New scripts can be added to the package by using the commands in the "_admin" directory. (Only use these functions if you know what you are doing!)

6. Configuration
The target directories for some commands (for example backup.sh) can be defined in the file .scripts/host_def.sh. There, you can even define different paths for different computers.


Nicolas Cuntz (www.setcolor.de)