# Running Slicer in a web browser via Amazon AppStreams

**URL:** <https://discourse.slicer.org/t/running-slicer-in-a-web-browser-via-amazon-appstreams/21431>\
**Category:** Support\
**Tags:** web, cloud\
**Created:** [January 13, 2022, 1:21am UTC](https://discourse.slicer.org/t/running-slicer-in-a-web-browser-via-amazon-appstreams/21431 "2022-01-13T01:21:25Z")\
**Posts on this page:** 7\
**Page:** 1

<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:** [January 13, 2022, 1:21am UTC](https://discourse.slicer.org/t/running-slicer-in-a-web-browser-via-amazon-appstreams/21431/1 "2022-01-13T01:21:25Z")

</div>

At today’s MONAILabel workshop 100+ people could see how amazingly well Slicer works in a web browser using Amazon AppStream. For those who missed, here is a short demo:

[![](https://img.youtube.com/vi/u3t5twSV6NE/maxresdefault.jpg "3D Slicer in a web browser - using Amazon AppStream") ](https://www.youtube.com/watch?v=u3t5twSV6NE)

Questions are already coming in if this is generally available and about how this can be set up. @pieper can you answer this question or ask someone from AWS to answer here?

---

<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:** [January 13, 2022, 4:28pm UTC](https://discourse.slicer.org/t/running-slicer-in-a-web-browser-via-amazon-appstreams/21431/2 "2022-01-13T16:28:26Z")

</div>

That’s an excellent demo video @lassoan, thanks!

Yes, this is all just off-the-shelf [AWS AppStream 2.0](https://aws.amazon.com/appstream2/) and the regular Slicer build. Qing Liu from AWS and I have been testing this out for a while and have been planning to make a Slicer-specific blog post to explain the details. Yesterday was the first time I had seen it scaling it up to so many users.

---

<div class="post-metadata">

**Author:** ![Ross\_Mitchell](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ross_mitchell/32/18076_2.png) [@Ross\_Mitchell](https://discourse.slicer.org/u/Ross_Mitchell)\
**Post date:** [March 30, 2023, 4:04am UTC](https://discourse.slicer.org/t/running-slicer-in-a-web-browser-via-amazon-appstreams/21431/3 "2023-03-30T04:04:47Z")

</div>

**Get Slicer Running on AWS AppStream 2.0 Under Amazon Linux**

Further to this thread… I spent quite a bit of time over the last several days figuring out how to get Slicer running on AWS AppStream 2.0 on an _Amazon Linux_ instance (versus a Windows instance). I thought I’d post my solution here to help any others who might be interested in doing this.

1. First, create an AppStream Image Builder instance. (If you need more details ping me, or post here. There are lots of instructions online). In my AWS zone (Canada Central), I had to opt for a stream.graphics-pro.4xlarge instance. [Pricing info](https://aws.amazon.com/appstream2/pricing/). (Make sure you check the “Internet Access” box in the Networking config panel to give your instance access to the internet). Launch this instance.

2. Next, [install the Chromium Browser](https://stackoverflow.com/questions/48480143/installing-chromium-on-amazon-linux) on your instance

3. Use the browser to [download](https://download.slicer.org/) the Slicer install package (.tar.gz). As of this writing that file is ‘Slicer-5.2.2-linux-amd64.tar.gz’ (you could also use wget or curl to download the file directly from the command line, and skip the browser install if you want)

4. Unpack this file eg: “tar xzvf Slicer-5.2.2-linux-amd64.tar.gz”. This will create a directory called ‘Slicer-5.2.2-linux-amd64’ with Slicer inside it. I’ll assume this in in your home folder.

5. Install the missing libraries Slicer needs to run:

That should do it. You should now be able to launch Slicer on your ImageBuilder instance:

- ~/Slicer-5.2.2-linux-amd64/Slicer

I hope this helps!

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [March 30, 2023, 4:22am UTC](https://discourse.slicer.org/t/running-slicer-in-a-web-browser-via-amazon-appstreams/21431/4 "2023-03-30T04:22:48Z")

</div>

Thanks for taking the time to write a detailed summary 🙏

> [@Ross\_Mitchell](#):
>
> sudo yum install -y […] qt5-qtbase

Since we bundled qt libraries, do you know which Qt library or plugin was missing ? I would like to understand if there is anything we would need to fix on the packaging side.

---

<div class="post-metadata">

**Author:** ![Ross\_Mitchell](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ross_mitchell/32/18076_2.png) [@Ross\_Mitchell](https://discourse.slicer.org/u/Ross_Mitchell)\
**Post date:** [April 4, 2023, 6:40pm UTC](https://discourse.slicer.org/t/running-slicer-in-a-web-browser-via-amazon-appstreams/21431/5 "2023-04-04T18:40:40Z")

</div>

Hello Jean:

I initially got the following error when launching Slicer on Amazon Linux:

> 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: xcb.

The key to finding the problems was to set the Qt debug environment variable:

- export QT\_DEBUG\_PLUGINS=1

Then, launching Slicer produced Qt debug messages. These revealed that there were errors loading a library called “libqxcb.so"

This library is part of the Slicer build, and is located in "lib/QtPlugins/platforms” inside the Slicer install dir.

Next, I checked what dependencies this library had by executing the following from the Slicer install dir:

- ldd ./lib/QtPlugins/platforms/libqxcb.so

This produced a lot of output. I’ve edited this to show only the missing dependencies…

libQt5XcbQpa.so.5 =\> not found  
libQt5Gui.so.5 =\> not found  
libQt5DBus.so.5 =\> not found  
libQt5Core.so.5 =\> not found  
libxcb-icccm.so.4 =\> not found  
libxcb-image.so.0 =\> not found  
libxcb-keysyms.so.1 =\> not found  
libxcb-render-util.so.0 =\> not found

So, I then installed these missing dependencies:

- sudo yum install xcb-util-keysyms
- sudo yum install xcb-util-renderutil
- sudo yum install xcb-util-wm
- sudo yum install xcb-util-image
- sudo yum install qt5-qtbase

This allowed Slicer to launch and run!

I hope this helps.

---

<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:** [April 4, 2023, 7:48pm UTC](https://discourse.slicer.org/t/running-slicer-in-a-web-browser-via-amazon-appstreams/21431/6 "2023-04-04T19:48:38Z")

</div>

Thanks a lot, these are all very useful information and they make sense. The only thing that I don’t understand is why `qt5-qtbase` was needed.

Can you verify that everything works well without installing `qt5-qtbase`? (or if not, what is missing)

---

<div class="post-metadata">

**Author:** ![Kening\_Zhang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kening_zhang/32/65641_2.png) [@Kening\_Zhang](https://discourse.slicer.org/u/Kening_Zhang)\
**Post date:** [December 10, 2023, 7:00am UTC](https://discourse.slicer.org/t/running-slicer-in-a-web-browser-via-amazon-appstreams/21431/7 "2023-12-10T07:00:33Z")

</div>

I want to know how can I get Slicer in AppStreams, since I only see limited apps for chosen and there is no 3D Slicer now.
