piwik

dimarts, 7 d’octubre del 2014

no DISPLAY variable so Tk is not available for R

When installing a R package that requires a Display variable to be set and we are connecting from another machine using SSH, we may be prompt with those errors:

> library(tcltk)
Warning message:
In fun(libname, pkgname) : no DISPLAY variable so Tk is not available


or

error reading package index file /usr/local/R/lib/tcltk2/tklibs/ipentry0.3/pkgIndex.tcl: too many nested evaluations (infinite loop?)

To fix this, we may either install the package from a computer using graphical environment or connecting through SSH but forwarding X:

cat /home/josep/.ssh/config

host *
GSSAPIAuthentication=no
StrictHostKeyChecking=ask
UsePrivilegedPort yes
KeepAlive=yes
ForwardX11Trusted yes
ForwardAgent yes
ServerAliveInterval 240
ForwardX11 yes

Cap comentari:

Publica un comentari a l'entrada