i was very excited  to add this and that is why i posted sort of half baked 
solution hoping that you can figure out the rest.
to be fair I have to add the complete (working oob solution) rather than just 
variable evaluation.

1) the existing mount point needs to be disconnected. because it is
session based you want to add unmount line to Default gdm PostSession
and below is one of the ways to do accomplish it:

cat << EOF | sudo tee /etc/gdm/PostSession/Default >/dev/null
#!/bin/sh

/bin/fusermount -zu "$HOME/.gvfs" 1>/dev/null 2>&1 || true

exit 0
EOF

2) create ~/bin directory (mkdir ~/bin), add this directory to search path in 
/etc/environment so it looks roughly like this:
PATH=/home/<username>/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/<username>/.local/bin

3) .bashrc gets the following entry
$HOME/bin/gvfs-daemon-start

4) make gvfs-daemon-start executable and the script roughly it looks
like this:

#!/bin/bash
MNT=.gvfs
PIDOF=`pidof gvfs-fuse-daemon`
RETVAL=$?

if [ "$RETVAL" -eq 1 ]; then
  # echo "Mounting $MNT"
  log_daemon_msg "Mouting $MNT"
  /usr/lib/gvfs//gvfs-fuse-daemon ~/$MNT
  log_end_msg 0
else
  echo "you be fortune."
fi

5)log off the session, log back in and make necessary adjustments if you
feel like it.

cheers

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gvfs in Ubuntu.
https://bugs.launchpad.net/bugs/890647

Title:
  .gvfs: Transport endpoint is not connected

Status in “gvfs” package in Ubuntu:
  Confirmed

Bug description:
  I am mounting an SMB share to AS/400 via the GUI (gvfs). Then running
  a multi-threaded Java program to copy files from the AS/400 to my PC
  hard disks. The Java program uses pathnames to access the files on the
  AS/400, e.g. /home/<me>/.gvfs/dira/dirb... All this works fine and it
  runs for many hours (say 18+). Then the connection is lost. the AS/400
  is up the whole time and appears quite accessible.

  The really strange thing is that the files and directories on the
  AS/400 can still be seen and accessed via Nautilus before and after
  the problem. What doesn't work is the pathname, so my Java program
  can't use the path, and if I open a terminal and try to cd to .gvfs I
  get:

  cd .gvfs
  bash: cd: .gvfs: Transport endpoint is not connected

  The only way I can get out of this is to reboot (logging off and on
  again does not help).

  As I have millions (not exaggerating) of files to copy a solution
  would be really helpful.

  I was using 9.10, but upgraded yesterday to 11.10. Both have the same
  problem in the same way.

  Thanks in advance.

  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: gvfs 1.10.0-0ubuntu1
  ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
  Uname: Linux 3.0.0-12-generic i686
  ApportVersion: 1.23-0ubuntu4
  Architecture: i386
  Date: Tue Nov 15 11:06:21 2011
  InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
  SourcePackage: gvfs
  UpgradeStatus: Upgraded to oneiric on 2011-11-14 (0 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/890647/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to