On Ubuntu 22.04, it is not possible to install extensions using either stable or preview build

Problem report for Slicer 5.0.2 linux-amd64: [please describe expected and actual behavior]

Hello, I just installed 3D Slicer and am getting the following error. The main issue that I’m having is that I can’t download any extensions, and I can’t even see any that are available for download. I’m using Ubuntu 22.04 LTS Linux as my operating system. Thank you in advance for your support.

[DEBUG][Qt] 10.06.2022 23:34:02 [] (unknown:0) - Session start time .......: 2022-06-10 23:34:02
[DEBUG][Qt] 10.06.2022 23:34:02 [] (unknown:0) - Slicer version ...........: 5.0.2 (revision 30822 / a4420c3) linux-amd64 - installed release
[DEBUG][Qt] 10.06.2022 23:34:02 [] (unknown:0) - Operating system .........: Linux / 5.15.0-37-generic / #39-Ubuntu SMP Wed Jun 1 19:16:45 UTC 2022 / UTF-8 - 64-bit
[DEBUG][Qt] 10.06.2022 23:34:02 [] (unknown:0) - Memory ...................: 31790 MB physical, 2047 MB virtual
[DEBUG][Qt] 10.06.2022 23:34:02 [] (unknown:0) - CPU ......................: GenuineIntel 12th Gen Intel(R) Core(TM) i7-12700H, 14 cores, 20 logical processors
[DEBUG][Qt] 10.06.2022 23:34:02 [] (unknown:0) - VTK configuration ........: OpenGL2 rendering, Sequential threading
[DEBUG][Qt] 10.06.2022 23:34:02 [] (unknown:0) - Qt configuration .........: version 5.15.2, with SSL, requested OpenGL 3.2 (core profile)
[DEBUG][Qt] 10.06.2022 23:34:02 [] (unknown:0) - Internationalization .....: disabled, language=
[DEBUG][Qt] 10.06.2022 23:34:02 [] (unknown:0) - Developer mode ...........: disabled
[DEBUG][Qt] 10.06.2022 23:34:02 [] (unknown:0) - Application path .........: /home/michel_atieh/Slicer-5.0.2-linux-amd64/bin
[DEBUG][Qt] 10.06.2022 23:34:02 [] (unknown:0) - Additional module paths ..: (none)
[DEBUG][Python] 10.06.2022 23:34:06 [Python] (/home/michel_atieh/Slicer-5.0.2-linux-amd64/lib/Slicer-5.0/qt-scripted-modules/SubjectHierarchyPlugins/AbstractScriptedSubjectHierarchyPlugin.py:38) - Scripted subject hierarchy plugin registered: Annotations
[DEBUG][Python] 10.06.2022 23:34:07 [Python] (/home/michel_atieh/Slicer-5.0.2-linux-amd64/lib/Slicer-5.0/qt-scripted-modules/SubjectHierarchyPlugins/AbstractScriptedSubjectHierarchyPlugin.py:38) - Scripted subject hierarchy plugin registered: SegmentEditor
[DEBUG][Python] 10.06.2022 23:34:07 [Python] (/home/michel_atieh/Slicer-5.0.2-linux-amd64/lib/Slicer-5.0/qt-scripted-modules/SubjectHierarchyPlugins/AbstractScriptedSubjectHierarchyPlugin.py:38) - Scripted subject hierarchy plugin registered: SegmentStatistics
[DEBUG][Qt] 10.06.2022 23:34:07 [] (unknown:0) - Switch to module:  "Welcome"
[WARNING][Qt] 10.06.2022 23:34:11 [] (unknown:0) - An OpenGL Core Profile was requested, but it is not supported on the current platform. Falling back to a non-Core profile. Note that this might cause rendering issues.

bug

Thanks for the report :pray:

Waiting this is addressed, you should be able to download the extension archive from https://extensions.slicer.org/catalog/All/30822/linux and install the extension package from file

I was able to reproduce this using the following steps:

1 Like

Reading the section Extensions Manager / Troubleshooting / Extensions manager does not show any extensions, and trying to execute Slicer after setting the environment variable QTWEBENGINE_DISABLE_SANDBOX, I was able to install extensions.

QTWEBENGINE_DISABLE_SANDBOX=1 ./Slicer-5.0.2-linux-amd64/Slicer

or

export QTWEBENGINE_DISABLE_SANDBOX=1
./Slicer-5.0.2-linux-amd64/Slicer

@Michel_Atieh Could you try this approach and report back ?

To make the change permanent to your install of Slicer, consider editing

/Slicer-5.0.2-linux-amd64/bin/SlicerLauncherSettings.ini

and adding the environment variable to the [EnvironmentVariables] section.

[EnvironmentVariables]
SLICER_HOME=<APPLAUNCHER_SETTINGS_DIR>/..
ITK_AUTOLOAD_PATH=<APPLAUNCHER_SETTINGS_DIR>/../lib/Slicer-5.0/ITKFactories
PIP_REQUIRE_VIRTUALENV=0
SSL_CERT_FILE=<APPLAUNCHER_SETTINGS_DIR>/../share/Slicer-5.0/Slicer.crt
PYTHONHOME=<APPLAUNCHER_SETTINGS_DIR>/../lib/Python
PYTHONNOUSERSITE=1
+QTWEBENGINE_DISABLE_SANDBOX=1

[QT_PLUGIN_PATH]
1\path=<APPLAUNCHER_SETTINGS_DIR>/../lib/QtPlugins
size=1
2 Likes

Hello Jean Christophe,
Thank you very much for your fast response.
I believe your explanation is a little complex for me; could you please simplify it? if possible, write me the steps with what to write, and where to write it.
If you think I’m asking too much, I understand; just let me know when the next stable version of 3D Slicer with this bug fixed is available, and I’ll continue to use 3D Slicer on Windows in the meantime.
Thank you again.

I believe @jcfr meant that you need to set an environment variable before you run Slicer. You can either edit the SlicerLauncherSettings.ini file as described above or type this into the shell to start Slicer:

export QTWEBENGINE_DISABLE_SANDBOX=1
./Slicer

There is such enormous variability across different linux systems and therefore so many potential compatibility issues that users must be experienced in administering their own system, installing various packages, configuring them, adjusting system settings, environment variables, building components from source code, etc. If you are not comfortable learning all these then you might consider using Windows or macOS operating system instead, which do not have such incompatibility issues.

1 Like

Hello Andras, the problem was resolved when I wrote this command
export QTWEBENGINE_DISABLE_SANDBOX=1
./Slicer

I appreciate your response.
Is it something that could be fixed for all users, or is it something particular to my case?

The problem may be that you are logged in as a root user (because Chromium does not support sandboxing for root users).

We could disable sandboxing for everyone, which would solve this issue, but that would make the system slightly more vulnerable to malicious websites. Since the browser only opens extensions.slicer.org site, the chance of getting malicious content is very low. Probably the highest risk (but overall still very low risk) is displaying the extension logo images, which are downloaded from external URLs.

@jcfr what do you think? Should we disable the sandbox? Or could we somehow detect this issue and ask permission from the user to disable the sandbox?

Security is good even if sometimes inconvenient

Giving the user the option after explaining seems to me like a good way to go

2 Likes

Thank you this helped solve the issue in my Ubuntu 22.10 install of Slicer 5.2.1.
I was able to edit the .ini file as instructed and now the extension manager is showing extensions correctly.

It is worth mentioning that this issue was recently solved by adding QTWEBENGINE_DISABLE_SANDBOX=1 to the Slicer environment on GNU/Linux (available now on preview release)

2 Likes