[R] Installing gWidgetsRGtk2: R session is headless

R rainer.schuermann at gmx.net
Thu Oct 23 11:40:23 CEST 2014


I have written some gWidgets scripts before in the past but have a different box now (Debian KWheezy) and cannot get gWidgets working. It may be an obvious mistake but auntie Google (who has helped me a lot to get as far as I am now) leaves me in the dark now.
Here is where I am stuck:
- - - - -
> library( gWidgets )
> library( gWidgetsRGtk2 )
Loading required package: RGtk2
No protocol specified
R session is headless; GTK+ not initialized.
>  obj <- gbutton("Hello world", container = gwindow())

(R:15675): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(R:15675): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(R:15675): Gtk-WARNING **: Screen for GtkWindow not set; you must always set
a screen for a GtkWindow before using the window

(R:15675): Gdk-CRITICAL **: IA__gdk_screen_get_default_colormap: assertion `GDK_IS_SCREEN (screen)' failed

(R:15675): Gdk-CRITICAL **: IA__gdk_colormap_get_visual: assertion `GDK_IS_COLORMAP (colormap)' failed

(R:15675): Gdk-CRITICAL **: IA__gdk_screen_get_default_colormap: assertion `GDK_IS_SCREEN (screen)' failed

(R:15675): Gdk-CRITICAL **: IA__gdk_screen_get_root_window: assertion `GDK_IS_SCREEN (screen)' failed

(R:15675): Gdk-CRITICAL **: IA__gdk_screen_get_root_window: assertion `GDK_IS_SCREEN (screen)' failed

(R:15675): Gdk-CRITICAL **: IA__gdk_window_new: assertion `GDK_IS_WINDOW (parent)' failed

 *** caught segfault ***
address 0x18, cause 'memory not mapped'

Traceback:
 1: .Call(name, ..., PACKAGE = PACKAGE)
 2: .RGtkCall("S_gtk_widget_show", object, PACKAGE = "RGtk2")
 3: method(obj, ...)
 4: window$Show()
 5: .gwindow(toolkit, title, visible, width, height, parent, handler,     action, ...)
 6: .gwindow(toolkit, title, visible, width, height, parent, handler,     action, ...)
 7: gwindow()
 8: .gbutton(toolkit, text, border, handler, action, container, ...)
 9: .gbutton(toolkit, text, border, handler, action, container, ...)
10: gbutton("Hello world", container = gwindow())


- - - - -
> sessionInfo()                                                                                                                                                                            
R version 3.1.1 (2014-07-10)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tools_3.1.1



More information about the R-help mailing list