为jlab的novnc
项目描述
jupyterlab-novnc
此软件包为JupyterLab添加了novnc查看器。这是一个简单的扩展,仅在iframe中运行noVNC。
您可以在设置面板中配置noVNC连接。您可能需要至少配置host
和port
。此外,您还可以添加一个名称到您的连接,以便更容易找到。
此扩展由一个名为jupyterlab-novnc
的Python包(用于服务器扩展)和一个名为jupyterlab-novnc
的NPM包(用于前端扩展)组成。
设置
您需要打开JupyterLab的高级设置菜单并配置jupyterlab-novnc。将所需配置作为列表添加到“configured_endpoints”设置中。
配置完成后,每个配置端点将有一个图标
您也可以从命令面板中打开noVNC面板。
例如
{
"configured_endpoints": [
{
"name": "Robot",
"host": "localhost",
"port": 6080,
"resize": "scale",
"password": "mycrazycomplicatedpassword"
},
{
...
}
}
每个项目的允许设置值
{
name: string; // optional name, otherwise host is used
// autoconnect - Automatically connect as soon as the page has finished loading.
autoconnect: boolean;
// reconnect - If noVNC should automatically reconnect if the connection is dropped.
reconnect: boolean;
// reconnect_delay - How long to wait in milliseconds before attempting to reconnect.
reconnect_delay: number;
// host - The WebSocket host to connect to.
host: string;
// port - The WebSocket port to connect to.
port: number;
// encrypt - If TLS should be used for the WebSocket connection.
encrypt?: boolean;
// path - The WebSocket path to use.
path?: string;
// password - The password sent to the server, if required.
password?: string;
// repeaterID - The repeater ID to use if a VNC repeater is detected.
repeaterID?: string;
// shared - If other VNC clients should be disconnected when noVNC connects.
shared?: boolean;
// bell - If the keyboard bell should be enabled or not.
bell?: boolean;
// view_only - If the remote session should be in non-interactive mode.
view_only?: boolean;
// view_clip - If the remote session should be clipped or use scrollbars if it cannot fit in the browser.
view_clip?: boolean;
// resize - How to resize the remote session if it is not the same size as the browser window. Can be one of off, scale and remote.
resize?: "off" | "scale" | "remote";
// quality - The session JPEG quality level. Can be 0 to 9.
quality?: number;
// compression - The session compression level. Can be 0 to 9.
compression?: number;
// show_dot - If a dot cursor should be shown when the remote server provides no local cursor, or provides a fully-transparent (invisible) cursor.
show_dot?: boolean;
// logging - The console log level. Can be one of error, warn, info or debug.
logging?: "error" | "warn" | "info" | "debug";
}
需求
- JupyterLab >= 3.0
安装
pip install jupyterlab-novnc
故障排除
如果您看到前端扩展,但它不起作用,请检查服务器扩展是否已启用
jupyter server extension list
如果服务器扩展已安装并启用,但您看不到前端扩展,请检查前端扩展是否已安装
jupyter labextension list
贡献
开发安装
注意:您将需要NodeJS来构建扩展包。
《jlpm》命令是JupyterLab预装版本的yarn,与JupyterLab一同安装。您可以在以下情况下使用yarn
或npm
代替jlpm
。
# Clone the repo to your local environment
# Change directory to the jupyterlab_novnc directory
# Install package in development mode
pip install -e .
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# If using a server extension, it must be manually installed in develop mode
jupyter server extension enable <extension_name>
# Rebuild extension Typescript source after making changes
jlpm run build
您可以在不同的终端中同时监视源目录并运行JupyterLab,以监视扩展源代码的变化并自动重新构建扩展。
# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm run watch
# Run JupyterLab in another terminal
jupyter lab
当监视命令运行时,每次保存的更改都会立即在本地构建并提供给正在运行的JupyterLab。刷新JupyterLab以在浏览器中加载更改(您可能需要等待几秒钟以重新构建扩展)。
默认情况下,jlpm run build
命令为该扩展生成源映射,以便更容易使用浏览器开发工具进行调试。要同时为JupyterLab核心扩展生成源映射,可以运行以下命令
jupyter lab build --minimize=False
卸载
pip uninstall jupyterlab_novnc
项目详情
关闭
jupyterlab-novnc-0.2.1.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | f12b22de609dd22668a642e6d0466e49023f1dba0f255bc47db967280e471230 |
|
MD5 | 148731d62acf63d20f1ddcce60221e3a |
|
BLAKE2b-256 | 0f0d39d4cc8f98219db65684298f74b7ee23a1def3e6f3e325c838a7be6685ec |
关闭
jupyterlab_novnc-0.2.1-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 21fe89883f310586cbe851c7728978af2490eac007ce4a77fcb13bb7716a3c55 |
|
MD5 | 7264fe0fbd99257e9ba9a9e35cf2acdd |
|
BLAKE2b-256 | 0ba6466310231f755a2be26e5adfc80a0b668818a193ee1d7fb1813f3ab6bee6 |