Skip to content

update.packages forces Tcl/Tk interface despite ask=TRUE if the DISPLAY environment variable is set (PR#8115)

2 messages · Robert King, Peter Dalgaard

#
Full_Name: Robert King
Version: 2.1.1
OS: Linux (debian stable, with backport R)
Submission from: (NULL) (142.58.147.28)


update.packages documentation (and code, from what I can make out) says:

     ask: logical indicating whether to ask user before packages are
          actually downloaded and installed, or the character string
          '"graphics"', which brings up a widget to allow the user to
          (de-)select from the list of packages which could be updated.
           The latter only works on systems with a GUI version of
          'select.list', and is otherwise equivalent to 'ask = TRUE'.

But, if I try ask=TRUE, it tries loading the Tcl/Tk interface (which I found out
because I'm doing this remotely and it crashed.
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... Error in fun(...) : Tcl already loaded
Error: .onLoad failed in 'loadNamespace' for 'tcltk'

On the other hand, if I log out and ssh back with X forwarding turned off, it
does the right thing,
#
robert.king at newcastle.edu.au writes:
This is unrelated to ask=TRUE. It is during the choice of CRAN site
that R is trying to fire up a Tk listbox (it might be debated whether
this is a good idea, but it _is_ intentional). If you set the
repository yourself, this won't happen.

The error looks a bit odd though. The logic is supposed to be that
either you have Tcl/Tk capabilities and you get the popup, or you
don't and get a text menu.

So something appears not right with your Tcl/Tk configuration.