Bug 59732

Summary: Can't unmount sshfs after playing a file with vlc (locked by xdg-screensaver)
Product: Portland Reporter: Konstantin Svist <fry.kun>
Component: xdg-utilsAssignee: Portland Bugs <portland-bugs>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Konstantin Svist 2013-01-22 19:57:14 UTC
When I use VLC to play back a video file mounted via sshfs, I often run into the problem of unmounting the path after playback is finished (and VLC is closed)

VLC is set up to prevent screensaver from showing during playback, but the script that locks this (/usr/bin/xdg-screensaver) only checks for unlock every 50 seconds (using "sleep 50").
In this setup, some sshfs-mounted files remain open and sshfs refuses to unmount since the files are in use.

My temporary workaround is to modify xdg-screensaver to set "sleep 5" -- but this only works because I unmount by hand (5 seconds lag between closing vlc and running the command is acceptable to me). This may not work well if someone sets up a script, for example, to sshfs-mount, play a clip, and instantly unmount when playback is finished.
Comment 1 Konstantin Svist 2013-11-07 21:20:12 UTC
Looks like there are no files that are actually locked by xdg-screensaver -- the only reason it refuses to quit is because its current directory is a remote one

So the proper fix is:

--- bak/usr/bin/xdg-screensaver	2013-10-31 10:30:28.512078590 -0700
+++ /usr/bin/xdg-screensaver	2013-10-31 10:30:38.503124792 -0700
@@ -876,6 +876,7 @@
 {
   lockfile
   test "${TMPDIR+set}" = set || TMPDIR=/tmp
+  cd $TMPDIR
   tmpfile=`mktemp $TMPDIR/tmp.XXXXXXXXXX`
   # Filter stale entries from the xdg-screensaver status file
   cat "$screensaver_file" 2> /dev/null | (
Comment 2 GitLab Migration User 2019-02-16 13:35:23 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdg-utils/issues/64.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.