Signal Desktop (Update)

My weekend adventures got me as far as a running Election branch. Something was obviously a little weird as it was opening with a javascript debugger taking up the right third of the app window. Not ideal, but easy to close.

And then i tried to link it to the account on my phone… no dice.

What i’d built was the development version, which defaults to connecting to the test / staging servers. For any of this experiment to be useful it needs to connect to the production servers.

These are all defined in the /config directory, but it wasn’t obvious to me how to change to another config. In the package.json there were references to ${env.SIGNAL_ENV} but exporting that to the shell with a value of ‘production’ didn’t help.

A little reading about my new friend ‘yarn’ showed that there was a ‘–production=true’ CLI option. Passing that along with ‘yarn install’ broke things.. but the command:

$ yarn start --production=true

Moves things along and makes it possible to link to a phone account. The process is actually pretty smooth – you just take a picture of a QRCode, give the client a name and you’re done.

What i’ve still not worked out is how to tell my other new friend ‘electron-packager’ to package the production version. Until that is worked out i’m stuck with the Muon version… which isn’t a bad place – it has been very stable thus far.

Edit: It seems ‘electron-packager’ was not my friend after all, ‘yarn’ however i’m starting to like! The ‘package.json’ contains a ‘scripts’ section defining a bunch of targets, one of which ‘pack-prod’ is ‘SIGNAL_ENV=production npm run dist’ which seems exactly what i need. And, indeed:

$ yarn pack-prod

spat out a ‘dist’ dir containing a working ‘production’ Signal.app.

The end.

Signal Desktop (without Chrome)

As unfathomable as i’m sure this is, i’m not a fan of the Chrome browser – don’t think i’ve ever used it. One of those ‘on principle’ things of which i seem to be so fond. Unfortunately the Signal Desktop application runs as a Chrome App… imagine their surprise when Big G declared that it would stop supporting Chrome Apps in the near future. Sorry, getting distracted.

If you want to run a Signal Desktop App there are now options. They most revolve around frameworks that provide a browser platform to applications without actually being a browser, and have names like Electron and Muon.

After a few failed attempts to create a working development environment for Election, and build the official Signal Desktop Electron branch i stumbled upon a Muon branch. This is obviously not at all official, and completely unsupported, but it works really well! If nothing else it will get me by until an official Electron build is produced by Whisper Systems.

My build environment for this was:

  • Xcode (think that’s where my git binaries come from…)
  • macports
    • nodejs7
    • npm4

As usual it was more of a pain to get the environment setup than it was to follow the build instructions. Make sure you install nodejs7 before npm4 otherwise you get stuck with an old version… i should probably move to Brew, etc.

The end result was a OS X Signal.app that paired perfectly with the account on my phone, and has been completely stable / trouble free for the last week. It doesn’t look like the branch is going to be maintained – at least nothing has been merged to it from upstream for nearly two weeks, so this isn’t a long term solution. However, if like me you’re moving more and more of your communications away from mail to signal, it’s a good way to save yourself from typing on a phone!

Edit: i’m an idiot. Building the Electron branch is simple.

$ git clone --recursive https://github.com/WhisperSystems/Signal-Desktop.git
Cloning into 'Signal-Desktop'...
remote: Counting objects: 22939, done.
remote: Compressing objects: 100% (241/241), done.
remote: Total 22939 (delta 333), reused 546 (delta 324), pack-reused 22373
Receiving objects: 100% (22939/22939), 49.29 MiB | 1.04 MiB/s, done.
Resolving deltas: 100% (13362/13362), done.
$ cd Signal-Desktop/
$ git checkout electron
Branch electron set up to track remote branch electron from origin.
Switched to a new branch 'electron'
$ npm install

Now wait for a while… and eventually:

$ npm start

> signal-desktop@1.0.10 start /Users/<redacted>/src/Signal-Desktop
> electron .

Wait for app ready
setting AUMID
reading package.json
configuring
NODE_ENV development
NODE_CONFIG_DIR /Users/<redacted>/src/Signal-Desktop/config
NODE_CONFIG {}
ALLOW_CONFIG_MUTATIONS undefined
HOSTNAME undefined
NODE_APP_INSTANCE undefined
SUPPRESS_NO_CONFIG_WARNING undefined
userData /Users/<redacted>/Library/Application Support/Signal-development
app ready

signal desktop

Edit 2: Sven educated me further, and now i can package an application. This requires another exciting adventure with npm, and installing another tool, the ‘electron-packager‘:

$ npm install electron-packager -g

This let me run:

$ ~/.local/lib/npm/bin/electron-packager .
Packaging app for platform darwin x64 using electron v1.6.7
Wrote new app to /Users/<redacted>/src/Signal-Desktop/Signal-darwin-x64

Which outputs a macOS application bundle ‘Signal.app’. It is a little “heavy”:

$ du -sh Signal.app
156M Signal.app

But that’s the end of the trail. From git to a usable Signal Desktop application… it’s probably time i went outside.

Signal?

Time for another “old man shakes fist at sky” moment.

4593531893_f67a757fa1

[several deleted attempts to justify why this time you should engage with safe guarding your privacy, and how i’m moving personal communications away from mail]

How about you get it installed:

Trust is in short supply these days. Trust that you can express yourself freely.