Compare commits
15 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 |
|
@ -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', '1680x1050',
|
||||
'-SecurityTypes', 'None',
|
||||
'-rfbunixpath', sockets_path,
|
||||
'-fg',
|
||||
':1',
|
||||
'/bin/sh', '-c',
|
||||
f'cd {os.getcwd()} && {vnc_command}'
|
||||
],
|
||||
'port': 5901,
|
||||
'timeout': 30,
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue