Skip to content

Commit da4c1e4

Browse files
committed
More on virtual X11 client
1 parent c414346 commit da4c1e4

5 files changed

+66
-14
lines changed

NAMESPACE

+2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ export(RPC.RR)
88
export(check_cs)
99
export(check_exec)
1010
export(check_rr)
11+
export(checkx_rr)
1112
export(find_plink)
1213
export(kill_cs)
1314
export(kill_rr)
15+
export(killx_rr)
1416
export(machine)
1517
export(plink)
1618
export(rpc)

R/111_control.r

+14-8
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@
1313
#'
1414
# #' @param unix,macos,windows
1515
#'
16-
#' @param check,kill,start,startx,preload
16+
#' @param check,kill,start,preload,checkx,killx,startx
1717
#' RPC remoter commands used by \code{\link{check_rr}()},
18-
#' \code{\link{kill_rr}()}, or \code{\link{start_rr}()}.
18+
#' \code{\link{kill_rr}()}, or \code{\link{start_rr}()} and
19+
#' virtual X11 related versions \code{\link{checkx_rr}()},
20+
#' \code{\link{killx_rr}()}, or \code{\link{startx_rr}()}..
1921
#' RPC pbdCS commands used by \code{\link{check_cs}()},
2022
#' \code{\link{kill_cs}()}, or \code{\link{start_cs}()}.
2123
#'
@@ -103,18 +105,22 @@ RPC.LI <- function(
103105
#' @export
104106
#' @rdname zz_rpc_control
105107
RPC.RR <- function(
106-
check = "ps ax|grep '[r]emoter::server'",
107-
kill = "kill -9 $(ps ax|grep '[r]emoter::server'|awk '{print $1}')",
108+
check = "ps axww|grep '[r]emoter::server'",
109+
kill = "kill -9 $(ps axww|grep '[r]emoter::server'|awk '{print $1}')",
108110
start = "nohup Rscript -e 'remoter::server()' > .rrlog 2>&1 < /dev/null &",
109-
startx = "nohup xvfb-run Rscript -e 'remoter::server()' > .rrlog 2>&1 < /dev/null &",
110-
preload = "source ~/work-my/00_set_devel_R; "
111+
preload = "source ~/work-my/00_set_devel_R; ",
112+
checkx = "ps axww|grep '[r]emoter::server\\|[x]vfb-run'",
113+
killx = "kill -9 $(ps axww|grep '[r]emoter::server\\|[x]vfb-run'|awk '{print $1}')",
114+
startx = "nohup xvfb-run Rscript -e 'remoter::server()' > .rrlog 2>&1 < /dev/null &"
111115
){
112116
list(
113117
check = check,
114118
kill = kill,
115119
start = start,
116-
startx = startx,
117-
preload = preload
120+
preload = preload,
121+
checkx = checkx,
122+
killx = killx,
123+
startx = startx
118124
)
119125
}
120126

R/rpc_rr_example.r

+31
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
#' Lunix/unix commands \code{ps}, \code{grep}, \code{awk}, and \code{kill}
3333
#' are used.
3434
#'
35+
#' \code{checkx_rr()}, \code{killx_rr()}, and \code{startx_rr()} are functions
36+
#' with virtual X11 windows.
37+
#'
3538
#' @param machine
3639
#' A machine configuration. See \code{?machine}.
3740
#' @param preload
@@ -88,6 +91,20 @@ check_rr <- function(machine, cmd = .pbd_env$RPC.RR$check)
8891
}
8992

9093

94+
#' @rdname rpc_rr_example
95+
#' @export
96+
checkx_rr <- function(machine, cmd = .pbd_env$RPC.RR$checkx)
97+
{
98+
check.is.machine(machine)
99+
100+
ret <- suppressWarnings(
101+
rpc(cmd = cmd, machine = machine)
102+
)
103+
104+
invisible(ret)
105+
}
106+
107+
91108
#' @rdname rpc_rr_example
92109
#' @export
93110
kill_rr <- function(machine, cmd = .pbd_env$RPC.RR$kill)
@@ -102,6 +119,20 @@ kill_rr <- function(machine, cmd = .pbd_env$RPC.RR$kill)
102119
}
103120

104121

122+
#' @rdname rpc_rr_example
123+
#' @export
124+
killx_rr <- function(machine, cmd = .pbd_env$RPC.RR$killx)
125+
{
126+
check.is.machine(machine)
127+
128+
ret <- suppressWarnings(
129+
rpc(cmd = cmd, machine = machine)
130+
)
131+
132+
invisible(ret)
133+
}
134+
135+
105136
#' @rdname rpc_rr_example
106137
#' @export
107138
start_rr <- function(machine, cmd = .pbd_env$RPC.RR$start,

man/rpc_rr_example.Rd

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/zz_rpc_control.Rd

+10-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)