{"action":"created","issue":{"url":"https://api.github.com/repos/IgnorantGuru/spacefm/issues/475","labels_url":"https://api.github.com/repos/IgnorantGuru/spacefm/issues/475/labels{/name}","comments_url":"https://api.github.com/repos/IgnorantGuru/spacefm/issues/475/comments","events_url":"https://api.github.com/repos/IgnorantGuru/spacefm/issues/475/events","html_url":"https://github.com/IgnorantGuru/spacefm/issues/475","id":60259297,"number":475,"title":"Protocol handlers: go-mtpfs issues","user":{"login":"Vladimir-csp","id":4061903,"avatar_url":"https://avatars.githubusercontent.com/u/4061903?v=3","gravatar_id":"","url":"https://api.github.com/users/Vladimir-csp","html_url":"https://github.com/Vladimir-csp","followers_url":"https://api.github.com/users/Vladimir-csp/followers","following_url":"https://api.github.com/users/Vladimir-csp/following{/other_user}","gists_url":"https://api.github.com/users/Vladimir-csp/gists{/gist_id}","starred_url":"https://api.github.com/users/Vladimir-csp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vladimir-csp/subscriptions","organizations_url":"https://api.github.com/users/Vladimir-csp/orgs","repos_url":"https://api.github.com/users/Vladimir-csp/repos","events_url":"https://api.github.com/users/Vladimir-csp/events{/privacy}","received_events_url":"https://api.github.com/users/Vladimir-csp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/IgnorantGuru/spacefm/labels/need%20info","name":"need info","color":"0b02e1"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/IgnorantGuru/spacefm/milestones/11","html_url":"https://github.com/IgnorantGuru/spacefm/milestones/hand","labels_url":"https://api.github.com/repos/IgnorantGuru/spacefm/milestones/11/labels","id":994615,"number":11,"title":"hand","description":"Due with release of the under-development hand branch.","creator":{"login":"IgnorantGuru","id":653952,"avatar_url":"https://avatars.githubusercontent.com/u/653952?v=3","gravatar_id":"","url":"https://api.github.com/users/IgnorantGuru","html_url":"https://github.com/IgnorantGuru","followers_url":"https://api.github.com/users/IgnorantGuru/followers","following_url":"https://api.github.com/users/IgnorantGuru/following{/other_user}","gists_url":"https://api.github.com/users/IgnorantGuru/gists{/gist_id}","starred_url":"https://api.github.com/users/IgnorantGuru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgnorantGuru/subscriptions","organizations_url":"https://api.github.com/users/IgnorantGuru/orgs","repos_url":"https://api.github.com/users/IgnorantGuru/repos","events_url":"https://api.github.com/users/IgnorantGuru/events{/privacy}","received_events_url":"https://api.github.com/users/IgnorantGuru/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":0,"state":"open","created_at":"2015-02-25T03:54:47Z","updated_at":"2015-03-09T00:45:19Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-03-08T14:39:57Z","updated_at":"2015-03-09T06:23:18Z","closed_at":null,"body":"I've tried to create go-mtpfs handler, analogous to sshfs.\r\n```\r\necho \">>> go-mtpfs %a\"\r\necho\r\n# Run go-mtpfs through nohup to prevent disconnect on terminal close\r\ngomtpfstmp=\"$(mktemp --tmpdir spacefm-go-mtpfs-output-XXXXXXXX.tmp)\" || exit 1\r\nnohup go-mtpfs \"%a\" &> \"$gomtpfstmp\" &\r\nsleep 2s\r\n[[ -e \"$gomtpfstmp\" ]] && cat \"$gomtpfstmp\" ; rm -f \"$gomtpfstmp\"\r\nmountpoint \"%a\"  # set success status only if positive that mountpoint is mountpoint\r\n```\r\nKey difference is that go-mtpfs process should run all the time while FS is mounted, otherwise 'endpoint not connected'. Therefore I'm forking it to background, then checking if mount is successful by fact.\r\nHere are teh problems:\r\n- If handler is being run in terminal, go-mtpfs exits with terminal despite nohup.\r\n- If handler is not being run in terminal, mount is successful, but:\r\n - SpaceFM does not open mountpoint on successful mount\r\n - SpaceFM does not list mount in devices."},"comment":{"url":"https://api.github.com/repos/IgnorantGuru/spacefm/issues/comments/77805833","html_url":"https://github.com/IgnorantGuru/spacefm/issues/475#issuecomment-77805833","issue_url":"https://api.github.com/repos/IgnorantGuru/spacefm/issues/475","id":77805833,"user":{"login":"Vladimir-csp","id":4061903,"avatar_url":"https://avatars.githubusercontent.com/u/4061903?v=3","gravatar_id":"","url":"https://api.github.com/users/Vladimir-csp","html_url":"https://github.com/Vladimir-csp","followers_url":"https://api.github.com/users/Vladimir-csp/followers","following_url":"https://api.github.com/users/Vladimir-csp/following{/other_user}","gists_url":"https://api.github.com/users/Vladimir-csp/gists{/gist_id}","starred_url":"https://api.github.com/users/Vladimir-csp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vladimir-csp/subscriptions","organizations_url":"https://api.github.com/users/Vladimir-csp/orgs","repos_url":"https://api.github.com/users/Vladimir-csp/repos","events_url":"https://api.github.com/users/Vladimir-csp/events{/privacy}","received_events_url":"https://api.github.com/users/Vladimir-csp/received_events","type":"User","site_admin":false},"created_at":"2015-03-09T06:23:18Z","updated_at":"2015-03-09T06:23:18Z","body":"/proc/self/mountinfo\r\n```\r\n99 39 0:34 / /home/psycho/.cache/spacefm/go-mtpfs- rw,nosuid,nodev,relatime shared:83 - fuse.DeviceFs(GT-I9192) DeviceFs(GT-I9192) rw,user_id=1000,group_id=100\r\n```\r\n/proc/mounts\r\n```\r\nDeviceFs(GT-I9192) /home/psycho/.cache/spacefm/go-mtpfs- fuse.DeviceFs(GT-I9192) rw,nosuid,nodev,relatime,user_id=1000,group_id=100 0 0\r\n```\r\n/etc/mtab\r\n```\r\nDeviceFs(GT-I9192) /home/psycho/.cache/spacefm/go-mtpfs- fuse.DeviceFs(GT-I9192) rw,nosuid,nodev,relatime,user_id=1000,group_id=100 0 0\r\n```\r\nTried enabling everything in devices menu, still not showing this mount.\r\n\r\nAlso note trailing dash in mountpoint path. Mountpoint name generator should be tweaked to throw the dash out for targetless filesystems."}}