@@ -102,7 +102,9 @@ orca <- function(p, file = "plot.png", format = tools::file_ext(file),
102
102
# ' @param window_max_number Sets maximum number of browser windows the server can keep open at a given time.
103
103
# ' @param request_limit Sets a request limit that makes orca exit when reached.
104
104
# ' @param quiet Suppress all logging info.
105
- # ' @param xvfb Whether to run orca via X virtual framebuffer. May be necessary in a headless environment
105
+ # ' @param more_args additional arguments to pass along to system command. This is mainly useful
106
+ # ' for specifying electron options, such as `--disable-gpu`.
107
+ # ' @param ... arguments passed along to `processx::process$new()`.
106
108
# '
107
109
# ' @section Methods:
108
110
# '
@@ -129,7 +131,7 @@ orca <- function(p, file = "plot.png", format = tools::file_ext(file),
129
131
130
132
orca_serve <- function (port = 5151 , mathjax = FALSE , safe = FALSE , request_limit = NULL ,
131
133
keep_alive = TRUE , window_max_number = NULL , quiet = FALSE ,
132
- debug = FALSE , xvfb = FALSE , ... ) {
134
+ debug = FALSE , more_args = NULL , ... ) {
133
135
134
136
# make sure we have the required infrastructure
135
137
orca_available()
@@ -144,10 +146,11 @@ orca_serve <- function(port = 5151, mathjax = FALSE, safe = FALSE, request_limit
144
146
" -p" , port ,
145
147
" --plotly" , plotlyjs_file ,
146
148
if (safe ) " --safe-mode" ,
147
- # if (orca_version() >= "1.1.1") "--graph-only",
149
+ if (orca_version() > = " 1.1.1" ) " --graph-only" ,
148
150
if (keep_alive ) " --keep-alive" ,
149
151
if (debug ) " --debug" ,
150
- if (quiet ) " --quiet"
152
+ if (quiet ) " --quiet" ,
153
+ more_args
151
154
)
152
155
153
156
if (! is.null(request_limit ))
@@ -162,11 +165,7 @@ orca_serve <- function(port = 5151, mathjax = FALSE, safe = FALSE, request_limit
162
165
if (isTRUE(mathjax ))
163
166
args <- c(args , " --mathjax" , file.path(mathjax_path(), " MathJax.js" ))
164
167
165
- process <- if (xvfb ) {
166
- processx :: process $ new(" xvfb-run" , c(" orca" , args ), ... )
167
- } else {
168
- processx :: process $ new(" orca" , args , ... )
169
- }
168
+ process <- processx :: process $ new(" orca" , args , ... )
170
169
171
170
list (
172
171
port = port ,
0 commit comments