Re: How to use gvfs to unmount someone's gvfs mounted shared folder with root or sudo user.
- From: Alexander Larsson <alexl redhat com>
- To: minqiang wu <minqiang wu gmail com>
- Cc: gnome-list gnome org, nautilus-list gnome org
- Subject: Re: How to use gvfs to unmount someone's gvfs mounted shared folder with root or sudo user.
- Date: Tue, 09 Dec 2008 09:35:34 +0100
On Fri, 2008-11-28 at 14:01 +0800, minqiang wu wrote:
> The request is as follows:
>
> On the destkop of use "abc", we use gvfs-mount to mount some shared
> folder with smb.
> The links are displayed on the user abc's desktop.
>
> Then we need to unmount all these shared folders, but our applicaiton
> has to run with root privilage now.
> Our application run with sudo, or just as "root" user.
> Then how we can umount the mounted smb shared folder on "abc" 's
> desktop.
> We tried to use gvfs-mount as "sudo -u abc gvfs-mount -u
> smb://xxx/test", but the gvfs-mount just report errors.
>
> Is there any solution to this case?
Thats kind of problematic. You need to access the dbus from the users
session so that you can find the gvfs daemon and tell it to unmount.
A more direct approach would be to just kill any gvfsd-smb the user is
running. (Although that would unmount all smb mounts).
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]