I came across this fantastic post about running Scrivener on Ubuntu. There was a beta of a Linux release of the software a number of years ago, and according to the above post, it still works really well on Ubuntu 22.04, so I thought I'd give it a try, however, I wanted to run it in a Docker container (since it had a number of dependency packages I would be using nowhere else) and launch as a desktop app with x11docker
, for example, or [configuring the system display to launch application windows)(https://blog.jessfraz.com/post/docker-containers-on-the-desktop/).
I created two versions of the Dockerfile
, one that downloads the packages installed, or one that assumes I'm building the image locally, so I prepared a pkgs
directory to improve build time on subsequent runs:
mkdir pkgs
cd pkgs
wget http://archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng_1.2.54.orig.tar.xz
wget http://ftp.us.debian.org/debian/pool/main/g/glibc/multiarch-support_2.19-18+deb8u10_amd64.deb
wget http://fr.archive.ubuntu.com/ubuntu/pool/universe/g/gstreamer0.10/libgstreamer0.10-0_0.10.36-1.5ubuntu1_amd64.deb
wget https://ftp.lysator.liu.se/ubuntu/pool/main/g/gst-plugins-base0.10/libgstreamer-plugins-base0.10-0_0.10.36-1.1ubuntu2.1_amd64.deb
wget http://www.literatureandlatte.com/scrivenerforlinux/scrivener-1.9.0.1-amd64.deb
and then in my project root that contains my packages directory, I have the following Dockerfile
:
FROM ubuntu:xenial
MAINTAINER Joseph Marhee <jmarhee@interiorae.com>
RUN apt update
RUN apt install -y \
libtool \
autoconf \
build-essential \
pkg-config \
automake \
tcsh \
zlib1g-dev \
libasound2 \
libcups2 \
libxrender1 \
libxext6 \
libxext-dev \
libfontconfig1 \
libfontconfig-dev
COPY pkgs/* /
RUN tar xvf /libpng_1.2.54.orig.tar.xz
WORKDIR /libpng-1.2.54
RUN ./autogen.sh
RUN ./configure
RUN make -j8
RUN make install
RUN ldconfig
WORKDIR /
#RUN apt install -y ./multiarch-support_2.19-18+deb8u10_amd64.deb
RUN apt install -y ./libgstreamer0.10-0_0.10.36-1.5ubuntu1_amd64.deb
RUN apt install -y ./libgstreamer-plugins-base0.10-0_0.10.36-1.1ubuntu2.1_amd64.deb
RUN apt install -y ./scrivener-1.9.0.1-amd64.deb
ENTRYPOINT ["scrivener"]
CMD []
In order to launch the app properly from the container into my display, I needed to use the ubuntu:xenial
base image, though I suspect this will work with bionic
as well, I ran into further dependency issues with jammy
that I did not experience installing directly onto the base system, but for my purposes this would suffice.
So, I proceed to build the image:
docker build -t jmarhee/scrivener:offline .
and then launch the application:
x11docker jmarhee/scrivener
and you'll see the app launch on your desktop:
The Dockerfiles and dependencies can be found on Github:
Top comments (0)