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

Moderator: Forum moderators

Post Reply
watchdog
Posts: 85
Joined: Fri Dec 13, 2019 4:32 pm
Has thanked: 15 times
Been thanked: 12 times

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

Post 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.

jamesbond
Posts: 539
Joined: Tue Aug 11, 2020 3:02 pm
Location: The Pale Blue Dot
Has thanked: 73 times
Been thanked: 292 times

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

Post 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.

User avatar
wiak
Posts: 3627
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 994 times
Contact:

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

Post 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

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
fredx181
Posts: 2560
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 273 times
Been thanked: 992 times
Contact:

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

Post 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).

User avatar
rockedge
Site Admin
Posts: 5711
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1990 times
Been thanked: 2097 times
Contact:

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

Post 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 832 times
jamesbond
Posts: 539
Joined: Tue Aug 11, 2020 3:02 pm
Location: The Pale Blue Dot
Has thanked: 73 times
Been thanked: 292 times

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

Post by jamesbond »

Good stuff. Thanks @wiak @fredx181 @rockedge.

User avatar
rockedge
Site Admin
Posts: 5711
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1990 times
Been thanked: 2097 times
Contact:

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

Post 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 796 times
jamesbond
Posts: 539
Joined: Tue Aug 11, 2020 3:02 pm
Location: The Pale Blue Dot
Has thanked: 73 times
Been thanked: 292 times

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

Post 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.

User avatar
rockedge
Site Admin
Posts: 5711
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1990 times
Been thanked: 2097 times
Contact:

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

Post 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.

watchdog
Posts: 85
Joined: Fri Dec 13, 2019 4:32 pm
Has thanked: 15 times
Been thanked: 12 times

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

Post by watchdog »

signal-desktop-6.42.1-x86_64.sfs:

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

Working in S15Pup64. From PcLinuxOs.

Post Reply

Return to “Browsers”