X11 is not availble

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

X11 is not availble

Dennis Schmidt-3
Hi there,

after several problems with installing R on a Debian server It now  
finally works at least roughly. With roughly I mean that the 'core'  
function do work properly, but I'm still having problems with the  
image export. When I try to call

png(filename="my_file.png", width=800, height=300, pointsize=12, bg =  
"white")

I just get the error message "X11 is not available". But I don't know  
what packages (or symlinks???) could still be missing.
I've installed R using the latest 2.8.0 version from the server which  
I could compile (after solving quite some different problems) normally.

I hope anyone can help me out, best wishes,

Dennis Schmidt

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: X11 is not availble

Dennis Schmidt-3
Hi Fredrik,

well I'm connecting via SSH onto the machine. Lateron the R scripts  
shall be executed via some Ruby scripts. The pdf export is working  
properly, but I think it would be very ugly to first create a pdf file  
and then convert it to my needed png (or any other pure image format).  
Is there no way to manually connect to X11 even in my use case?

Dennis



Am 18.12.2008 um 12:30 schrieb Fredrik Karlsson:

> Hi Dennis,
>
> Are you working from a remote client, i.e. not logged into the machine
> locally (in X)? If so, the png and jpg devices seem to need to be able
> to connect to X.
>
> http://tolstoy.newcastle.edu.au/R/e2/help/06/10/3553.html
>
> Try using the pdf device instead.
>
> /Fredrik
>
> On Thu, Dec 18, 2008 at 10:47 AM, Dennis Schmidt
> <[hidden email]> wrote:
>> Hi there,
>>
>> after several problems with installing R on a Debian server It now  
>> finally
>> works at least roughly. With roughly I mean that the 'core'  
>> function do work
>> properly, but I'm still having problems with the image export. When  
>> I try to
>> call
>>
>> png(filename="my_file.png", width=800, height=300, pointsize=12, bg =
>> "white")
>>
>> I just get the error message "X11 is not available". But I don't  
>> know what
>> packages (or symlinks???) could still be missing.
>> I've installed R using the latest 2.8.0 version from the server  
>> which I
>> could compile (after solving quite some different problems) normally.
>>
>> I hope anyone can help me out, best wishes,
>>
>> Dennis Schmidt
>>
>> ______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>
>
> --
> "Life is like a trumpet - if you don't put anything into it, you don't
> get anything out of it."

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: X11 is not availble

Dennis Schmidt-3
No, haven't seen this so far. But it quite looks like what I'm looking  
for, so thanks a lot :-)

Dennis


Am 18.12.2008 um 13:09 schrieb Fredrik Karlsson:

