Ubuntu

Comment 21 for bug 212789

It seems there are 2 different bugs being mentioned here.
I'm only experiencing what ma2412ma is (on Ubuntu 8.04), the frequent segfaulting of gvfs-fuse-daemon with ls -la returning "d????????? ? ? ? ? ? .gvfs" as output.
It happens when I'm editing files with gedit and browsing with Gnome Commander over my samba shares. I wrote a quick workaround that restarts gvfs-fuse-daemon whenever it croaks:

#!/bin/bash
# This is a workaround for some bug causing gvfs-fuse-daemon to frequently segfault
# and leave the ~/.gvfs directory inaccessable.
# It periodically checks the status of the directory and if it's broken,
# then it forces an unmount of the directory and starts gvfs-fuse-daemon.
#
# Start this script as a background process from .profile

dir="$HOME/.gvfs"

# Allow only 1 daemon process per user.
for pid in `ps -o'pid' --no-heading -C $(basename $0)`
do
 if [ $pid -ne $$ ]; then
  echo "$(basename $0) already running"
  exit
 fi;
done

# Loop forever
while :
do
 if [ ! -d $dir ]; then
  echo "Restarting gvfs-fuse-daemon"
  /bin/fusermount -zu $dir
  /usr/lib/gvfs/gvfs-fuse-daemon $dir
 fi
 sleep 10
done