I now create a dummy xdg-open and put it before the path. Seems to have worked.
Also, suprisingly, when I simply run a julia files myfile.jl which uses normal plot(…) commands using julia myfile.jl, no error is thrown. Looks like Plots already comes with some display logic depending on how it is started