Closed hegde00 closed 3 years ago
This is a rstudio and qt issue really. Try enabling the qt debug mode get the list of missing libraries and install them. For a similar problem see https://discourse.slicer.org/t/cant-start-latest-stable-on-ubuntu-20-04/14029
But in the end until wsl group integrates x (and there are rumors they are working on it) rstudio server is a better solution.
You can also use rstudio gui on windows and set the terminal to wsl and send your R commands to terminal window (as oppose to console). However plots and other things that require communication with rstudio won't work this way
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: hegde00 @.> Sent: Saturday, March 13, 2021 6:49:53 AM To: ANTsX/ANTsR @.> Cc: Subscribed @.***> Subject: [ANTsX/ANTsR] Problem starting Rstudio in Ubuntu 20.04 LTS (#345)
Hello,
I had previously successfully installed ANTsR on WSL1 and Ubuntu 18.04 LTS in March 2020.
Now I've been trying to update my ANTsR installation using the updated instructions in https://github.com/ANTsX/ANTsR/wiki/Installing-ANTsR-on-Windows-10-(using-WSL2)https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FANTsX%2FANTsR%2Fwiki%2FInstalling-ANTsR-on-Windows-10-(using-WSL2)&data=04%7C01%7C%7Ccc6d5e8ad6074d49727208d8e62f43ab%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637512437957317276%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=jrXUeM3SIPflstDrhv%2BiS%2FeA9c1JRUJNfRnLLhGWJtQ%3D&reserved=0.
I updated my Windows 10 Home, so that it's now Version 20HR (OS Build 19042.867). I then followed the rest of the instructions step by step (including the "Get MobaXterm (optional)" step), and everything worked without any errors (or even warnings, as far as I can tell) until the step entitled "Install RStudio (optional)".
The RStudio installation itself went fine, without any errors or warnings. But then when I try to run RStudio from the command line, I get the following printout after a while (nothing else happens -- no RStudio window appears):
jay@Crick:~$ rstudio qt.qpa.xcb: could not connect to display 172.22.176.1:0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
Aborted jay@Crick:~$
Just out of curiosity, I ran the next step ("RStudio Server"). It ran fine, and RStudio starts and runs fine from my web browser.
I still would like to start RStudio from the Ubuntu command. How do I do that (i.e., how do I fix the above problem), please?
Thanks in advance, Jay
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FANTsX%2FANTsR%2Fissues%2F345&data=04%7C01%7C%7Ccc6d5e8ad6074d49727208d8e62f43ab%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637512437957327269%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Oy0J4o2htwzogGZsRrhlHnt1OO%2FZkarf7PWKdBNpEsA%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAFCMSFEDM3LW5FSA5YPZ3XTTDNUQDANCNFSM4ZD4OA3Q&data=04%7C01%7C%7Ccc6d5e8ad6074d49727208d8e62f43ab%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637512437957327269%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=MpZjgKtK7%2BYItOreFBGJyM3Yu%2BPUKuRpMbQPiqQiUlw%3D&reserved=0.
I don't use WSL2 frequently, but the only thing that caught my attention is qt.qpa.xcb: could not connect to display 172.22.176.1:0
. Is it only Rstudio not working or other graphic programs too. I think Ubuntu has a set of utilities, among which xeyes
which I used to test the X11 connection was working.
Btw, you are starting the WSL/Ubuntu termnal in MobaXterm, right? There is no X server in the regular Ubuntu app in Windows.
Btw, you are starting the WSL/Ubuntu termnal in MobaXterm, right? There is no X server in the regular Ubuntu app in Windows.
Actually, no I was running it from the WSL/Ubuntu terminal, because the instructions, said, "Now type rstudio in the Linux terminal....". So I assumed that meant Ubuntu terminal.
So I tried running it in MobaXterm, and IT WORKED! Thank you so much! (You folks might consider tweaking the instructions to clarify this.)
Thanks again!
I don't use WSL2 frequently, but the only thing that caught my attention is
qt.qpa.xcb: could not connect to display 172.22.176.1:0
. Is it only Rstudio not working or other graphic programs too. I think Ubuntu has a set of utilities, among whichxeyes
which I used to test the X11 connection was working.
Your next comment helped solve this problem for me. Please see below. And thank you for pointing out what I was doing wrong.
This is a rstudio and qt issue really. Try enabling the qt debug mode get the list of missing libraries and install them. For a similar problem see https://discourse.slicer.org/t/cant-start-latest-stable-on-ubuntu-20-04/14029 But in the end until wsl group integrates x (and there are rumors they are working on it) rstudio server is a better solution. You can also use rstudio gui on windows and set the terminal to wsl and send your R commands to terminal window (as oppose to console). However plots and other things that require communication with rstudio won't work this way.
Thank you very much for responding. Actually, dorianps' suggestion (that I should run RStudio from MobaXterm and not the native WSL/Ubuntu console; please see below) fixed the issue for me.
Thank you everyone!
Made a small change to the Wiki to clarify Rstudio must be called from MobaXterm. Closing the issue.
Hello,
I had previously successfully installed ANTsR on WSL1 and Ubuntu 18.04 LTS in March 2020.
Now I've been trying to update my ANTsR installation using the updated instructions in https://github.com/ANTsX/ANTsR/wiki/Installing-ANTsR-on-Windows-10-(using-WSL2).
I updated my Windows 10 Home, so that it's now Version 20HR (OS Build 19042.867). I then followed the rest of the instructions step by step (including the "Get MobaXterm (optional)" step), and everything worked without any errors (or even warnings, as far as I can tell) until the step entitled "Install RStudio (optional)".
The RStudio installation itself went fine, without any errors or warnings. But then when I try to run RStudio from the command line, I get the following printout after a while (nothing else happens -- no RStudio window appears):
jay@Crick:~$ rstudio qt.qpa.xcb: could not connect to display 172.22.176.1:0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
Aborted jay@Crick:~$
Restarting my machine does NOT help; the exact same thing happens.
Just out of curiosity, I ran the next step ("RStudio Server"). It ran fine, and RStudio starts and runs fine from my web browser.
I still would like to start RStudio from the Ubuntu command. How do I do that (i.e., how do I fix the above problem), please?
Thanks in advance, Jay