Skip to content

Commit

Permalink
Check if display is available for p[lotting
Browse files Browse the repository at this point in the history
  • Loading branch information
jheinen committed Jan 9, 2024
1 parent fecaf2b commit 0fad399
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/GR.jl
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ function init(always::Bool = false)
ENV["GKS_FILEPATH"] = file_path[]
@debug "Found an embedded environment" mime_type[] file_path[] ENV["GKSwstype"] ENV["GKS_FILEPATH"]
else
haskey(ENV, "GKSwstype") || get!(ENV, "GKSwstype", "gksqt")
default_wstype = haskey(ENV, "DISPLAY") ? "gksqt" : ""
haskey(ENV, "GKSwstype") || get!(ENV, "GKSwstype", default_wstype)
if !haskey(ENV, "GKS_QT")
ENV["GKS_QT"] = if Sys.iswindows()
"set PATH=$(GRPreferences.libpath[]) & \"$(GRPreferences.gksqt[])\""
Expand Down

0 comments on commit 0fad399

Please sign in to comment.