Digraphs icon indicating copy to clipboard operation
Digraphs copied to clipboard

Splash(DotDigraph(D)) doesn't work on windows

Open samanthaharper opened this issue 5 years ago • 4 comments

gap> D := RandomDigraph(5);
<immutable digraph with 5 vertices, 25 edges>
gap> Splash(DotDigraph(D));
Error, none of the default viewers [ "xpdf", "xdg-open", "open", "evince", "okular", "gv" ] is available, please specify an available viewer in the options record component `viewer`, at /home/samharper/gap-4.11.0/pkg/Digraphs/gap/display.gi:154 called from
<function "Splash">( <arguments> )
 called from read-eval loop at *stdin*:2
type 'quit;' to quit to outer loop
brk> quit;

samanthaharper avatar Jun 29 '20 15:06 samanthaharper

If you would like to see it, and can't do this on Windows, you can try it online using Jupyter notebooks running on Binder: see https://github.com/gap-system/try-gap-in-jupyter. For example:

Screenshot 2020-06-29 at 22 48 42

Please be aware that Binder sessions are not persistent, you will have to download results of your calculations and/or images to save them locally.

olexandr-konovalov avatar Jun 29 '20 21:06 olexandr-konovalov

Great suggestion @alex-konovalov! You don't happen to know what the "correct" viewer name would be for the windows subsystem for linux, do you? Perhaps @ChrisJefferson knows?

james-d-mitchell avatar Jun 30 '20 09:06 james-d-mitchell

So, I'm not aware of a nice single command to do this I'm afraid, as it requires running two command (one to turn the path into a windows path, and a second to then "run" the resulting program).

I use the following tiny shell script, which I call wopen:

#!/usr/bin/env bash

winname=$(wslpath -w "$*")
cmd.exe /C start "$winname"

If you put this somewhere on your path (like as /usr/local/bin/wopen or some such), then using wopen as the viewer works.

ChrisJefferson avatar Jun 30 '20 09:06 ChrisJefferson

Stale issue message

github-actions[bot] avatar Jan 07 '22 01:01 github-actions[bot]