Linux Commands Examples

A great documentation place for Linux commands

gvfs-mount

Mounts the locations


see also : ls - gvfs-info

Synopsis

gvfs-mount [OPTION...] [LOCATION...]

gvfs-mount --unmount-scheme=SCHEME

gvfs-mount --list [OPTION...]

gvfs-mount --monitor [OPTION...]


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples

3
source
            
done)|dmenu "$@"| sed "s/(M)//"|
while read d
do
if grep "$d" /etc/mtab > /dev/null
then
res=$(gvfs-mount -u `awk -v s=$d '{if($1==s)print $2}' /etc/mtab` 2>&1>/dev/null)
echo "$d оÑ?монÑ?иÑ?ован"
else
echo "$res"|dmenu "$@"
fi
else
echo "mount"
gvfs-mount -d "$d" | dmenu "$@"
fi
done
2
source
            
esac
homedirserver="homedir.$(cat /etc/puavo/domain)"
gvfsroot="${HOME}/.gvfs"
gvfs-mount "smb://${homedirserver}/${USER}" || true
gvfs-mount "smb://${homedirserver}/${USER}" || true
gvfs-mount "smb://${homedirserver}/share/${sharepath}/$(id -gn)" || true
0
source
            
remote_dir="/users/mwegner/tmp/"
mounted=$( gvfs-mount -l | grep ${remote_host} ) # non-empty string when mounted
if [ -z "${mounted}" ]; then
if [ -z "${mounted}" ]; then
if [ "$( gvfs-mount ${remote_host} )" ]; then
return 1
fi
fi
numfiles=0
for file in ${NAUTILUS_SCRIPT_SELECTED_URIS}; do
0
source
            
if [ x"$ID_GPHOTO2" = x"1" ];
then
gvfs-mount "gphoto2://[usb:${BUSNUM},${DEVNUM}]"
fi
elif [ ! -z "$DEVNAME" -a ! -z "$ID_FS_TYPE" -a x"$ID_FS_USAGE" = x"filesystem" ];
0
source
            
gvfsroot="${HOME}/.gvfs"
gvfs-mount "smb://${homedirserver}/${USER}" || true
gvfs-mount "smb://${homedirserver}/share/${sharepath}/$(id -gn)" || true
0
source
            
res=$(gvfs-mount -u `awk -v s=$d '{if($1==s)print $2}' /etc/mtab` 2>&1>/dev/null)
if [ -z "$res" ]
echo "mount"
gvfs-mount -d "$d" | dmenu "$@"
fi
done
0
source
            
then
gvfs-mount "gphoto2://[usb:${BUSNUM},${DEVNUM}]"
fi
elif [ ! -z "$DEVNAME" -a ! -z "$ID_FS_TYPE" -a x"$ID_FS_USAGE" = x"filesystem" ];
0
source
            
} &&
gvfs-mount -d "${dev}" ||
inc_st
shift
done
;;
"umount.media")
if [ ${#} -gt 0 ]
gvfs-mount -u "${1}" ||
inc_st
shift
done
else
for mp in /media/* /run/media/${USER}/*
0
source
            
echo "monto la cartella smb://$SAMBAUSER@$SAMBASERVER/$SAMBASHARE"
gvfs-mount smb://$SAMBAUSER@$SAMBASERVER/$SAMBASHARE
GVFSFOLDER=$(echo $HOME/.gvfs/$SAMBAUSER su $SAMBASERVER/)
echo "Smonto la cartella smb://$SAMBAUSER@$SAMBASERVER/$SAMBASHARE"
gvfs-mount -u smb://$SAMBAUSER@$SAMBASERVER/$SAMBASHARE
echo "Backup completato (Errori $RSYNCERR)"

description

gvfs-mount provides commandline access to various aspects of GIOs mounting functionality.

Mounting refers to the traditional concept of arranging multiple file systems and devices in a single tree, rooted at /. Classical mounting happens in the kernel and is controlled by the mount utility. GIO expands this concept by introducing mount daemons that can make file systems available to GIO applications without kernel involvement.

options

The following options are understood:

-h, --help

Prints a short help text and exits.

-m, --mountable

Mount as a mountable.

-d, --device=DEVICE

Mount the volume with the given device file.

-u, --unmount

Unmount the locations.

-e, --eject

Eject the locations.

-s, --unmount-scheme=SCHEME

Unmount all mounts with the given scheme.

-l, --list

List all known mounts.

-o, --monitor

Monitor mount and unmount events.

-i, --detail

Show extra information for --list and --monitor.

exit status

On success 0 is returned, a non-zero failure code otherwise.

gvfs mount

--monitor [OPTION...]

gvfs mount [option ]

[LOCATION...]
see also

ls , gvfs-info

How can this site be more helpful to YOU ?


give  feedback