first commit
This commit is contained in:
commit
e4e3096cee
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
FROM ubuntu:16.04
|
||||||
|
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
RUN dpkg --add-architecture i386 && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install sudo wget ca-certificates --no-install-recommends -y && \
|
||||||
|
mkdir /opt/setup /usr/share/desktop-directories/ -p && \
|
||||||
|
cd /opt/setup && \
|
||||||
|
wget -O smart.tar.gz https://downloads.smarttech.com/software/nb/11linux/11_3sp4/debian/smart_software_deb_archive.tar.gz && \
|
||||||
|
tar -xvf smart.tar.gz && \
|
||||||
|
( dpkg -i ./*.deb; true ) && \
|
||||||
|
apt-get install -yf && \
|
||||||
|
cd / && \
|
||||||
|
rm -rf /opt/setup && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
CMD bash /entrypoint.sh
|
15
README.md
Normal file
15
README.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
Has this ever happened to you?
|
||||||
|
You paid massive amounts for digital whiteboards years ago and cannot use them with the included software on Linux now since the manufacturer only built the software up until 2019 when Ubuntu 16.04 was still the most up-to-date version to them, leading you to dependancy hell when trying to install their software on your shiny new Ubuntu install?
|
||||||
|
|
||||||
|
Well, worry not! I've got just the thing for you~
|
||||||
|
|
||||||
|
# SMART Notebook 11 in Docker #
|
||||||
|
|
||||||
|
This repository contains a Dockerfile and some helper files, which when build and installed, run SMART Notebook 11 SP4 on pretty much any Linux machine by installing SMART Notebook 11 from scratch into a base Ubuntu 16.04 Docker container and fowards both the hosts' X11 server connection and your home directory all neatly tucked away behind a .desktop file so you can just double click on a SMART Notebook 11 document and have it automagically open in the Docker SMART Notebook 11 container, all on your modern Ubuntu or Debian or whatever else you may have, without touching any of your system libraries with outdated packages and broken dependancies!
|
||||||
|
|
||||||
|
## How to install ##
|
||||||
|
Just clone the repo with `git clone https://git.diskcat.com/Resneptacle/smart-notebook-11-docker.git`, then `cd smart-notebook-11-docker` and run the `install.sh` as user, NOT AS ROOT, e.g. with `bash install.sh`.
|
||||||
|
|
||||||
|
This assumes that your own user is able to build and start Docker containers, if you haven't installed Docker yet or haven't configured it for your user account, see here:
|
||||||
|
- [Install Docker Engine](https://docs.docker.com/engine/install/)
|
||||||
|
- [Manage Docke4r as a non-root user](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user)
|
BIN
SMART_Notebook.png
Normal file
BIN
SMART_Notebook.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
23
entrypoint.sh
Normal file
23
entrypoint.sh
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "${UID}" = "" ] || [ "${GID}" = "" ]; then
|
||||||
|
echo "UID or GID environment variable not set, cannot start SMART Notebook!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${USER}" = "" ] || [ "${USER}" = "root"]; then
|
||||||
|
echo "USER variable is not properly set, current value: ${USER}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${HOME}" = "" ]; then
|
||||||
|
echo "HOME variable not set!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create user and group
|
||||||
|
groupadd -g ${GID} user
|
||||||
|
useradd ${USER} -d ${HOME} -s /bin/bash -u ${UID} -g ${GID}
|
||||||
|
|
||||||
|
sudo -Eu ${USER} "/opt/SMART Technologies/Notebook Software/bin/Notebook/notebook" ${SMART_ARGS}
|
23
install.sh
Normal file
23
install.sh
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
TARGET_DIR="${HOME}/.local/smart-docker"
|
||||||
|
APPS_DIR="${HOME}/.local/share/applications/"
|
||||||
|
|
||||||
|
# Build current docker image from Dockerfile
|
||||||
|
docker build -t notebook-gui .
|
||||||
|
|
||||||
|
# Create target directory in user home
|
||||||
|
if [ ! -d "${TARGET_DIR}" ]; then
|
||||||
|
mkdir -p "${TARGET_DIR}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Copy necessary files over
|
||||||
|
cp SMART_Notebook.png start.sh "${TARGET_DIR}/"
|
||||||
|
cp notebook-docker.desktop "${HOME}/.local/share/applications/"
|
||||||
|
|
||||||
|
# Mark start.sh as executable
|
||||||
|
chmod +x "${TARGET_DIR}/start.sh"
|
||||||
|
|
||||||
|
# Replace variable in desktop file
|
||||||
|
sed -i "s#{{TARGET_DIR}}#${TARGET_DIR}#g" "${APPS_DIR}/notebook-docker.desktop"
|
9
notebook-docker.desktop
Normal file
9
notebook-docker.desktop
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=SMART Notebook (Docker)
|
||||||
|
Comment=Runs SMART Notebook in a Docker container
|
||||||
|
Path={{TARGET_DIR}}
|
||||||
|
Exec={{TARGET_DIR}}/start.sh %F
|
||||||
|
Icon={{TARGET_DIR}}/SMART_Notebook.png
|
||||||
|
MimeType=application/x-smarttech-notebook;
|
||||||
|
Categories=SMART-Technologies;
|
19
start.sh
Normal file
19
start.sh
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Allow local and docker connections to X11 on the host
|
||||||
|
xhost + local:docker >/dev/null
|
||||||
|
|
||||||
|
# TODO: Add /media to mapped directories to allow removable media
|
||||||
|
|
||||||
|
# Run docker container
|
||||||
|
docker run \
|
||||||
|
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||||
|
-v ${HOME}:${HOME} \
|
||||||
|
-e DISPLAY=${DISPLAY} \
|
||||||
|
-e HOME=${HOME} \
|
||||||
|
-e USER=${USER} \
|
||||||
|
-e UID=${UID} \
|
||||||
|
-e GID=$(id -g ${USER}) \
|
||||||
|
-e SMART_ARGS=${@} \
|
||||||
|
-h ${HOSTNAME} \
|
||||||
|
notebook-gui
|
Loading…
x
Reference in New Issue
Block a user