# Bundle file creation

**URL:** https://discourse.slicer.org/t/bundle-file-creation/573
**Category:** Support
**Created:** [June 26, 2017, 4:53pm UTC](https://discourse.slicer.org/t/bundle-file-creation/573 "2017-06-26T16:53:07Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Felix\_Navarro\_Guirad](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@Felix\_Navarro\_Guirad](https://discourse.slicer.org/u/Felix_Navarro_Guirad)
#### Post date: [June 26, 2017, 4:53pm UTC](https://discourse.slicer.org/t/bundle-file-creation/573/1 "2017-06-26T16:53:07Z")

</div>

Dear Slicer users,

I use Slicer CLI modules as pilar of a pipeline executed in a Ubuntu server from a web page located in an Apache Tomcat hosted by that server.

I would like to create a mrb file containing the scene to be used but when I invoke Slicer for this purpose I’m having a "SlicerApp-real: cannot connect to X server " message.

Is it possible to do this task without opening the GUI?

Thanks in advance.

PS: This is the sentence that I use:  
Slicer --no-splash --python-script [composeScene.py](http://composeScene.py) -i file1.nii … -i fileN.nii -o output.mrb \>\> scriptPython.log. The script just loads all the input files and set a few details about the window location which are not essential.

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [June 26, 2017, 5:07pm UTC](https://discourse.slicer.org/t/bundle-file-creation/573/2 "2017-06-26T17:07:57Z")

</div>

Try with adding --no-main-window parameter. You can also configure a dummy x server.

---

<div class="post-metadata">

### Author: ![Felix\_Navarro\_Guirad](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@Felix\_Navarro\_Guirad](https://discourse.slicer.org/u/Felix_Navarro_Guirad)
#### Post date: [June 26, 2017, 5:14pm UTC](https://discourse.slicer.org/t/bundle-file-creation/573/3 "2017-06-26T17:14:30Z")

</div>

Thank you @lassoan for your fast reply.

–no-main-window returns the same message. I’ll try to learn how to set up that dummy x server.

Thank you again, I’ll keep you informed about the result.

---

<div class="post-metadata">

### Author: ![ihnorton](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ihnorton/32/9_2.png) [@ihnorton](https://discourse.slicer.org/u/ihnorton)
#### Post date: [June 26, 2017, 5:31pm UTC](https://discourse.slicer.org/t/bundle-file-creation/573/4 "2017-06-26T17:31:14Z")

</div>

See

> [@Saving images from slicer views in headless compute node](https://discourse.slicer.org/t/saving-images-from-slicer-views-in-headless-compute-node/138):
>
> Hi Slicer community, I am trying to perform what I thought would be a straightforward task of loading a study into slicer and saving a few images from each of the viewing panes (red, yellow, green) into PNG or jpg files. My script is based off example code here: [https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Save\_a\_series\_of\_images\_from\_a\_Slice\_View](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Save_a_series_of_images_from_a_Slice_View) The script works when I call it from the Python Interactor window of an already launched Slicer application (in windows) usin…

---

<div class="post-metadata">

### Author: ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)
#### Post date: [June 26, 2017, 5:35pm UTC](https://discourse.slicer.org/t/bundle-file-creation/573/5 "2017-06-26T17:35:09Z")

</div>

This is a good place to start:

[https://xpra.org/trac/wiki/Xdummy](https://xpra.org/trac/wiki/Xdummy)

Here’s a docker container that sets it up the server as an example:

> **[pieper/SlicerDockers](https://github.com/pieper/SlicerDockers/tree/master/x11)**
>
> docker config files for slicer. Contribute to pieper/SlicerDockers development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![Felix\_Navarro\_Guirad](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@Felix\_Navarro\_Guirad](https://discourse.slicer.org/u/Felix_Navarro_Guirad)
#### Post date: [June 27, 2017, 4:47pm UTC](https://discourse.slicer.org/t/bundle-file-creation/573/6 "2017-06-27T16:47:48Z")

</div>

Thank you @ihnorton and @pieper for your kind replies.

I solved the problem installing xvfb package. I just need to run Slicer this way:  
xvfb-run -s “-screen 0 1024x768x24” Slicer …

xvfb-run sets the dummy X server, redirects the graphical output to it and closes it when slicer is close.

Thanks for your support.

---

<div class="post-metadata">

### Author: ![Mohammed\_Abdelaziz](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mohammed_abdelaziz/32/6533_2.png) [@Mohammed\_Abdelaziz](https://discourse.slicer.org/u/Mohammed_Abdelaziz)
#### Post date: [April 10, 2020, 1:30pm UTC](https://discourse.slicer.org/t/bundle-file-creation/573/7 "2020-04-10T13:30:01Z")

</div>

Hi Felix

i have the same pb with google clooud  
did you just intall xvfb  
whats the whole command used to run slicer  
xvfb-run -s “-screen 0 1024x768x24” Slicer
