snap install doctl
| # Location of the image which will contain the new ext4 partition | |
| DROPBOXFILE="$HOME"/.dropbox.img | |
| # Current location of my Dropbox folder | |
| DROPBOXHOME="$HOME"/Dropbox | |
| # Where we will copy the folder to. If you have little space, you could make this | |
| # a folder on a USB drive | |
| DROPBOXBACKUP="$HOME"/old_Dropbox |
| #!/bin/bash | |
| # Override that with the tag | |
| # build-snap v1.16.2 # build specific tag | |
| # Override with latest | |
| # build-snap master # build git master | |
| # Override with most recent release | |
| # build-snap release # build latest stable release | |
| # Set these variables | |
| # Lower case name as it would appear in the store |
| #!/bin/bash | |
| # Script to clean up and rebuild a snap locally | |
| # Name of the snap as seen in the store | |
| export snapname="SNAPNAME" | |
| # If the command we run is namespaced, optionally add it here | |
| #export commandname=".COMMANDNAME" | |
| # If there are interfaces defined to connect, optionally list them here |
This gist is to accompany a more wordy blog post which covers everything in much more detail. These are the easily copy/pastable steps.
For this you will need:-
- Raspberry Pi 2 or 3, PSU, keyboard, LAN connection, HDMI cable and display
- Laptop/desktop computer - mine is running Ubuntu 18.04 but anything with SSH will do
- Micro SD card and adapter to attach to the computer
| #!/bin/bash | |
| # Script to automate setup, install of snaps and running. | |
| # Script will do the following:- | |
| # - Make sure we're in an X11 session (wayland not supported) | |
| # - Install snapd and scrot (for taking screenshots) using whatever package manager | |
| # - Determine distribution being run on, for logging and screenshot naming | |
| # - Double check snapd is installed and works, and switch to the beta channel | |
| # - Install a configurable list of snaps | |
| # - Take a reference screenshot (of the file manager) for theme comparison | |
| # - Launch each snap in turn |
| #!/bin/bash | |
| TMPDIR=$(mktemp -d) | |
| LDD=$TMPDIR/LDD | |
| PACKAGES=$TMPDIR/PACKAGES | |
| ldd $1 | awk -F ' ' '{print $3}' | sed '/^$/d' | sed '/^(/d' | grep -v '^not' > $LDD | |
| while read p; do | |
| echo -n . |
I've put together this pull request to add a snap package. I've tested it on Ubuntu 16.04, but it should work just as well on Ubuntu 14.04, Linux Mint, Manjaro, Debian, OpenSUSE, Solus, etc.
If you merge and npm COMMAND on an Ubuntu 16.04 VM with an appropriate version of node installed it will create dist/NAME_VERSION_amd64.snap.
Copy this to a Linux system, enable snap support, then run:
sudo snap install --dangerous NAME_VERSION_amd64.snap. Execute it with NAME from the terminal or find it in the desktop launcher.
If you create a developer account and push this to the Snap Store, it can be discovered and installed through GNOME Software and https://snapcraft.io/discover. To create the developer account, sign up here, then register the "NAME" name.
You'll need the snapcraft comm
We have identified a number of electron-based desktop applications which already have builds for Linux, but are not yet easily available in Ubuntu. The goal of this task it to select one of those applications and update the build system to add snap support.
Many of these applications require a newer version of node/npm to build than is available in Ubuntu. We recommend using Ubuntu 16.04 machine, virtual machine or container. Please do not do this task on a 17.10 system, but use 16.04.
In that 16.04 system, install node/npm from upstream nodesource as detailed at https://github.com/nodesource/distributions#debinstall
You may also want to go through the electron guide, to ensure your system is configured correctly to build electron applications successfully. https://docs.snapcraft.io/build-snaps/electron
| #!/bin/bash | |
| # | |
| # lddtostage | |
| # | |
| # usage: | |
| # lddtostage somebinary | |
| # | |
| # This will run through each linked library and figure out which deb | |
| # it came from and print the list for pasting into a snapcraft.yaml | |
| # in a 'stage-packages' section. |