no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | gnomemount-replacement [2009/03/26 19:42] (current) – enrico: create page for gnome-mount replacement 78.49.225.255 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Wrapper script for gnome-mount ====== | ||
| + | ===== Introduction ===== | ||
| + | |||
| + | Some programs like GVfs hard depend on the ' | ||
| + | |||
| + | The script was tested with Bash and Dash but should work with other shells as well. | ||
| + | |||
| + | ===== Usage ===== | ||
| + | |||
| + | Simply save the script as ' | ||
| + | |||
| + | ===== Download ===== | ||
| + | |||
| + | http:// | ||
| + | |||
| + | http:// | ||
| + | |||
| + | |||
| + | ===== Code ===== | ||
| + | |||
| + | <code bash> | ||
| + | #!/bin/sh | ||
| + | # | ||
| + | # gnome-mount - wrapper script for use with exo-mount | ||
| + | # | ||
| + | # Copyright 2009 Enrico Tröger < | ||
| + | # Licence: GPLv2 | ||
| + | # | ||
| + | # | ||
| + | # This script aims to be a wrapper script to provide the | ||
| + | # gnome-mount utility on envrionments which only have | ||
| + | # exo-mount (e.g. Xfce). It accepts all command line arguments | ||
| + | # which are passed but ignores all which are not supported by | ||
| + | # exo-mount. | ||
| + | # | ||
| + | # (This script was tested with Bash and Dash.) | ||
| + | # | ||
| + | # Possible use case is as a drop-in replacement to get mounting | ||
| + | # local resources with GVfs working, e.g. mounting disks in CD drives. | ||
| + | # | ||
| + | # Usage: | ||
| + | # Save this script as ' | ||
| + | # e.g. / | ||
| + | # | ||
| + | |||
| + | |||
| + | |||
| + | OPTS="" | ||
| + | |||
| + | # first catch all passed arguments and keep those exo-mount supports, | ||
| + | # ignore all other arguments | ||
| + | while [ -n " | ||
| + | do | ||
| + | case $1 in | ||
| + | -\? | ||
| + | OPTS=" | ||
| + | ;; | ||
| + | -e|--eject) | ||
| + | OPTS=" | ||
| + | ;; | ||
| + | -u|--unmount) | ||
| + | OPTS=" | ||
| + | ;; | ||
| + | -h|--hal-udi) | ||
| + | OPTS=" | ||
| + | shift | ||
| + | OPTS=" | ||
| + | ;; | ||
| + | -d|--device) | ||
| + | OPTS=" | ||
| + | shift | ||
| + | OPTS=" | ||
| + | ;; | ||
| + | -n|--no-ui) | ||
| + | OPTS=" | ||
| + | ;; | ||
| + | -V|--version) | ||
| + | OPTS=" | ||
| + | ;; | ||
| + | esac | ||
| + | shift | ||
| + | done | ||
| + | |||
| + | # now run exo-mount and hope things go well | ||
| + | exo-mount $OPTS | ||
| + | </ | ||