[R-sig-Debian] X trouble in R on Ubuntu

Dirk Eddelbuettel edd at debian.org
Mon Jul 26 00:30:44 CEST 2010


On 25 July 2010 at 17:19, Michael Wesolowski wrote:
| Hello,
| 
| As per the subject, I am unable to do the following:
| 
| plot(1);
| 
| The error message I get is ( as user postgres)
| 
| No protocol specified
| Error in X11(d$display, d$width, d$height, d$pointsize, d$gamma,
| d$colortype,  :
|   unable to start device X11cairo
| In addition: Warning message:
| In function (display = "", width, height, pointsize, gamma, bg,  :
|   unable to open connection to X11 display ''
| 
| I have tried looking around before posting to the mailing list, but I don't
| have the Linux knowledge to make this work.
| 
| Some helpful information might be the truncated output from capabilities() -
| the output suggests the probable cause for this error, but I don't know how
| to fix it.
| 
| as user postgres:
| > capabilities()
| X11     cairo
| FALSE     TRUE
| 
| 
| as user root:
| > capabilities()
| X11     cairo
| TRUE     TRUE

Thanks for sending this last bit. It shows that your R version is actually
fine.

Which leaves your postgres user as the suspect. How did you log into the
postgres account?  Under *normal* Unix behaviour, only the user at the
current workstation has x11 rights. In other words, no other user can.  

One known workaround is to explicitly request it, and ssh can help with it.
If you are logged in as 'you' (as an aside, *never* log in as root), you
should have x11. You verify this by running an x11 application (I often pick
xclock as it starts fast) or by starting R and asking for capabilities. 

The try 'ssh -X postgres at localhost' which attempt to log in as user postgres
on your local machine --- while also granting the x11 permissions you have to
the postgres user.

Hope this helps, Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com



More information about the R-SIG-Debian mailing list