Can't see GUI in Ubuntu
egarza opened this issue · 27 comments
I have Linux Ubuntu 16.04 LTS Xenial. It seems I cannot get the GUI even with the instructions given. Any help is appreciated.
Here is the code and the error:
sudo docker run -i --rm --privileged -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /tmp:/scratch -v /media/egarza/INP_MRI_Backup/projects/INP/addimex_tms/data/mri/nifti:/bids_dataset -v /media/egarza/INP_MRI_Backup/projects/INP/addimex_tms/data/mri/outputs:/outputs bids/cpac /bids_dataset /outputs GUI No protocol specified Namespace(analysis_level='GUI', aws_input_creds=None, aws_output_creds=None, bids_dir='/bids_dataset', data_config_file=None, mem_gb=None, mem_mb=None, n_cpus='1', output_dir='/outputs', participant_label=None, participant_ndx=None, pipeline_file='/cpac_resources/default_pipeline.yaml', save_working_dir=False) Starting CPAC GUI Unable to access the X Display, is $DISPLAY set properly?
No problem, sir. I tried several fixes such as [this] (http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/), but no luck.
Thanks
Ed
I did that already, then tried to import the docker2singularity cpac with no luck. I get an error. Let me paste that error.
Is there a way to setup cpac from singularity instead of using the converter?
sudo docker run --privileged -ti --rm -v /var/run/docker.sock:/var/run/docke
r.sock -v /home/egarza/MRI/apps/singularity_images:/output singularityware/docker2singularity bids/cpac
Size: 5533 MB for the singularity container
(1/9) Creating an empty image...
Creating a sparse image with a maximum size of 5533MiB...
Using given image size of 5533
Formatting image (/sbin/mkfs.ext3)
Done. Image can be found at: /tmp/bids_cpac-2017-03-29-71120146c4f4.img
(2/9) Importing filesystem...
(3/9) Bootstrapping...
(4/9) Adding run script...
(5/9) Setting ENV variables...
Singularity: sexec (U=0,P=146)> Command=exec, Container=/tmp/bids_cpac-2017-03-29-71120146c4f4.img, CWD=/, Arg1=/bin/sh
(6/9) Adding mount points...
Singularity: sexec (U=0,P=152)> Command=exec, Container=/tmp/bids_cpac-2017-03-29-71120146c4f4.img, CWD=/, Arg1=/bin/sh
(7/9) Fixing permissions...
Singularity: sexec (U=0,P=158)> Command=exec, Container=/tmp/bids_cpac-2017-03-29-71120146c4f4.img, CWD=/, Arg1=/bin/sh
We're running on BusyBox/Buildroot
Singularity: sexec (U=0,P=201)> Command=exec, Container=/tmp/bids_cpac-2017-03-29-71120146c4f4.img, CWD=/, Arg1=/bin/sh
find: `/proc/2/task/2/fd/11': No such file or directory
find: `/proc/2/task/2/fd/11': No such file or directory
find: `/proc/2/task/2/fdinfo/11': No such file or directory
find: `/proc/2/task/2/fdinfo/11': No such file or directory
find: `/proc/2/fd/11': No such file or directory
find: `/proc/2/fd/11': No such file or directory
find: `/proc/2/fdinfo/11': No such file or directory
find: `/proc/2/fdinfo/11': No such file or directory
Cool, thanks.
As a follow-up, my student just installed bids/cpac in his Macbook Pro OSX El Capitan. We did all the instructions to get the Display, and we get the same error with Display.
Tried with singularity and GUI worked like a charm.
Now, I tried to make and save a subjects list and gave me the same error as with the full CPAC:
singularity run -B /home/egarza:/mnt -B /mnt:/scratch -B /media/egarza/INP_MRI_Backup/projects/INP/addimex_tms/data/mri/bids:/bids_dataset -B /media/egarza/INP_MRI_Backup/projects/INP/addimex_tms/data/mri/outputs:/output /home/egarza/MRI/apps/singularity_images/bids_cpac-2017-03-29-a12af7f5d881.img /bids_dataset /output GUI
Namespace(analysis_level='GUI', aws_input_creds=None, aws_output_creds=None, bids_dir='/bids_dataset', data_config_file=None, mem_gb=None, mem_mb=None, n_cpus='1', output_dir='/output', participant_label=None, participant_ndx=None, pipeline_file='/cpac_resources/default_pipeline.yaml', save_working_dir=False)
Starting CPAC GUI
Gtk-Message: Failed to load module "gail"
Gtk-Message: Failed to load module "atk-bridge"
Gtk-Message: Failed to load module "unity-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
(run.py:30602): Gtk-WARNING **: Unable to find default local file monitor type
(run.py:30602): Gtk-WARNING **: Unable to find default local file monitor type
saving /media/egarza/INP_MRI_Backup/projects/INP/addimex_tms/data/mri/data_config_addimex_tms.yaml
Gathering anatomical files...
2017-08-01 13:39:46,657 : Found 19 files!
170801-13:39:46,657 sublist_builder INFO:
Found 19 files!
Gathering functional files...
2017-08-01 13:39:46,658 : Found 17 files!
170801-13:39:46,658 sublist_builder INFO:
Found 17 files!
2017-08-01 13:39:46,658 : Filtering anatomical files...
170801-13:39:46,658 sublist_builder INFO:
Filtering anatomical files...
2017-08-01 13:39:46,658 : Not filtering out any potential sites...
170801-13:39:46,658 sublist_builder INFO:
Not filtering out any potential sites...
2017-08-01 13:39:46,658 : Filtered down to 19 files
170801-13:39:46,658 sublist_builder INFO:
Filtered down to 19 files
Filtered down to 19 anatomical files
2017-08-01 13:39:46,658 : Not filtering out any potential sites...
170801-13:39:46,658 sublist_builder INFO:
Not filtering out any potential sites...
2017-08-01 13:39:46,658 : Filtered down to 17 files
170801-13:39:46,658 sublist_builder INFO:
Filtered down to 17 files
(run.py:30602): Gtk-WARNING **: Unable to find default local file monitor type
Error importing CPAC
cannot import name fsopendir
Is there a conflict between cpacs?
Thanks
Ed
Still can't save the data nor pipeline files using the GUI with singularity. I opted for editing the regular pipeline, but it would greatly help our work if we could do it from the GUI at some point, specially for teaching reasons.
Thanks
Ed
I am having the same issue with an ubuntu machine (14.04.5 LTS). The issue being: "Unable to access the X Display, is $DISPLAY set properly?" Has there been any resolution to using docker?
Hi Cam,
We still get the same error with Docker. In different computers with Ubuntu.
Singularity works with the GUI but we are still unable to save the YML file.
I have the reverse problem. I can save the YAML file with singularity but when I try to run preprocessing, it doesn't do anything. Well it shows one line (below) but then nothing is run.
strategy_entries: [['_compcor_ncomponents_5_selector_pc10.linear0.wm0.global0.motion1.quadratic0.gm0.compcor1.csf0', '_target_angle_deg_90', '_threshold_0.2']]
But if I run with participant mode instead of GUI using the yaml files saved by the GUI, then it runs for me with singularity.
The one I made by converting the CPAC docker to singularity.
I was able to get the GUI to work using x11docker (https://github.com/mviereck/x11docker). Would you mind trying that? This sample worked for me: x11docker --bids/cpac /tmp /tmp GUI
I will look into this further. In the meantime, can you generate your data config file using the 'test_config' flag to the CPAC app? Also, you appear to be using an older version of CPAC (the logo is different), perhaps you could try with a newer version?
Everything works for me now in singularity. There was a path issue for the inputs that wasn't being displayed.
@czarrar would you please elaborate so that we can fix the error reporting in future versions?
When running in the 'participant' instead of 'GUI' option, I saw that I had improper BIDS paths that was causing an issue. In the 'GUI' setting, when I ran the analysis, it didn't show this error or any of the output that comes with CPAC. However, when I fixed the path issue, then going through the 'GUI' ran fine. Hope this helps.
I downloaded the latest bids/cpac. Now it does not give me the error, but it also does not Generate the Data Config file. And still, the CPAC looks as if it crashed but it is still responsive. Very strange.
I will use the test_config and see if I can save the pipeline. Thanks
Made Singularity GUI work using the instructions. Now I did not have a problem converting the docker image to singularity and it all opened fine. I do have a problem, but I made it another Issue. It may seem this new issue is similar to the Docker issue with x11docker as it has to do more with the Path Search.