Search code examples
ruser-interfacepopupx11cran

Disable/suppress tcltk popup for CRAN mirror selection in R


My question is similar to a question previously posted but never really answered here:

Disable GUI, graphics devices in R

I do not like the R tcltk popups for CRAN mirror selection. They also pop up to choose a package when searching for help on a function in two packages.

Is there any way to disable these windows without disabling X11 completely? I still want plot() commands to work as normal, but disable the little select menus that take forever to load over a remote connection.

For example, if you use ssh, but don't use -X, then the mirror select is just text within R, you type a number. It's fast. This is what I want, but maintaining X11 for plots b.

Anyone know how to maintain graphics windows but disable the "choice" tcltk windows?


Solution

  • Dirk provides ways to avoid the menus altogether, but to answer your question as posed, I think you want

    options(menu.graphics=FALSE)
    

    I tracked this option down by finding the class of objects returned from help (it's help_files_with_topic), scanning utils:::print.help_files_with_topic and finding the line

    menu(txt, title = gettext("Choose one"), graphics = getOption("menu.graphics"))