[R-SIG-Mac] Using a second monitor, running R under Unix

John Maindonald John.Maindonald at anu.edu.au
Wed Jan 17 09:29:21 CET 2007


The effect is just the same.  The quartz window seems, from what I  
see when I press F9, to locate itself immediately to the left of the  
upper screen, which is the external monitor (and the one from whose  
terminal window I launched R).

John Maindonald             email: john.maindonald at anu.edu.au
phone : +61 2 (6125)3473    fax  : +61 2(6125)5549
Centre for Mathematics & Its Applications, Room 1194,
John Dedman Mathematical Sciences Building (Building 27)
Australian National University, Canberra ACT 0200.


On 17 Jan 2007, at 5:34 PM, stefano iacus wrote:

> I remind that that old R quartz window (i.e. not the one recoded in
> R.app) opens at the right-top corner of the screen.
> I don't know what the system considers "right-top" when you have two
> monitors.
>
> The error you get has always been there because the OS window server
> does not behave like X11 window server.
> Did you get the same error if you open a terminal window in the
> second screen (the one in which quartz device pops-up), launch R from
> there and open quartz() device?
>
> stefano
> On 17/gen/07, at 01:55, Byron Ellis wrote:
>
>> Oh, that's unrelated and mostly harmless probably due to bitrot in  
>> the
>> quartz device. The device that R.app uses actually lives in R.app
>> whereas the older quartz device lives in R itself and AFAIK isn't
>> really maintained anymore. Basically, it's popping the transform  
>> stack
>> one too many times somewhere, but that only affects the particular
>> context so it's unlikely to affect anything.
>>
>> On 1/16/07, John Maindonald <John.Maindonald at anu.edu.au> wrote:
>>> Thanks.  I have of course been aware of the event loop issue.  But
>>> does this also explain why the quartz window appears off screen?   
>>> I'd
>>> not have expected that the event loop issue ought to generate the
>>> "CGGStackRestore: gstack underflow" message.
>>>
>>> John Maindonald             email: john.maindonald at anu.edu.au
>>> phone : +61 2 (6125)3473    fax  : +61 2(6125)5549
>>> Centre for Mathematics & Its Applications, Room 1194,
>>> John Dedman Mathematical Sciences Building (Building 27)
>>> Australian National University, Canberra ACT 0200.
>>>
>>>
>>> On 17 Jan 2007, at 6:54 AM, Byron Ellis wrote:
>>>
>>>> Hi James,
>>>>
>>>> This is because of the different between the Quartz and X11 Window
>>>> Server notion of How The World Works. Quartz event processing is an
>>>> in-process thing such that ALL events, including window dragging,
>>>> must
>>>> be handled by the in-process event loop. When you start a Quartz
>>>> device when running in ESS there effectively isn't an event loop
>>>> to do
>>>> the processing so you don't get to drag windows around. To top it
>>>> off,
>>>> I believe the server may also differentiate between interactive and
>>>> non-interactive applications so despite getting access to the  
>>>> server
>>>> they can't receive events (but my memory here is hazy).
>>>>
>>>> In Mojave I had a function that actually gave you an event loop by
>>>> putting the console reader onto a separate thread and pumping the
>>>> event loop on the main thread, which seemed to work pretty well. It
>>>> also used an undocumented call to give you an interactive
>>>> application,
>>>> which had the unfortunate side effect of a weird (unusable) dock
>>>> icon,
>>>> but let you use a graphics device. I'll try to dig up a copy of  
>>>> that
>>>> (I took it out of the svn Mojave for reasons I've forgotten :-) )
>>>> and
>>>> post it somewhere. IIRC you might also get a bonus quartz graphics
>>>> device I was experimenting with. :-)
>>>>
>>>>
>>>> On 1/14/07, John Maindonald <john.maindonald at anu.edu.au> wrote:
>>>>> I am using a MacBook Pro with Core 2 Duo, with an external screen
>>>>> connected that is set to appear above the MacBook Pro's screen.
>>>>> The
>>>>> laptop's menu appear bar is set to appear at the top of the
>>>>> external
>>>>> monitor.
>>>>>
>>>>> When I run R under ESS, or from the Unix command line, and type
>>>>> quartz
>>>>> (), the graphics window appears to the "left" of the external
>>>>> monitor.  Hitting the F9 key brings it into view, but there
>>>>> seems no
>>>>> way to grab it with the mouse and move it onto less ephemeral real
>>>>> estate.  [Under R.app, all is well.]
>>>>>
>>>>> [With x11() half the window is off to the left, and I can drag
>>>>> it to
>>>>> anywhere I want (either screen).]
>>>>>
>>>>> A further issue is that when I plot anything on the quartz
>>>>> screen, I
>>>>> get an "error: message, thus:
>>>>>
>>>>>> quartz()
>>>>> Warning message:
>>>>> quartz() device interactivity reduced without an event loop  
>>>>> manager
>>>>> in: quartz()
>>>>>> plot(1:5, 1:5)
>>>>> CGGStackRestore: gstack underflow.
>>>>>
>>>>> The "CGGStackRestore: gstack underflow" message looks ominous,
>>>>> but it
>>>>> does not cause evident problems.
>>>>>
>>>>> Is there something I can do so that the positioning of the second
>>>>> screen is recognized?  At some time in the past, I am sure that
>>>>> quartz
>>>>> () [ and x11()] used to correctly recognize the positioning of the
>>>>> screens.  However it is a while since I used quartz(), and I would
>>>>> not have paid too much attention to the x11() behaviour.
>>>>> John Maindonald
>>>>>
>>>>>> sessionInfo()
>>>>> R version 2.4.1 (2006-12-18)
>>>>> i386-apple-darwin8.8.1
>>>>>
>>>>> locale:
>>>>> C
>>>>>
>>>>> attached base packages:
>>>>> [1] "splines"   "stats"     "graphics"  "grDevices" "utils"
>>>>> "datasets"
>>>>> [7] "methods"   "base"
>>>>>
>>>>>
>>>>> John Maindonald             email: john.maindonald at anu.edu.au
>>>>> phone : +61 2 (6125)3473    fax  : +61 2(6125)5549
>>>>> Centre for Mathematics & Its Applications, Room 1194,
>>>>> John Dedman Mathematical Sciences Building (Building 27)
>>>>> Australian National University, Canberra ACT 0200.
>>>>>
>>>>> _______________________________________________
>>>>> R-SIG-Mac mailing list
>>>>> R-SIG-Mac at stat.math.ethz.ch
>>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>>>>
>>>>
>>>>
>>>> --
>>>> Byron Ellis (byron.ellis at gmail.com)
>>>> "Oook" -- The Librarian
>>>
>>
>>
>> -- 
>> Byron Ellis (byron.ellis at gmail.com)
>> "Oook" -- The Librarian
>>
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac



More information about the R-SIG-Mac mailing list