3
$\begingroup$

I need this command to work through the WolframKernel and it seems well beyond my understanding why it does not work above a certain amount of data size I'm passing to Run

show[g_]:=Run["LD_LIBRARY_PATH=/usr/bin;
   echo'<>StringReplace[ExportString[g,"SVG"],"\n"->" "]<>"'|bcat -b firefox &"]

It requires bcat (apt-get ruby-bcat) and it opens a new Firefox tab.

For simple graphics there're no issues. But, if I create a big SVG string the shell returns with error 32512. It's like the WolframKernel does not like to pass long commands to the shell. As a matter of fact, by exporting the same big SVG string+bash syntax to a shell executable, it runs just fine.

For instance, RandomGraph[{100,100}] is already too big to be evaluated by the show function.

$\endgroup$
3
  • $\begingroup$ A workaround might be to export to a file and then read that file into bcat. $\endgroup$ Commented Jan 12, 2019 at 1:18
  • $\begingroup$ @CarlLange that's what I meant with "As a matter of fact, by exporting the same big SVG string+bash syntax to a shell executable, it runs just fine. " $\endgroup$ Commented Jan 12, 2019 at 1:50
  • 2
    $\begingroup$ Ah, sorry, I didn't see that. ExportString[RandomGraph[{100, 100}], "SVG"] is nearly 0.1 MB in size - I don't know what the issue is but it wouldn't shock me greatly to find that there's a bottleneck somewhere. Pasting 95000 characters into a terminal might break too. $\endgroup$ Commented Jan 12, 2019 at 2:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.