Compare commits

...

20 Commits
v0.1 ... master

Author SHA1 Message Date
bra1z dd1c85d920 Update 'apt.txt' 2020-02-11 11:36:57 +00:00
bra1z 416ae3c2d8 Update 'apt.txt' 2020-02-11 10:57:24 +00:00
bra1z 9c197798cc Add 'postBuild' 2020-02-11 10:55:32 +00:00
bra1z 4b60360911 Update 'apt.txt' 2020-02-11 10:53:09 +00:00
bra1z a9cfc5ab3f Update 'apt.txt' 2020-02-11 10:45:10 +00:00
bra1z c7b34e30c2 Update 'README.md' 2020-02-11 09:54:13 +00:00
bra1z bacd1d45ca Update 'README.md' 2020-02-11 09:52:22 +00:00
bra1z 7c69bfc651 Update 'README.md' 2020-02-11 09:50:05 +00:00
bra1z 07a2ec74b9 Update 'README.md' 2020-02-11 09:48:34 +00:00
bra1z dbff85d918 Update 'apt.txt' 2020-02-11 09:47:18 +00:00
YuviPanda b6dee24cff Revert "Add a jupyter server extension to render desktop/"
Removes the server extension, so the HTML for the interface
*is* served by websockify itself. This is a fix for
https://github.com/yuvipanda/jupyter-desktop-server/issues/10
This reverts commit 18d7fb7b2a.
2019-11-19 16:59:38 -08:00
YuviPanda 18d7fb7b2a Add a jupyter server extension to render desktop/
A mess of a commit, should have been several.

- Finish renaming package from jupyter_desktop to
  jupyter_desktop_server
- Revert 360f9b04c5. Looks like
  websockify gets super confused when you put shell in the middle
  of it and the process it is spawning.
- Add a server extension that renders a slightly modified copy
  of vnc_lite.html as /desktop. This will be modified more and more
  as we go forward. This also helps us remove the mapping present
  in the jupyter server proxy entry
2019-11-19 16:36:54 -08:00
YuviPanda bda9a7ec21 Fix README to point to new name
- jupyter-desktop sounds like a desktop installation of
  Jupyter
- This matches the package name
2019-11-19 11:10:16 -08:00
YuviPanda 98b7723943 Explicitly specify version of jupyter-server-proxy needed
We made a release!
2019-11-19 11:07:46 -08:00
YuviPanda 360f9b04c5 Set CWD of desktop environment to CWD of notebook
Otherwise it'll be cwd of webroot, which is confusing as
soon as you open a terminal
2019-11-19 11:06:53 -08:00
YuviPanda 3ee7d7eb1d Bump version number & update CHANGELOG 2019-11-12 14:26:22 -08:00
Yuvi Panda 81e224cfd8
Merge pull request #9 from eslavich/eslavich-crossorigin-use-credentials
Send credentials when making requests for imported modules in noVNC
2019-11-12 09:52:31 -08:00
Ed Slavich e3c31a919d Send credentials when making requests for imported modules in noVNC 2019-11-11 19:34:28 -05:00
YuviPanda bfa4a784fe Bump version number & add CHANGELOG 2019-11-06 11:59:09 -08:00
YuviPanda 57d52f66a3 Bump default resolution a little
A wider screen & higher resolution, to match what most current
screens are like.

We should make the default configurable, for people on low bandwidth
connections.
2019-11-06 11:53:18 -08:00
8 changed files with 83 additions and 17 deletions

13
CHANGELOG.md Normal file
View File

@ -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

View File

@ -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
View File

@ -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

View File

@ -3,5 +3,4 @@ channels:
dependencies:
- websockify
- pip:
- https://github.com/jupyterhub/jupyter-server-proxy/archive/0e67e1afd0bab1342443f13bd147a2f8c682e9e0.zip
- .

View File

@ -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,

View File

@ -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';

36
postBuild Normal file
View File

@ -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

View File

@ -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
)