14.04中“ .gvfs”的位置


11

我的问题是“简单”。

在哪里可以找到我连接到的Samba共享的本地挂载点。在12.04,它位于下*home/.gvfs*

在此先感谢您的帮助。

这是我的smb.conf文件:

#======================= Global Settings =======================

[global]
workgroup = mshome
server string = %h server (Samba, Ubuntu)
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
    syslog = 0
    panic action = /usr/share/samba/panic-action %d
encrypt passwords = no
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
    map to guest = bad user
    usershare allow guests = yes
    comment = Home Directories
    browseable = no
    read only = no
security = user
username map = /etc/samba/smbusers

[printers]
    comment = All Printers
    browseable = no
    path = /var/spool/samba
    printable = yes
;   guest ok = no
;   read only = yes
    create mask = 0700
# Windows clients look for this share name as a source of downloadable
# printer drivers

[print$]
    comment = Printer Drivers
    path = /var/lib/samba/printers
;   browseable = yes
;   read only = yes
;   guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# You may need to replace 'lpadmin' with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
;   write list = root, @lpadmin
# A sample share for sharing your CD-ROM with others.

;[cdrom]
;   comment = Samba server's CD-ROM
;   read only = yes
;   locking = no
;   path = /cdrom
;   guest ok = yes
# The next two parameters show how to auto-mount a CD-ROM when the
#   cdrom share is accesed. For this to work /etc/fstab must contain
#   an entry like this:
#
#       /dev/scd0   /cdrom  iso9660 defaults,noauto,ro,user   0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
#   is mounted on /cdrom
#
;   preexec = /bin/mount /cdrom
;   postexec = /bin/umount /cdrom

[RED]
    comment = RED USB Disk
    path = /media/laurent06000/RED
    writeable = yes
;   browseable = yes
    guest ok = yes

[flareGet]
    path = /home/laurent06000/flareGet
    writeable = yes
;   browseable = yes
    guest ok = yes

[windows]
    comment = Windows Main drive
    path = /media/windows
    writeable = yes
;   browseable = yes
    guest ok = yes

1
如果其中一些解决了您的问题,请将答案标记为正确
Paulo Coghi-恢复莫妮卡

Answers:


10

感谢LewisTM,您可以在中找到gvfs文件夹/run/user/$UID/gvfs

$ mount | grep gvfs

另请参阅


对我而言不是这种情况-我什至没有.gvfs文件夹。与nautilus一起安装时,将在哪里安装samba共享?
dmeu

我建议将符号链接(ln -s /run/user/$UID/gvfs ~/.gvfs)链接到该文件夹​​,而不是每次都返回此答案,就像我做过太多次一样无法计数。
palswim

5

如果没有了.gvfs,您应该可以使用找到gvfs的安装位置mount | grep gvfs。例如, gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=nrd)

该位置在此处,如果需要,您可以通过编程将其拉出,mount | grep gvfs | awk '{print $3}'或类似的方式。此处的示例仅返回/run/user/1000/gvfs

如果您是12.10之前的用户,则应该拥有~/.gvfs,但在12.10之后,请查看/ run / user / user_id / gvfs /。
如果~/.gvfs已经存在(如果从较早版本进行升级,将会发生这种情况),它将不会在新版本中被破坏,但是无论如何都会创建新目录。

您可以通过几种不同的方式找到自己的uid,例如,通过查找/etc/passwd或运行id --userecho "$UID"

新位置将是 /run/user/$(id --user)/gvfs/

在我的系统中,$ XDG_RUNTIME_DIR变量还包含gvfs上方的目录:

$ env | grep user
[...]
XDG_RUNTIME_DIR=/run/user/1000

因此,在我的系统上,我有/run/user/1000/gvfs

另请参阅 为什么我的gvfs挂载未显示在〜/ .gvfs或/ run / user / <login> / gvfs下?


非常感谢heemayl和belacqua(稍有延迟-我没有在askubuntu过程中使用过),但这就是我想知道的。很有用 !!!
Laurent06000

我想通过在Nautilus地址栏中输入smb:// URL来访问安装的远程samba共享的命令行脚本。在以前的Ubuntu版本中,此类URL的挂载点是在〜/ .gvfs中创建的,这些年来,我一直找不到新的位置。谢谢。我可以确认新位置对于15.04、15.10和16.04保持不变。
Hatoru Hansou

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.