> Hi again,
>
> Sorry for bothering you, but have you seen this?
>
> http://www.stats.bris.ac.uk/R/web/packages/GDD/index.html
> or this one
> http://www.omegahat.org/CGIwithR/
>
> Maybe something for you?
>
> /Fredrik
>
> On Thu, Dec 18, 2008 at 11:49 AM, Fredrik Karlsson  
> <[hidden email]> wrote:
>> Hi Dennis,
>>
>> Possibly, but I am not sure. X11 is, as you know, not a library,  
>> but a
>> server. As such, it has built-in security.
>> It is possible that you can make an X-server of a server machine to
>> accept connections from a script run by a webserver (and thus not  
>> by a
>> user who gained access and has all the PAM credentials due to a user
>> log-in), but for me it seems like way too much hard work to get it
>> going (and it would also probably create an issue with security on  
>> the
>> way, I don't know.)
>>
>> Anyway, I would go for an intermediate temp-file solution. Maybe EPS
>> -> png conversion could work, and give good results (if PDF -> PNG
>> conversion does not)?
>>
>> Good luck!
>>
>> /Fredrik
>>
>> On Thu, Dec 18, 2008 at 11:38 AM, Dennis Schmidt
>> <[hidden email]> wrote:
>>> Hi Fredrik,
>>>
>>> well I'm connecting via SSH onto the machine. Lateron the R  
>>> scripts shall be
>>> executed via some Ruby scripts. The pdf export is working  
>>> properly, but I
>>> think it would be very ugly to first create a pdf file and then  
>>> convert it
>>> to my needed png (or any other pure image format). Is there no way  
>>> to
>>> manually connect to X11 even in my use case?
>>>
>>> Dennis
>>>
>>>
>>>
>>> Am 18.12.2008 um 12:30 schrieb Fredrik Karlsson:
>>>
>>>> Hi Dennis,
>>>>
>>>> Are you working from a remote client, i.e. not logged into the  
>>>> machine
>>>> locally (in X)? If so, the png and jpg devices seem to need to be  
>>>> able
>>>> to connect to X.
>>>>
>>>> http://tolstoy.newcastle.edu.au/R/e2/help/06/10/3553.html
>>>>
>>>> Try using the pdf device instead.
>>>>
>>>> /Fredrik
>>>>
>>>> On Thu, Dec 18, 2008 at 10:47 AM, Dennis Schmidt
>>>> <[hidden email]> wrote:
>>>>>
>>>>> Hi there,
>>>>>
>>>>> after several problems with installing R on a Debian server It now
>>>>> finally
>>>>> works at least roughly. With roughly I mean that the 'core'  
>>>>> function do
>>>>> work
>>>>> properly, but I'm still having problems with the image export.  
>>>>> When I try
>>>>> to
>>>>> call
>>>>>
>>>>> png(filename="my_file.png", width=800, height=300, pointsize=12,  
>>>>> bg =
>>>>> "white")
>>>>>
>>>>> I just get the error message "X11 is not available". But I don't  
>>>>> know
>>>>> what
>>>>> packages (or symlinks???) could still be missing.
>>>>> I've installed R using the latest 2.8.0 version from the server  
>>>>> which I
>>>>> could compile (after solving quite some different problems)  
>>>>> normally.
>>>>>
>>>>> I hope anyone can help me out, best wishes,
>>>>>
>>>>> Dennis Schmidt
>>>>>
>>>>> ______________________________________________
>>>>> [hidden email] mailing list
>>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>>> PLEASE do read the posting guide
>>>>> http://www.R-project.org/posting-guide.html
>>>>> and provide commented, minimal, self-contained, reproducible code.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> "Life is like a trumpet - if you don't put anything into it, you  
>>>> don't
>>>> get anything out of it."
>>>
>>> ______________________________________________
>>> [hidden email] mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>
>>
>>
>> --
>> "Life is like a trumpet - if you don't put anything into it, you  
>> don't
>> get anything out of it."
>>
>
>
>
> --
> "Life is like a trumpet - if you don't put anything into it, you don't
> get anything out of it."

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: X11 is not availble

barry rowlingson
2008/12/18 Dennis Schmidt <[hidden email]>:
> No, haven't seen this so far. But it quite looks like what I'm looking for,
> so thanks a lot :-)

 The png() device does not need an X server to connect to. I think it
used to in versions gone by, but not any more. Here I've disabled X so
that X11() doesn't work, but png() still does:

 > x11()
 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 x11() : unable to open connection to X11 display ''
 > png(file="foo2.png")
 > plot(1:10)
 > dev.off()
 null device
          1

 I suspect your R was compiled without png support. What does the
'capabilities()' function in R tell you?

 > capabilities()
    jpeg      png     tiff    tcltk      X11     aqua http/ftp  sockets
    TRUE     TRUE     TRUE     TRUE    FALSE    FALSE     TRUE     TRUE
  libxml     fifo   cledit    iconv      NLS  profmem    cairo
    TRUE     TRUE     TRUE     TRUE     TRUE     TRUE     TRUE

- I've got png capability - have you? If not, you need to recompile
and find out why. When you run configure it should tell you what
capabilities it has figured out for itself. To get png support you'll
need the png-devel library and header files.

 Anything else is speculation until we see capabilities()....

Barry

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: X11 is not availble

Dennis Schmidt-3
Hi Barry,

this is the output of my capabilities() call:

jpeg      png     tiff    tcltk      X11     aqua http/ftp  sockets
    FALSE    FALSE    FALSE    FALSE    FALSE    FALSE     TRUE     TRUE
   libxml     fifo   cledit    iconv      NLS  profmem    cairo
     TRUE     TRUE     TRUE     TRUE     TRUE    FALSE    FALSE

