Compare commits
20 Commits
Author | SHA1 | Date |
---|---|---|
bra1z | dd1c85d920 | |
bra1z | 416ae3c2d8 | |
bra1z | 9c197798cc | |
bra1z | 4b60360911 | |
bra1z | a9cfc5ab3f | |
bra1z | c7b34e30c2 | |
bra1z | bacd1d45ca | |
bra1z | 7c69bfc651 | |
bra1z | 07a2ec74b9 | |
bra1z | dbff85d918 | |
YuviPanda | b6dee24cff | |
YuviPanda | 18d7fb7b2a | |
YuviPanda | bda9a7ec21 | |
YuviPanda | 98b7723943 | |
YuviPanda | 360f9b04c5 | |
YuviPanda | 3ee7d7eb1d | |
Yuvi Panda | 81e224cfd8 | |
Ed Slavich | e3c31a919d | |
YuviPanda | bfa4a784fe | |
YuviPanda | 57d52f66a3 |
|
@ -0,0 +1,13 @@
|
|||
# 0.1.2
|
||||
|
||||
- Fix cross-origin issue in Safari (#9, thanks to @eslavich)
|
||||
|
||||
# 0.1.1
|
||||
|
||||
- Increase default resolution to 1680x1050. The wider screen
|
||||
matches how many user displays are, and there do not seem to
|
||||
be lag issues.
|
||||
|
||||
# 0.1
|
||||
|
||||
- Initial release
|
|
@ -1,6 +1,7 @@
|
|||
# Jupyter Desktop
|
||||
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/yuvipanda/jupyter-desktop/master?urlpath=desktop)
|
||||
# Jupyter Desktop Server with golang
|
||||
|
||||
Run XFCE on a JupyterHub.
|
||||
https://mybinder.org/v2/git/https%3A%2F%2Fgit.disroot.org%2Fbra1z%2Fjupyter-desktop-server-golang.git/master?urlpath=desktop
|
||||
|
||||
Run XFCE (or other desktop environments) on a JupyterHub.
|
||||
|
||||
This is based on https://github.com/ryanlovett/nbnovnc and a fork of https://github.com/manics/jupyter-omeroanalysis-desktop
|
||||
|
|
15
apt.txt
15
apt.txt
|
@ -1,8 +1,19 @@
|
|||
dbus-x11
|
||||
firefox
|
||||
xfce4
|
||||
xfce4-panel
|
||||
xfce4-session
|
||||
xfce4-settings
|
||||
xorg
|
||||
xubuntu-icon-theme
|
||||
gtk2-engines-murrine
|
||||
ttf-ubuntu-font-family
|
||||
mesa-utils
|
||||
libgl1-mesa-dri
|
||||
gtk2-engines-pixbuf
|
||||
gtk2-engines-murrine
|
||||
pinta
|
||||
dbus-x11
|
||||
x11-utils
|
||||
gcc
|
||||
libgl1-mesa-dev
|
||||
xorg-dev
|
||||
xubuntu-icon-theme
|
|
@ -3,5 +3,4 @@ channels:
|
|||
dependencies:
|
||||
- websockify
|
||||
- pip:
|
||||
- https://github.com/jupyterhub/jupyter-server-proxy/archive/0e67e1afd0bab1342443f13bd147a2f8c682e9e0.zip
|
||||
- .
|
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
import shlex
|
||||
import tempfile
|
||||
|
||||
|
||||
|
@ -9,6 +10,17 @@ def setup_desktop():
|
|||
# This is only readable, writeable & searchable by our uid
|
||||
sockets_dir = tempfile.mkdtemp()
|
||||
sockets_path = os.path.join(sockets_dir, 'vnc-socket')
|
||||
|
||||
vnc_command = ' '.join((shlex.quote(p) for p in [
|
||||
os.path.join(HERE, 'share/tigervnc/bin/vncserver'),
|
||||
'-verbose',
|
||||
'-xstartup', os.path.join(HERE, 'share/xstartup'),
|
||||
'-geometry', '1680x1050',
|
||||
'-SecurityTypes', 'None',
|
||||
'-rfbunixpath', sockets_path,
|
||||
'-fg',
|
||||
':1',
|
||||
]))
|
||||
return {
|
||||
'command': [
|
||||
'websockify', '-v',
|
||||
|
@ -17,14 +29,8 @@ def setup_desktop():
|
|||
'5901',
|
||||
'--unix-target', sockets_path,
|
||||
'--',
|
||||
os.path.join(HERE, 'share/tigervnc/bin/vncserver'),
|
||||
'-verbose',
|
||||
'-xstartup', os.path.join(HERE, 'share/xstartup'),
|
||||
'-geometry', '1024x768',
|
||||
'-SecurityTypes', 'None',
|
||||
'-rfbunixpath', sockets_path,
|
||||
'-fg',
|
||||
':1',
|
||||
'/bin/sh', '-c',
|
||||
f'cd {os.getcwd()} && {vnc_command}'
|
||||
],
|
||||
'port': 5901,
|
||||
'timeout': 30,
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
</script>
|
||||
|
||||
<!-- actual script modules -->
|
||||
<script type="module" crossorigin="anonymous">
|
||||
<script type="module" crossorigin="use-credentials">
|
||||
// RFB holds the API to connect and communicate with a VNC server
|
||||
import RFB from './core/rfb.js';
|
||||
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
GOVERS=1.13
|
||||
|
||||
mkdir -p \
|
||||
$HOME/.local/go/$GOVERS \
|
||||
$HOME/go
|
||||
|
||||
echo "::: install Go ${GOVERS}..."
|
||||
curl -O -L https://golang.org/dl/go${GOVERS}.linux-amd64.tar.gz
|
||||
tar -C $HOME/.local/go/$GOVERS -zxf go${GOVERS}.linux-amd64.tar.gz
|
||||
/bin/rm go${GOVERS}.linux-amd64.tar.gz
|
||||
|
||||
export GOROOT=$HOME/.local/go/$GOVERS/go
|
||||
export GOPATH=$HOME/go
|
||||
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
|
||||
|
||||
echo "::: installing neugram..."
|
||||
go get golang.org/x/tools/cmd/goimports
|
||||
go get neugram.io/ng/...
|
||||
echo "::: installing neugram... [done]"
|
||||
|
||||
## setup environment for Go
|
||||
|
||||
cat >> $HOME/.setup-go << EOF
|
||||
## setup Go
|
||||
export GOROOT=$GOROOT
|
||||
export GOPATH=$GOPATH
|
||||
export PATH=\$GOPATH/bin:\$GOROOT/bin:\$PATH
|
||||
EOF
|
||||
|
||||
cat >> $HOME/.bashrc << EOF
|
||||
. ~/.setup-go
|
||||
EOF
|
4
setup.py
4
setup.py
|
@ -4,13 +4,13 @@ from setuptools import setup, find_packages
|
|||
setup(
|
||||
name="jupyter-desktop-server",
|
||||
packages=find_packages(),
|
||||
version='0.1',
|
||||
version='0.1.2',
|
||||
entry_points={
|
||||
'jupyter_serverproxy_servers': [
|
||||
'desktop = jupyter_desktop:setup_desktop',
|
||||
]
|
||||
},
|
||||
install_requires=['jupyter-server-proxy'],
|
||||
install_requires=['jupyter-server-proxy>=1.2.0'],
|
||||
include_package_data=True,
|
||||
zip_safe=False
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue