1

I have created new protocol handler for opening application through web pages where a link will open installed application like terminal/chrome etc as suggested in: (Is it possible to open an Ubuntu app from HTML?) , in my case its nautilus file browser.. worked perfectly w/o any arguments, however when I pass arguments like 'app://nautilus /home/user/dir/my dir/' (argument has space in it, it fails even tried escape sequence ('\') for space, no luck.

Here, I am trying to open directories in random sequence where I cannot create symbolic link for each of directories. Can some one help me how to pass arguments which has spaces to new created protocol ?

any help appreciated, thanks in advance.

tried creating a shell script test.sh which has just nautilus $@ , and nautilus "$@" and ran test.sh "/home/usr/dir/my\ dir" and all above combination, but no luck

1 Answers1

1

You need to put that part in between "'s. So that would be

"app://nautilus /home/user/dir/my dir/"

That is a common method when dealing with spaces and parameters.

Alternative: html uses url encoding. A space would then become a %20:

app://nautilus%20/home/user/dir/my%20dir/
Rinzwind
  • 309,379