Hi Jovyans
,
Issue
It seems like there is a way to config jupyter_collaboration
in jupyter_lab_config.py
, but it doesn’t really work for me:
## To enable real-time collaboration, you must install the extension `jupyter_collaboration`.
# You can install it using pip for example:
#
# python -m pip install jupyter_collaboration
#
# This flag is now deprecated and will be removed in JupyterLab v5.
# Default: False
# c.LabApp.collaborative = False
The genrated config says this is deprecated and will be removed, then what is the right way to disable this extension?
Environment
jupyterlab Version 4.0.5
jupyter_collaboration Version 1.1.0
command to start server: jupyter lab # collaboration extension enabled by default without the --collaborative flag
Different Experiments
c.LabApp.collaborative = False # doesn't work
c.ServerApp.jpserver_extension = {"jupyter_collaboration": False}
# disabled the extension loading from the server log, but RTC still enabled when I open jupyter lab
Found this in here
c.Collaboration.disable_rtc = True # doesn't work
Expected Behavior
I want to be able to install this extension and also enable/disable this extension.
I think that the intent was to simplify setup for JupyterLab 4.0 so RTC is either installed and automatically enabled or uninstalled.
If you really need to have it installed but disabled you could keep doing (2) and on top of that disable the frontend extension:
jupyter labextension disable @jupyter/collaboration-extension
2 Likes
Hi!
Thanks for answering!
I guess there is definitely a reason why you changed it that way, but please consider a case that I’m going to deploy a jupyterhub which serves multiple groups of users using jupyterlab and I wish to have an easy config for me as an ServerAdmin to enable/disable the RTC extension in different jupyterhub profiles, of course at the meantime, also allowing the users to enable/disable the extension as you mentioned above.
So I’d suggest add an ExtensionApp setting performs just like the deprecated LabApp.collaborative, and set it default as True.
Thanks for explaining the rationale. Would you mind opening an issue in GitHub - jupyterlab/jupyter-collaboration: A Jupyter Server Extension Providing Support for Y Documents highlighting your suggestion to maintainers of the collaborate extension?
1 Like
Thanks! I’ve made this issue
1 Like
Thanks for answering @krassowski!
As Michał explained above, we removed the flag to simplify the setup and remove RTC-related code from JupyterLab. Nevertheless, we realized there are some people who need this flag to easily enable/disable RTC when spawning a server from JupyterHub, so we decided to add it back. The new flag has a different name to distinguish it from the previous one because the default behavior changed.
You can disable RTC with the following flag: --YDocExtension.disable_rtc=True
2 Likes
Thansk @hbcarlos !! This is exactly what I want, I’m able to disable the RTC by jupyter lab --YDocExtension.disable_rtc=True
.
P.S. For future Jovyans, this only disables YDocExtension’s RTC feature, you can still see multiple online collaborator, which is fine for my case.
A follow-up question, is it possible to config this through jupyter_server_config.py or jupyter_lab_config.py instead of a flag?
Per the documentation:
--YDocExtension.disable_rtc=True
is the same as…
# jupyter_server_config.json
{"YDocExtension": {"disable_rtc": true}}
or …
# jupyter_server_config.py
c.YDocExtension.disable_rtc = True
3 Likes
Uh, thanks! It makes sense now, I was trying this in the jupyter_lab_config.py
.
A follow-up question: is it possible the toggle RTC from within the UI?
With RTC enabled, one cannot use the Open as...
options to switch to Notebook
or nbclassic
views - and it would be nice to not to have two offerings… identical other than one offers RTC and the other doesn’t
A follow-up question: is it possible the toggle RTC from within the UI?
In JupyterLab 4.1 (and maybe also Notebook 7.1 but I have not tested it) you can disable individual plugins from the UI. You would go to Settings → Settings Editor → Plugin Manager (on the toolbar).
With RTC enabled, one cannot use the Open as...
options to switch to Notebook
or nbclassic
views - and it would be nice to not to have two offerings… identical other than one offers RTC and the other doesn’t
Do you mean there is no button on the toolbar, or that it does not work? I don’t see a reason it would not be possible.