Tutorial 5 is all about pbdZMQ+remoter
packages using
Linux as a server and windows as a client. The server generates
a plot but the client displaies the plot.
The server has ip address "192.168.56.101" which is a xubuntu system
run in a VM where the host is Windows 8.
A newer demo can be found on my github repo at
snoweye/user2016.demo or in next.
The next may be out of date but shows the main idea. The server commands are to show ip address and run a server (remoter) as
SHELL> ifconfig enp0s8
SHELL> Rscript -e "remoter::server()"
The client code is to generate two plots on the server but display on the local devices. The code is as simple as the next.
R> library(remoter, quietly = TRUE)
R> client("192.168.56.101")
remoter> a <- function() plot(1:5)
remoter> rrpng(a)
remoter> dev.newc()
remoter> b <- function() plot(iris$Sepal.Length, iris$Petal.Length)
remoter> rrpng(b)
remoter> dev.curc()
remoter> dev.offc(2)
remoter> dev.offc(3)
remoter> q()
For plotting in R, the ubuntu/xubuntu may need a virtual X11 client xvfb
and
X11 adobe fonts. One may install them by
sudo apt-get install xvfb
sudo apt-get install t1-xfree86-nonfree ttf-xfree86-nonfree ttf-xfree86-nonfree-syriac xfonts-75dpi xfonts-100dpi
This will be considerably useful for most of Windows users.
For example, the remoter
server is launched externally
from a remoter
client where X11 servers are not available or X forwarding
is not enable or allowed.