Skip to content
Back to formatted view

Raw Message

Message-ID: <4DAE9058.7090909@unimedizin-mainz.de>
Date: 2011-04-20T07:50:48Z
From: Andreas Borg
Subject: Sweave stops when opening X11 device fails

Hi all,

I've run into the following problem with Sweave: I frequently run Sweave 
from a xterm console within an X session owned by a different user, i.e. 
my colleague is logged in on this computer and I do "su" with my 
username and start R and Sweave afterwards. Now, when Sweave comes to a 
figure chunk, it sees that there is an X server running and tries to 
show whatever I plot in that chunk on the screen, additionally to 
writing a pdf file. The problem is that I am not logged into the X 
session myself, and the script fails with a message saying someting like 
"could not open device X11" (I have German messages, so I do not know 
what the exact phrase would be in English). When I log in with putty, 
where there is no X11 at all, everything works fine. Is there a way to 
prevent Sweave from failing in the former case? Would this even account 
as a bug? I think it would be nice if the script just kept on running 
without plotting on the screen if opening X11 fails, just like it does 
when no X11 is available at all.

Best regards,

Andreas

-- 
Andreas Borg
Medizinische Informatik

UNIVERSIT?TSMEDIZIN
der Johannes Gutenberg-Universit?t
Institut f?r Medizinische Biometrie, Epidemiologie und Informatik
Obere Zahlbacher Stra?e 69, 55131 Mainz
www.imbei.uni-mainz.de

Telefon +49 (0) 6131 175062
E-Mail: borg at imbei.uni-mainz.de

Diese E-Mail enth?lt vertrauliche und/oder rechtlich gesch?tzte Informationen. Wenn Sie nicht der
richtige Adressat sind oder diese E-Mail irrt?mlich erhalten haben, informieren Sie bitte sofort den
Absender und l?schen Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe
dieser Mail und der darin enthaltenen Informationen ist nicht gestattet.