[R-SIG-Mac] Lion and X11

cstrato cstrato at aon.at
Sun Jan 29 00:49:59 CET 2012


Dear Simon,

Thank you for your replies, I understand now your explanation about R.app.

I do not think that the topic on the locale is unrelated to the plot 
problem, since adding to .bashrc:
   export LC_CTYPE=en_US.UTF-8
   export LC_ALL=en_US.UTF-8
does solve the problem with plot(), as you can see from the following 
output:

 > Sys.getenv("DISPLAY")
[1] ":0"
 > sessionInfo()
R version 2.14.1 (2011-12-22)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
 > plot(1:8)
 >

It is still not clear to me why I need to add above lines to .bashrc, 
since on my Snow Leopard machine this is not necessary. The locale there 
is also only C.

BTW, to run R I start always X11.app first and then start R from xterm, 
I do not use the Terminal.

Best regards
Christian


On 1/29/12 12:03 AM, Simon Urbanek wrote:
>
> On Jan 28, 2012, at 1:46 PM, cstrato wrote:
>
>> Yes, although I have started X11.app and run R from within an xterm I get:
>>
>>> plot(1:8)
>> No protocol specified
>> Error in X11(d$display, d$width, d$height, d$pointsize, d$gamma, d$colortype,  :
>>   unable to start device X11
>> In addition: Warning message:
>> In function (display = "", width, height, pointsize, gamma, bg,  :
>>   unable to open connection to X11 display ''
>
> Chances are that you DISPLAY is unset - you possibly messed with it in your startup files so R can't use X11 unless you give it the proper display. On a clean OS X you will see it set properly, e.g.:
>
>> Sys.getenv("DISPLAY")
> [1] "/tmp/launch-byCZTH/org.x:0"
>
> Please check that your DISPLAY is set (and that you don't mess with R options, either). This is setting is automatic on SL/Lion.
>
> Cheers,
> Simon
>
>
>
>>> sessionInfo()
>> R version 2.14.1 (2011-12-22)
>> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
>>
>> locale:
>> [1] C
>>
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>>
>>
>> I have never had this problem on Snow Leopard, Leopard or Tiger!
>>
>> Does someone have an idea what might be the reason?
>>
>> Best regards
>> Christian
>> _._._._._._._._._._._._._._._._._._
>> C.h.r.i.s.t.i.a.n   S.t.r.a.t.o.w.a
>> V.i.e.n.n.a           A.u.s.t.r.i.a
>> e.m.a.i.l:        cstrato at aon.at
>> _._._._._._._._._._._._._._._._._._
>>
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
>>
>
>



More information about the R-SIG-Mac mailing list