openwith icon indicating copy to clipboard operation
openwith copied to clipboard

Open With doesn't support Shell Command Line Chaining Operators in Linux

Open antistress opened this issue 5 years ago • 2 comments

Hi,

On my Debian GNU/Linux system, I can set Open With to work with that lonely command : flatpak run com.github.unrud.VideoDownloader --url %s Whereas Open With doesn't work with that double command : flatpak run --command=gsettings com.github.unrud.VideoDownloader set com.github.unrud.VideoDownloader mode video && flatpak run com.github.unrud.VideoDownloader --url %s It doesn't work either if I replace && with ; or ||

Thanks !

antistress avatar May 07 '20 16:05 antistress

I have not looked through the source, but it sounds like it is execing the command directly, whereas you are trying to use shell constructs in the command. Try calling a shell instead, eg.,

sh -c 'flatpak run --command=gsettings com.github.unrud.VideoDownloader set com.github.unrud.VideoDownloader mode video && flatpak run com.github.unrud.VideoDownloader --url %s'

Or, if you want to do more shell things, consider putting them into a separate shell script and calling that instead.

yjfguhd avatar Dec 06 '20 11:12 yjfguhd

@yjfguhd : I'll try this, many thanks for the workaround :)

antistress avatar Dec 06 '20 14:12 antistress