Inkdrop is now Available on Snap Store for Linux
Have the app installed with the auto-updating feature on Linux
Hi, it’s Takuya, the author of Inkdrop — a markdown note-taking app.
For long time, Inkdrop for Linux was not supporting auto-update unlike other platforms and it was a long-awaited feature. Today, I’m happy to announce that you can now install Inkdrop via Snap — A universal app store for Linux. Let me describe about it in this article.
I appreciate people have joined on our forum to help me accomplish that — Thank you, Dan, Sceptic and Parker!
Many struggles for distributing the app with auto-update support on Linux
Before introducing our Snap app, I would like to talk about why I chose Snap.
Failed to publish on Launchpad
Inkdrop is built on top of Electron and it supports auto-update out of the box by integrating with Squirrel, but it works only on macOS and Windows. So Linux users had to download manually every time new version released. That’s terrible experience.
However, Inkdrop already has .deb and .rpm package, so I assumed that it is easy to publish them on a package hosting service such as Launchpad — But not. Last year, I actually tried to publish it on Launchpad for Ubuntu and Debian but couldn’t. That’s because Electron-based apps have too many dependencies to work. For example, the app bundles with NodeJS directly. And that causes many warnings and errors when built and pushed it to Launchpad. Besides, the package size is so large (126 mb) and it is very tight to publish on it due to its repository size limitation. Seems like Electron is not designed to be distributed via such hosting service. But I didn’t even want to host it by myself.
I found that Atom Editor, which is also an Electron-based app, is published on Launchpad by WebUpd8 team. How did they accomplish that!? I looked into their package and was surprised that it doesn’t include the app files directly. Instead, it bundles with atom-linux64.tar.xz
:$ lesspipe atom_1.26.1-1~webupd8~0_amd64.deb
atom_1.26.1-1~webupd8~0_amd64.deb: [36/6658]
new debian package, version 2.0.
size 86712130 bytes: control archive=1390 bytes.
843 bytes, 19 lines control
710 bytes, 10 lines md5sums
569 bytes, 33 lines * postinst #!/bin/sh
124 bytes, 14 lines * postrm #!/bin/bash
49 bytes, 10 lines * preinst #!/bin/sh
Package: atom
Version: 1.26.1-1~webupd8~0
Architecture: amd64
Maintainer: Alin Andrei <webupd8@gmail.com>
Installed-Size: 84707
Depends: git, gconf2, gconf-service, libgtk2.0-0, libudev0 | libudev1, libgcrypt11 | libgcrypt20, libnotify4, libxtst6, libnss3, python, gvfs-bin, xdg-utils, libdbus-1-3, libcap2, libxkbfile1,
libx11-6, libasound2, libsecret-1-0, gir1.2-secret-1
Recommends: lsb-release
Suggests: libgnome-keyring0, gir1.2-gnomekeyring-1.0
Section: devel
Priority: optional
Homepage: http://www.atom.io
Description: Atom text editor from GitHub
Atom is a hackable text editor for the 21st century, developed by GitHub.
.
Atom is open source and built on top of atom-shell.
.
Atom is designed to be customizable, but also usable without needing to edit a config file.
. [10/6658]
Atom is modern, approachable, and hackable to the core.*** Contents:
drwxr-xr-x root/root 0 2018-04-27 21:52 ./
drwxr-xr-x root/root 0 2018-04-27 21:52 ./opt/
drwxr-xr-x root/root 0 2018-04-27 21:52 ./opt/atom/
-rwxr-xr-x root/root 86630492 2018-04-27 21:52 ./opt/atom/atom-linux64.tar.xz
drwxr-xr-x root/root 0 2018-04-27 21:52 ./usr/
drwxr-xr-x root/root 0 2018-04-27 21:52 ./usr/share/
drwxr-xr-x root/root 0 2018-04-27 21:52 ./usr/share/icons/
drwxr-xr-x root/root 0 2018-04-27 21:52 ./usr/share/icons/hicolor/
drwxr-xr-x root/root 0 2018-04-27 21:52 ./usr/share/icons/hicolor/16x16/
drwxr-xr-x root/root 0 2018-04-27 21:52 ./usr/share/icons/hicolor/16x16/apps/
-rw-r--r-- root/root 1095 2018-04-27 21:52 ./usr/share/icons/hicolor/16x16/apps/atom.png
drwxr-xr-x root/root 0 2018-04-27 21:52 ./usr/share/icons/hicolor/48x48/
drwxr-xr-x root/root 0 2018-04-27 21:52 ./usr/share/icons/hicolor/48x48/apps/
-rw-r--r-- root/root 4713 2018-04-27 21:52 ./usr/share/icons/hicolor/48x48/apps/atom.png
drwxr-xr-x root/root 0 2018-04-27 21:52 ./usr/share/icons/hicolor/256x256/
drwxr-xr-x root/root 0 2018-04-27 21:52 ./usr/share/icons/hicolor/256x256/apps/
-rw-r--r-- root/root 42856 2018-04-27 21:52 ./usr/share/icons/hicolor/256x256/apps/atom.png
drwxr-xr-x root/root 0 2018-04-27 21:52 ./usr/share/icons/hicolor/32x32/
drwxr-xr-x root/root 0 2018-04-27 21:52 ./usr/share/icons/hicolor/32x32/apps/
-rw-r--r-- root/root 2778 2018-04-27 21:52 ./usr/share/icons/hicolor/32x32/apps/atom.png
drwxr-xr-x root/root 0 2018-04-27 21:52 ./usr/share/icons/hicolor/128x128/
drwxr-xr-x root/root 0 2018-04-27 21:52 ./usr/share/icons/hicolor/128x128/apps/
-rw-r--r-- root/root 16496 2018-04-27 21:52 ./usr/share/icons/hicolor/128x128/apps/atom.png
drwxr-xr-x root/root 0 2018-04-27 21:52 ./usr/share/doc/
drwxr-xr-x root/root 0 2018-04-27 21:52 ./usr/share/doc/atom/
-rw-r--r-- root/root 1423 2016-05-11 21:01 ./usr/share/doc/atom/copyright
-rw-r--r-- root/root 4394 2018-04-27 21:38 ./usr/share/doc/atom/changelog.Debian.gz
drwxr-xr-x root/root 0 2018-04-27 21:52 ./usr/share/applications/
-rw-r--r-- root/root 246 2018-04-27 21:52 ./usr/share/applications/atom.desktop
drwxr-xr-x root/root 0 2018-04-27 21:52 ./usr/bin/
-rwxr-xr-x root/root 3416 2018-04-27 21:52 ./usr/bin/atom
I guess the package extracts this tar.xz file during its installation process. It’s very complicated. It turned out that it’s so hard to maintain deb package on PPA. So I decided to go with Snap.
Build Snap from .deb package
What is Snap? They say:
Snaps are containerised software packages that are simple to create and install. They auto-update and are safe to run. And because they bundle their dependencies, they work on all major Linux systems without modification.
On top of that, Snap lets you build .snap file from .deb package. There is an official Snapcraft guide by Electron team:
And here is our repo of snapcraft:
It automatically downloads deb file from our server and converts it to Snap. Snapcraft also provides a continuous build service on build.snapcraft.io so you do not always have to build your own Snap on your machine. That’s nice. Here is the result that Inkdrop is running inside a snap container:
Yay! That was a roundabout way but now I’m glad to provide the auto-update feature, which the snapd
daemon checks for updates 4 times each day.
How to install via Snap Store
I updated the documentation of quick start guide.
If you don’t have snapd
yet, please install it beforehand. You can install the app via Snap Store like following:sudo snap install inkdrop# Allow the app to access to your keyring
sudo snap connect inkdrop:password-manager-service
You can easily update the app manually by running below command:sudo snap refresh inkdrop
But basically you don’t have to do it because the snapd
daemon automatically checks for updates 4 times each day.
Please note that ipm
command is now inkdrop.ipm
in the path of /snap/bin/
. Please read this documentation to learn more about how to install plugins with ipm.
If you have a problem, please report it here and I would be happy to help you :) Enjoy with the auto-update feature!
Links
- Inkdrop: https://inkdrop.app/
- User Forum: https://forum.inkdrop.app/
- Twitter: https://twitter.com/inkdrop_app