Page 1 of 1

How to build the AppDir from snap package of signal-desktop

Posted: Tue Jun 27, 2023 2:54 pm
by watchdog

With:

Code: Select all

curl -H 'Snap-Device-Series: 16' http://api.snapcraft.io/v2/snaps/info/signal-desktop >> signal-desktop.info

you can get the download link of the snap package. Download it using wget. Rename it as signal-desktop.sfs. Click on it and you have access to its content which you can put anywhere in a signal-desktop dir. Copy an icon from the usr/share/icons inside the signal-desktop dir at root of that dir and rename it as .DirIcon and put at root of that dir the following AppRun script (give to it execute permissions):

Code: Select all

#!/bin/sh
LAUNCHDIR="$(dirname "$(readlink -f "$0")")"
export SNAP_LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LAUNCHDIR/command-chain:$LAUNCHDIR/opt/Signal:$LAUNCHDIR/lib:$LAUNCHDIR/usr/lib:$LAUNCHDIR/lib/x86_64-linux-gnu:$LAUNCHDIR/usr/lib/x86_64-linux-gnu"
export LD_LIBRARY_PATH="$LAUNCHDIR/lib/x86_64-linux-gnu:$LAUNCHDIR/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH=$SNAP_LIBRARY_PATH:$LD_LIBRARY_PATH
exec apulse1 $LAUNCHDIR/opt/Signal/signal-desktop --no-sandbox "$@"

apulse1 is the wrapper script of an apulse from Ubuntu which I use for electron based software.

The config file is in /root/.config: you can move it outside the savefile and link it. Click on the dir to launch signal-desktop: working and tested in s15pup64.


Re: How to build the AppDir from snap package of signal-desktop

Posted: Sat Jul 08, 2023 2:00 am
by jamesbond

Thank you for this, @watchdog.
Do you think this will work with other snap packages too?

It would be good to be able to use snap packages without the embroidery that usually comes with it.


Re: How to build the AppDir from snap package of signal-desktop

Posted: Sat Jul 08, 2023 6:52 am
by wiak
jamesbond wrote: Sat Jul 08, 2023 2:00 am

Thank you for this, @watchdog.
Do you think this will work with other snap packages too?

It would be good to be able to use snap packages without the embroidery that usually comes with it.

The answer is basically, yes... In fact watchdog brought this mechanism up earlier in mid-2020 and I responded with detail of how I then used same mechanism for other packages (in my example was from a snap version of cherrrytree notebook): https://forum.puppylinux.com/viewtopic.php?p=868#p868
Yes, I preferred (and detailed) using snapd for initial download, but agreed that curl fetch method also worked as alternative prior to making an sfs out of the result in the example given.

As I said at the time, main idea was provided earlier here: https://unix.stackexchange.com/question ... -with-wget


Re: How to build the AppDir from snap package of signal-desktop

Posted: Sat Jul 08, 2023 8:42 pm
by fredx181

Tried this with Spotify, curl -H 'Snap-Device-Series: 16' http://api.snapcraft.io/v2/snaps/info/spotify >> spotify.info it's not a straight-forward thing as the path to binary and libs are different.

Made the AppRun this;

Code: Select all

#!/bin/sh
LAUNCHDIR="$(dirname "$(readlink -f "$0")")"
export SNAP_LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LAUNCHDIR/command-chain:$LAUNCHDIR/usr/share/spotify:$LAUNCHDIR/lib:$LAUNCHDIR/usr/lib:$LAUNCHDIR/lib/x86_64-linux-gnu:$LAUNCHDIR/usr/lib/x86_64-linux-gnu"
export LD_LIBRARY_PATH="$LAUNCHDIR/lib/x86_64-linux-gnu:$LAUNCHDIR/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH=$SNAP_LIBRARY_PATH:$LD_LIBRARY_PATH
exec $LAUNCHDIR/usr/share/spotify/spotify --no-zygote "$@"

Btw, it depends on the GLIBC version being high enough on your system, e.g. this didn't work for me on Debian Buster (oldoldstable).


Re: How to build the AppDir from snap package of signal-desktop

Posted: Sun Jul 09, 2023 3:26 am
by rockedge

I made a simple SFS out the SNAP Spotify-1.2.11.916 that is 120 mb. Also made one for Signal. Both start and run on F96-CE_4 using SFS-Load

Screenshot(59).jpg
Screenshot(59).jpg (35.4 KiB) Viewed 894 times

Re: How to build the AppDir from snap package of signal-desktop

Posted: Sun Jul 09, 2023 11:24 am
by jamesbond

Good stuff. Thanks @wiak @fredx181 @rockedge.


Re: How to build the AppDir from snap package of signal-desktop

Posted: Sun Jul 09, 2023 2:10 pm
by rockedge

Both SFS's are available for download and testing on https://rockedge.org/kernels under SFS or direct:

Signal-6.20.0.sfs 127 mb

Spotify-1.2.11.916.sfs 120 mb

Screenshot(60).jpg
Screenshot(60).jpg (22.04 KiB) Viewed 858 times

Re: How to build the AppDir from snap package of signal-desktop

Posted: Mon Jul 10, 2023 4:34 pm
by jamesbond

Thanks @rockedge. I tested signal SFS under Fatdog64 900 and it works (can link/send/receive text messages). I didn't test the spotify SFS as I don't have an account there.


Re: How to build the AppDir from snap package of signal-desktop

Posted: Mon Jul 10, 2023 5:32 pm
by rockedge

I was able to use the SFS-Load mechanism in KLV-Airedale-sr2 to activate the Spotify and Signal SFS's and both work after slight modification with the spotify.desktop file by using the one in /usr/share/spotify/spotify.desktop instead of /usr/share/applications/spotify.desktop.

Signal started smoothly and linked/send/received text.


Re: How to build the AppDir from snap package of signal-desktop

Posted: Mon Jan 01, 2024 7:00 am
by watchdog

signal-desktop-6.42.1-x86_64.sfs:

https://drive.google.com/file/d/1BGWCKI ... sp=sharing

Working in S15Pup64. From PcLinuxOs.