Open ernstblaauw opened 1 day ago
Hi! My guess is, that running inside nix-shell prevents the tool from accessing your environment variables, so it can not find $HOME (and subsequently can not find you signal data directory).
You seem to have attempted to mitigate that with your second command, but unfortunately it's not fully correct. To specify the location of the Signal Desktop data folder, use --desktopdirs
followed by the data folder (/home/<user>/.config/Signal
) twice:
signalbackup-tools --desktopdirs /home/<user>/.config/Signal /home/<user>/.config/Signal --showdesktopkey
The doubling of the folder is for historical reasons, and has already been changed, but I see the nix package is (slightly) out of date so you need to pass it like that.
If the problem is not that the nix shell can't find you home directory, buy that it doesn't have access to it, then I don't know, there is probably some config option for that or you need to run the tool outside nix-shell.
Let me know if this helps!
I have quickly run Linux Mint XFCE in a virtual machine to test. When running the program in a nix-shell, it indeed can not find home directory automatically. Manually specifying it as I described above helps with this. I have (locally) added a warning when the tool fails to determine Signal Desktop's data directory, which also advises the user to add --desktopdirs
.
However, after that, the tool needs to access the dbus
system to query the keys, which will also fail. I do not know enough about nix to solve this, there may be a way but I wouldn't know how. I can tell you that the tool worked fine on Mint XFCE when running in a normal shell.
Thanks, I will try to compile it myself and then run it. Your help is much appreciated!
Since I still had my virtual machine going, just thought I'd show what I did to compile on Mint. There are of course other options, not using cmake
or git
, but I think this is easiest:
$ apt install g++ git cmake libssl-dev libsqlite3-dev libdbus-1-dev #installing deps, you may have them already
#[...]
$ git clone https://github.com/bepaald/signalbackup-tools #download the latest version of the tool
#[...]
$ cd signalbackup-tools
$ cmake -B build
#[...]
$ cmake --build build -j$(nproc) # build!
That was it, the executable can then be found in the build
directory, and just running ./build/signalbackup-tools --showdesktopkey
should hopefully be it. Let me know how you get on.
As I am moving from Linux Mint xfce to KDE Plasma, I need to move the Signal key. As described on Reddit, I tried to use your tool to extract the Signal key from my Signal install. Signal works fine, and I am on version 7.28. I installed signalbackup-tools using nix I ran signalbackup-tools via
sudo nix-shell --packages signalbackup-tools -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/master.tar.gz
I tried runningand
What should I do to get the key?