I need to use the automated fuse mount as root and xdg-open it's content as the desktop user, how could I achieve that?
filetype {*.zip,*.jar,*.war,*.ear,*.oxt,*.apkg},<application/zip,application/java-archive> FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR
Usually I wrap the command in su -c 'cmd' username, and did it successfully for other filextype, for example
filextype {*.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm},<image/*> su -c 'if [[ -n "$XDG_CURRENT_DESKTOP" ]]; then for element in %f; do xdg-open "$element"; done > /dev/null 2>&1' john
but trying this on fuse mount
filetype {*.zip,*.jar,*.war,*.ear,*.oxt,*.apkg},<application/zip,application/java-archive> FUSE_MOUNT|su -c 'fuse-zip %SOURCE_FILE %DESTINATION_DIR' john
is giving me zsh:1: unmatched ', seems like a shell escape problem? this do nothing at all:
filetype {*.zip,*.jar,*.war,*.ear,*.oxt,*.apkg},<application/zip,application/java-archive> su -c 'FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR' john
I think I could manually write the fuse automation script, as last resort, but I would prefer to use the already existing code if possible