├── apt.txt ├── start ├── qgis.desktop ├── environment.yml ├── .github └── workflows │ ├── publish.yml │ └── binder-badge.yaml └── README.md /apt.txt: -------------------------------------------------------------------------------- 1 | dbus-x11 2 | firefox 3 | xfce4 4 | xorg 5 | xubuntu-icon-theme 6 | -------------------------------------------------------------------------------- /start: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | 4 | mkdir -p $HOME/Desktop 5 | 6 | cp $REPO_DIR/*.desktop $HOME/Desktop/ 7 | 8 | exec "$@" 9 | -------------------------------------------------------------------------------- /qgis.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Name=qgis 5 | Exec=qgis 6 | Icon=/srv/conda/envs/notebook/share/qgis/images/icons/qgis-icon-512x512.png -------------------------------------------------------------------------------- /environment.yml: -------------------------------------------------------------------------------- 1 | channels: 2 | - conda-forge 3 | dependencies: 4 | - jupyter-server-proxy>=1.4 5 | - pip 6 | - qgis=3.18 7 | - websockify 8 | - pip: 9 | - jupyter-desktop-server 10 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | # Build releases and (on tags) publish to PyPI 2 | name: Release 3 | 4 | # always build releases (to make sure wheel-building works) 5 | # but only publish to PyPI on tags 6 | on: 7 | push: 8 | pull_request: 9 | 10 | jobs: 11 | build-release: 12 | runs-on: ubuntu-20.04 13 | steps: 14 | - uses: actions/checkout@v2 15 | - uses: actions/setup-python@v2 16 | with: 17 | python-version: 3.8 18 | 19 | - name: install build package 20 | run: | 21 | pip install --upgrade pip 22 | pip install build 23 | pip freeze 24 | 25 | - name: build release 26 | run: | 27 | python -m build --sdist --wheel . 28 | ls -l dist 29 | 30 | - name: publish to pypi 31 | uses: pypa/gh-action-pypi-publish@v1.4.1 32 | if: startsWith(github.ref, 'refs/tags/') 33 | with: 34 | user: __token__ 35 | password: ${{ secrets.pypi_password }} 36 | -------------------------------------------------------------------------------- /.github/workflows/binder-badge.yaml: -------------------------------------------------------------------------------- 1 | #./.github/workflows/binder-badge.yaml 2 | name: Binder Badge 3 | on: [pull_request_target] 4 | 5 | jobs: 6 | binder: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: comment on PR with Binder link 10 | uses: actions/github-script@v1 11 | with: 12 | github-token: ${{secrets.GITHUB_TOKEN}} 13 | script: | 14 | var PR_HEAD_USERREPO = process.env.PR_HEAD_USERREPO; 15 | var PR_HEAD_SHA = process.env.PR_HEAD_SHA; 16 | github.issues.createComment({ 17 | issue_number: context.issue.number, 18 | owner: context.repo.owner, 19 | repo: context.repo.repo, 20 | body: `[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/${PR_HEAD_USERREPO}/${PR_HEAD_SHA}?urlpath=desktop) :point_left: Launch a binder notebook on this branch for commit ${PR_HEAD_SHA}` 21 | }) 22 | env: 23 | PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} 24 | PR_HEAD_USERREPO: ${{ github.event.pull_request.head.repo.full_name }} 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Jupyter Remote QGIS Desktop 2 | 3 | Run [QGIS Desktop App (3.18)](https://qgis.org/en/site/) vi BinderHub! Click the button below to launch a server: 4 | 5 | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/giswqs/jupyter-qgis/qgis?urlpath=desktop) 6 | 7 | As more GIS datasets are hosted in Cloud datacenters it can be advantageous to move your computing environment to the data rather than the other way around. Jupyter Servers are most commonly used to run Jupyter Notebooks, but they also facilitate running many other applications! For example [VScode](https://github.com/betatim/vscode-binder) or [Rstudio](https://github.com/binder-examples/r-conda). Those modern applications are built to run in browsers, but what about things like QGIS, a GUI desktop application for geospatial analysis? Thanks to the brilliant folks working on project Jupyter you can even run QGIS! 8 | 9 | This configuration runs a [Linux XFCE](https://www.xfce.org) desktop on the Jupyter single-user server, and proxies it to your browser using Virtual Network Computing (VNC). Read more about the implementation here: https://github.com/jupyterhub/jupyter-remote-desktop-proxy. 10 | 11 | Don't expect extreme performance here, this is really just a proof of concept, but could be a great resource for classrooms, tutorials, or demos. You can also set up your own [BinderHub](https://binderhub.readthedocs.io/en/latest/) to deploy configurations like this with more computational resources and higher bandwidth: 12 | 13 | [![badge](https://img.shields.io/static/v1.svg?logo=Jupyter&label=PangeoBinderAWS&message=us-west-2&color=orange)](https://aws-uswest2-binder.pangeo.io/v2/gh/giswqs/jupyter-qgis/qgis?urlpath=desktop) 14 | 15 | ### Demo 16 | 17 | ![qgis-demo-loop](https://user-images.githubusercontent.com/3924836/112456403-d9a18800-8dae-11eb-883a-6d87290c7f95.gif) 18 | 19 | --------------------------------------------------------------------------------