How to install and use Signal messenger without a smartphone · ctrl.alt.coop
▻https://ctrl.alt.coop/en/post/signal-without-a-smartphone
Signal-cli + Signal-Desktop
Signal-cli is a command line interface for Signal. It’s used to register a new signal account and then link a Signal-Desktop app to this account. If you really use Signal without a smartphone, signal-cli functions as the single-point-of-truth.
Go to the following link and download the latest signal-cli release: ▻https://github.com/AsamK/signal-cli/releases/latest
In our case this is v0.6.2
$ wget ▻https://github.com/AsamK/signal-cli/releases/download/v0.6.2/signal-cli-0.6.2.tar.gz
$ tar xfv signal-cli-0.6.2.tar.gz
$ cd signal-cli-0.6.2
To be able to use Signal you have to register yourself with a phone number (doesn’t has to be a mobile number).
$ bin/signal-cli -u YOUR_NUMBER register
You will then get a SMS with a verfication number if it’s a mobile number or else a call. You use this number then to verify your account:
$ bin/signal-cli -u YOUR_NUMBER verify VERIFICATIONCODE
Install the latest version of Signal-Desktop from here: ▻https://signal.org/download
Now you have to start Signal-Desktop and extract the actual QR-Code. For this, start Signal-Desktop. It should display a barcode to link your Signal-Desktop app to a Signal device. You can either decode the barcode on your local machine or use a smartphone to scan the barcode.
Android:
Install Barcode Scanner on your device
Scan barcode and tsdevice-Link should appear
Linux:
Toggle Developer Tools, go to Network Tab
search for data:image/png entry, click on it and the actual barcode should be displayed
Right click on the bar code to save it for instance as /tmp/qr.png
use zbarimg (zbar-tools) to decode it: $ zbarimg /tmp/qr.png QR-Code:tsdevice:/?uuid...
Copy tsdevice-Link
Now you can link your Signal-Desktop to your Signal account through signal-cli:
$ bin/signal-cli -u YOUR_NUMBER addDevice —uri “tsdevice:/?uuid...”
Add contacts
We use signal-cli daemon to synchronise contacts (with names^^) with our Signal-Desktop instance.
On Ubuntu, you have to install libunixsocket-java package (otherwise the signal-cli daemon can’t start)
Fill in contacts in the signal-cli config: .local/share/signal-cli/data/YOUR_NUMBER in the dict
“contactStore” : {
“contacts” : [ {
“name” : “name”,
“number” : “+49xxxx”
}, {
“name” : “name2”,
“number” : “+49yyyyy”,
}]}
Start signal-cli daemon:
$ bin/signal-cli -u YOUR_NUMBER daemon
And then synchronise contacts in the Signal Desktop App (File->Preferences->Contacts->Import Now)
Troubleshooting
If signal-cli daemon reports following error Envelope from: <yournumer> (device: 2) Timestamp: xxxxx Exception: org.whispersystems.libsignal.InvalidMessageException: No valid sessions. (ProtocolInvalidMessageException) Failed to decrypt message.
then:
$ bin/signal-cli -u YOUR_NUMBER send -e -m “foo” YOUR_NUMBER
In the same config, set the Active parameter for all groups to true, in order to be able to send messages in groups.
Signal-cli as a daemon
You may want to run signal-cli as a user systemd service to prevent that the key material gets out of sync for signal-cli.
Symlink the signal-cli executable to ~/.bin/signal-cli:
$ ln -s <ABSOLUTE-PATH-TO>/signal-cli-0.X.X/bin ~/.bin/signal-cli
(This way you only have to update the symlink and not all the configs, if you get a newer signal-cli version.)
Add following line to your ~/.bashrc or ~/.bash_profile:
export PATH=$PATH:$HOME/.bin
And place following systemd service config in ~/.config/systemd/user/signal-cli@.service:
[Unit]
Description=Signal cli for %I
Requires=dbus.socket
After=dbus.socket
Wants=network-online.target
After=network-online.target
[Service]
Type=dbus
Environment="SIGNAL_CLI_OPTS=-Xms2m"
ExecStart=%h/.bin/signal-cli -u %I daemon —ignore-attachments
BusName=org.asamk.Signal
[Install]
WantedBy=multi-user.target
Start the service with:
$ systemctl —user start signal-cli@<YOUR NUMBER>
And verify it is running with:
$ systemctl —user status signal-cli@<YOUR NUMBER>
If you change something in the config, stop the service:
$ systemctl —user stop signal-cli@<YOUR NUMBER>
reload the daemon:
$ systemctl —user daemon-reload
And start it again.
That’s it! Happy messaging.