{"action":"created","issue":{"url":"https://api.github.com/repos/IRkernel/IRkernel/issues/388","repository_url":"https://api.github.com/repos/IRkernel/IRkernel","labels_url":"https://api.github.com/repos/IRkernel/IRkernel/issues/388/labels{/name}","comments_url":"https://api.github.com/repos/IRkernel/IRkernel/issues/388/comments","events_url":"https://api.github.com/repos/IRkernel/IRkernel/issues/388/events","html_url":"https://github.com/IRkernel/IRkernel/issues/388","id":168543768,"number":388,"title":"Dead kernel when running any R code, PNG and X11 related","user":{"login":"systemdown","id":420073,"avatar_url":"https://avatars.githubusercontent.com/u/420073?v=3","gravatar_id":"","url":"https://api.github.com/users/systemdown","html_url":"https://github.com/systemdown","followers_url":"https://api.github.com/users/systemdown/followers","following_url":"https://api.github.com/users/systemdown/following{/other_user}","gists_url":"https://api.github.com/users/systemdown/gists{/gist_id}","starred_url":"https://api.github.com/users/systemdown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systemdown/subscriptions","organizations_url":"https://api.github.com/users/systemdown/orgs","repos_url":"https://api.github.com/users/systemdown/repos","events_url":"https://api.github.com/users/systemdown/events{/privacy}","received_events_url":"https://api.github.com/users/systemdown/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/IRkernel/IRkernel/labels/tech%20support","name":"tech support","color":"eeeeee"},{"url":"https://api.github.com/repos/IRkernel/IRkernel/labels/upstream%20bug","name":"upstream bug","color":"e11d21"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-07-31T23:17:21Z","updated_at":"2016-08-02T23:26:35Z","closed_at":"2016-08-01T08:05:29Z","body":"Hi,\r\n\r\nI'm not sure this is a bug but maybe just some clarification or a workaround required.\r\n\r\nSeems related to Issue #386 \r\n\r\nWhen attempting to execute any R code (not even graphics related, just something like \"`a <- 1`\" will do it), the kernel dies.\r\n\r\nError output:\r\n```\r\nError in .External2(C_X11, paste(\"png::\", filename, sep = \"\"), g$width,  :\r\n  unable to start device PNG\r\nCalls: <Anonymous> ... evaluate -> dev.new -> do.call -> <Anonymous> -> ok_device\r\nIn addition: Warning message:\r\nIn ok_device(filename, ...) : unable to open connection to X11 display ''\r\nExecution halted\r\n```\r\n\r\nMy R capabilities:\r\n\r\n```\r\n       jpeg         png        tiff       tcltk         X11        aqua\r\n       TRUE        TRUE       FALSE       FALSE       FALSE       FALSE\r\n   http/ftp     sockets      libxml        fifo      cledit       iconv\r\n       TRUE        TRUE        TRUE        TRUE        TRUE        TRUE\r\n        NLS     profmem       cairo         ICU long.double     libcurl\r\n       TRUE       FALSE        TRUE       FALSE        TRUE       FALSE\r\n```\r\n\r\nI'm running on a headless Centos 6.7 server.  R was configured with X11 support but capabilities() says it's FALSE because a graphics device is not found.\r\n\r\nHowever I have both PNG and Cairo support enabled, I'm wondering if \"Cairo\" is supposed to be preferenced over PNG?\r\n\r\nI installed IRkernel from Github yesterday July 31st.\r\n\r\n```\r\n> sessionInfo()\r\nR version 3.2.2 (2015-08-14)\r\nPlatform: x86_64-pc-linux-gnu (64-bit)\r\nRunning under: CentOS release 6.7 (Final)\r\n\r\nlocale:\r\n [1] LC_CTYPE=en_AU.UTF-8       LC_NUMERIC=C\r\n [3] LC_TIME=en_AU.UTF-8        LC_COLLATE=en_AU.UTF-8\r\n [5] LC_MONETARY=en_AU.UTF-8    LC_MESSAGES=en_AU.UTF-8\r\n [7] LC_PAPER=en_AU.UTF-8       LC_NAME=C\r\n [9] LC_ADDRESS=C               LC_TELEPHONE=C\r\n[11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C\r\n\r\nattached base packages:\r\n[1] stats     graphics  grDevices utils     datasets  methods   base\r\n\r\nother attached packages:\r\n[1] IRkernel_0.6\r\n\r\nloaded via a namespace (and not attached):\r\n [1] R6_2.1.2        magrittr_1.5    IRdisplay_0.4.3 pbdZMQ_0.2-3\r\n [5] tools_3.2.2     uuid_0.1-2      stringi_1.0-1   jsonlite_1.0\r\n```\r\n\r\nIf this isn't a bug, my intention is to run an \"xvfb\" server to enable an X11 graphics device and see if that resolves the issue but I'd rather try to make it work without resorting to that.\r\n\r\nAny help/info appreciated."},"comment":{"url":"https://api.github.com/repos/IRkernel/IRkernel/issues/comments/237080809","html_url":"https://github.com/IRkernel/IRkernel/issues/388#issuecomment-237080809","issue_url":"https://api.github.com/repos/IRkernel/IRkernel/issues/388","id":237080809,"user":{"login":"systemdown","id":420073,"avatar_url":"https://avatars.githubusercontent.com/u/420073?v=3","gravatar_id":"","url":"https://api.github.com/users/systemdown","html_url":"https://github.com/systemdown","followers_url":"https://api.github.com/users/systemdown/followers","following_url":"https://api.github.com/users/systemdown/following{/other_user}","gists_url":"https://api.github.com/users/systemdown/gists{/gist_id}","starred_url":"https://api.github.com/users/systemdown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systemdown/subscriptions","organizations_url":"https://api.github.com/users/systemdown/orgs","repos_url":"https://api.github.com/users/systemdown/repos","events_url":"https://api.github.com/users/systemdown/events{/privacy}","received_events_url":"https://api.github.com/users/systemdown/received_events","type":"User","site_admin":false},"created_at":"2016-08-02T23:26:35Z","updated_at":"2016-08-02T23:26:35Z","body":"You're right about still needing png() to work - I resolved my issue by setting ~/.Rprofile for \"root\" (Jupyterhub process user) as follows:\r\n\r\n```\r\n## Set default 'type' for png() calls - useful when X11 device is not available!\r\n## NOTE: Needs 'cairo' capability\r\noptions(bitmapType='cairo')\r\n```\r\n\r\nCheers!"}}
{"actor":{"display_login":"systemdown"}}