Differences
This shows you the differences between two versions of the page.
| zh-cn:gnomemount-replacement [2021/02/04 03:15] – created yjwork | zh-cn:gnomemount-replacement [2026/10/04 18:00] (current) – Delete untranslated page epetriglia | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)// | ||
| - | ====== 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 | ||
| - | </ | ||