How do I install these png-devel library and header? (I'm sorry, my  
Unix knowledge isn't really THAT big ;-))
Tried apt-get, but that doesn't find anything linke png-dev or png-
devel...

Dennis

Am 18.12.2008 um 13:54 schrieb Barry Rowlingson:

> 2008/12/18 Dennis Schmidt <[hidden email]>:
>> No, haven't seen this so far. But it quite looks like what I'm  
>> looking for,
>> so thanks a lot :-)
>
> The png() device does not need an X server to connect to. I think it
> used to in versions gone by, but not any more. Here I've disabled X so
> that X11() doesn't work, but png() still does:
>
>> x11()
> 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 x11() : unable to open connection to X11 display ''
>> png(file="foo2.png")
>> plot(1:10)
>> dev.off()
> null device
>          1
>
> I suspect your R was compiled without png support. What does the
> 'capabilities()' function in R tell you?
>
>> capabilities()
>    jpeg      png     tiff    tcltk      X11     aqua http/ftp  sockets
>    TRUE     TRUE     TRUE     TRUE    FALSE    FALSE     TRUE     TRUE
>  libxml     fifo   cledit    iconv      NLS  profmem    cairo
>    TRUE     TRUE     TRUE     TRUE     TRUE     TRUE     TRUE
>
> - I've got png capability - have you? If not, you need to recompile
> and find out why. When you run configure it should tell you what
> capabilities it has figured out for itself. To get png support you'll
> need the png-devel library and header files.
>
> Anything else is speculation until we see capabilities()....
>
> Barry

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: X11 is not availble

Dirk Eddelbuettel
On Thu, Dec 18, 2008 at 02:52:40PM +0100, Dennis Schmidt wrote:

> Hi Barry,
>
> this is the output of my capabilities() call:
>
> jpeg      png     tiff    tcltk      X11     aqua http/ftp  sockets
>    FALSE    FALSE    FALSE    FALSE    FALSE    FALSE     TRUE     TRUE
>   libxml     fifo   cledit    iconv      NLS  profmem    cairo
>     TRUE     TRUE     TRUE     TRUE     TRUE    FALSE    FALSE
>
> How do I install these png-devel library and header? (I'm sorry, my Unix
> knowledge isn't really THAT big ;-))
> Tried apt-get, but that doesn't find anything linke png-dev or png-
> devel...

You can use apt-get to get R from Debian (albeit not the newest
version) and you can also use apt-get to get R from CRAN (newest
version).  See

  http://cran.r-project.org/bin/linux/debian

Either variant will be correctly built and have all available
capabilities.  In other words, you do not need to locally rebuild R
(but are of course free to do so if have a good reason).

Also note that there is the r-sig-debian list for questions on R and
Debian/Ubunut.

Dirk  

--
Three out of two people have difficulties with fractions.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: X11 is not availble

Dirk Eddelbuettel
On Thu, Dec 18, 2008 at 08:31:09AM -0600, Dirk Eddelbuettel wrote:

> On Thu, Dec 18, 2008 at 02:52:40PM +0100, Dennis Schmidt wrote:
> > Hi Barry,
> >
> > this is the output of my capabilities() call:
> >
> > jpeg      png     tiff    tcltk      X11     aqua http/ftp  sockets
> >    FALSE    FALSE    FALSE    FALSE    FALSE    FALSE     TRUE     TRUE
> >   libxml     fifo   cledit    iconv      NLS  profmem    cairo
> >     TRUE     TRUE     TRUE     TRUE     TRUE    FALSE    FALSE
> >
> > How do I install these png-devel library and header? (I'm sorry, my Unix
> > knowledge isn't really THAT big ;-))
> > Tried apt-get, but that doesn't find anything linke png-dev or png-
> > devel...
>
> You can use apt-get to get R from Debian (albeit not the newest
> version) and you can also use apt-get to get R from CRAN (newest

That was badly worded and somewhat misleading. To be more explicit:

   The newest version is in Debian unstable
   (currently: 2.8.1-beta as Dec 12), a recent version is in Debian
   testing (currently 2.7.1) and an older version is in Debian stable
   (currently 2.4.0).

   You can also get current versions of R for testing and stable by
   using the CRAN repository for Debian.

Dirk
   

> version).  See
>
>   http://cran.r-project.org/bin/linux/debian
>
> Either variant will be correctly built and have all available
> capabilities.  In other words, you do not need to locally rebuild R
> (but are of course free to do so if have a good reason).
>
> Also note that there is the r-sig-debian list for questions on R and
> Debian/Ubunut.
>
> Dirk  
>
> --
> Three out of two people have difficulties with fractions.
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

--
Three out of two people have difficulties with fractions.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.