Unable to run snap installed Slack inside App Qube

So I am trying to open Slack from within the App Qube where I installed it using snap.

When I try to launch from the Qube’s application panel, nothing happens. There is no output when I run it via the terminal using the command slack.

When I run snap run --strace slack --classic, I see the following in the output:

[pid  5587] access("/home/user/snap/slack/149/.config/Slack", F_OK) = -1 EACCES (Permission denied)
[pid  5587] stat("/", {st_mode=S_IFDIR|0755, st_size=520, ...}) = 0
[pid  5587] stat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid  5587] stat("/home/user", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
[pid  5587] stat("/home/user/snap", 0x7ffc436a0280) = -1 EACCES (Permission denied)
[pid  5587] mkdir("/home/user/snap", 0700) = -1 EACCES (Permission denied)
[pid  5587] stat("/home/user/snap", 0x7ffc436a0280) = -1 EACCES (Permission denied)
[pid  5587] access("/home/user/snap/slack/149/.config/chromium", F_OK) = -1 EACCES (Permission denied)
[pid  5587] stat("/", {st_mode=S_IFDIR|0755, st_size=520, ...}) = 0
[pid  5587] stat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid  5587] stat("/home/user", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
[pid  5587] stat("/home/user/snap", 0x7ffc436a02b0) = -1 EACCES (Permission denied)
[pid  5587] mkdir("/home/user/snap", 0700) = -1 EACCES (Permission denied)
[pid  5587] stat("/home/user/snap", 0x7ffc436a02b0) = -1 EACCES (Permission denied)

Not sure how to fix the permissions since I notice in the Devices tab on the panel that there are block devices in /var/lib/snapd that are (seemingly) used by the installed snaps.

The qube is based on Debian that comes with Qubes 4.2 and is up to date with the latest changes from the Qubes team

What are /home/user/snap permissions?

ls -la /home/user/snap
$ ls -la /home/user/snap/
total 20
drwx------  5 user user 4096 Jun 20 19:58 .
drwx------ 15 user user 4096 Jun 20 19:54 ..
drwxr-xr-x  4 user user 4096 Jun 20 19:58 slack

P. S: apologies for the delayed response. Got sucked into other stuff :upside_down_face:

1 Like

I originally installed snap like so:

$ sudo apt install snapd qubes-snapd-helper

So it seems I would have to install snapd using snap itself as mentioned by this comment

When I try to do that, I get the following:

$ snap install snapd
error: cannot install "snapd": persistent network error: Post
       "https://api.snapcraft.io/v2/snaps/refresh": dial tcp: lookup api.snapcraft.io on
       10.139.1.2:53: dial udp 10.139.1.2:53: connect: network is unreachable

Are you trying to install it in template?
I think you need to install it in app qube.
You can also use fedora template instead of debian. Fedora template has snapd 2.63.

I prefer to use Debian unfortunately. Will wait for the templates to get updated then. Thanks.

So here you were right. I did the --refresh command within the app qube and it worked but I am still getting the permission error:

[pid  2408] uname({sysname="Linux", nodename="App-Qube", ...}) = 0
[pid  2408] access("/home/user/snap/slack/149/.config/Slack", F_OK) = -1 EACCES (Permission denied)
[pid  2408] stat("/", {st_mode=S_IFDIR|0755, st_size=520, ...}) = 0
[pid  2408] stat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid  2408] stat("/home/user", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
[pid  2408] stat("/home/user/snap", 0x7ffcab0c8260) = -1 EACCES (Permission denied)
[pid  2408] mkdir("/home/user/snap", 0700) = -1 EACCES (Permission denied)
[pid  2408] stat("/home/user/snap", 0x7ffcab0c8260) = -1 EACCES (Permission denied)
[pid  2408] access("/home/user/snap/slack/149/.config/chromium", F_OK) = -1 EACCES (Permission denied)
[pid  2408] stat("/", {st_mode=S_IFDIR|0755, st_size=520, ...}) = 0
[pid  2408] stat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid  2408] stat("/home/user", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
[pid  2408] stat("/home/user/snap", 0x7ffcab0c8290) = -1 EACCES (Permission denied)
[pid  2408] mkdir("/home/user/snap", 0700) = -1 EACCES (Permission denied)
[pid  2408] stat("/home/user/snap", 0x7ffcab0c8290) = -1 EACCES (Permission denied)
[pid  2408] write(30, "\1\0\0\0\0\0\0\0", 8) = 8
[pid  2408] write(30, "\1\0\0\0\0\0\0\0", 8) = 8
[pid  2408] write(2, "\33[1m\33[47m\33[31mA JavaScript error"..., 1043) = 1043
[pid  2408] access("/home/user/snap/slack/149/.config/Slack", F_OK) = -1 EACCES (Permission denied)
[pid  2408] stat("/", {st_mode=S_IFDIR|0755, st_size=520, ...}) = 0
[pid  2408] stat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid  2408] stat("/home/user", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
[pid  2408] stat("/home/user/snap", 0x7ffcab0ca370) = -1 EACCES (Permission denied)
[pid  2408] mkdir("/home/user/snap", 0700) = -1 EACCES (Permission denied)
[pid  2408] stat("/home/user/snap", 0x7ffcab0ca370) = -1 EACCES (Permission denied)
[pid  2408] access("/home/user/snap/slack/149/.config/chromium", F_OK) = -1 EACCES (Permission denied)
[pid  2408] stat("/", {st_mode=S_IFDIR|0755, st_size=520, ...}) = 0
[pid  2408] stat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid  2408] stat("/home/user", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
[pid  2408] stat("/home/user/snap", 0x7ffcab0ca3a0) = -1 EACCES (Permission denied)
[pid  2408] mkdir("/home/user/snap", 0700) = -1 EACCES (Permission denied)
[pid  2408] stat("/home/user/snap", 0x7ffcab0ca3a0) = -1 EACCES (Permission denied)
[pid  2408] --- SIGTRAP {si_signo=SIGTRAP, si_code=SI_KERNEL, si_addr=NULL} ---

It seems that debian will use the snapd version installed from apt package and then run the snapd version installed using snap.
So I guess that you’re already using snapd 2.63.
Then maybe there is some other issue with slack.

I’ve installed Slack for a test and I’ve noticed the notification from it of the update available or something like this so I guess that the Slak is running but it’s just not visible.
Maybe it’s a Qubes OS issue but I’m not sure.

Yes I’ve also seen something similar. I have shutdown the qube and I’m going to try and run it from the qube app menu

Edit: I should try to do snap refresh slack and see if that helps also.

So I notice that when I run Snap installed applications, I get block devices that are generated i.e.

/var/lib/snapd/snaps/core18_2829.snap and /var/lib/snapd/snaps/cgnome-42-2204_176.snap which are attached to the App Qube. I ran ls in te associated directory and this is what I found:

$ ls -l /var/lib/snapd/snaps
total 1590600
-rw------- 2 root root      4096 May 10 12:23 bare_5.snap
-rw------- 1 root root  58363904 Jun 26 16:13 core18_2829.snap
-rw------- 2 root root 228999168 May 10 12:24 gnome-3-34-1804_93.snap
-rw------- 2 root root 529625088 May 10 12:27 gnome-42-2204_176.snap
-rw------- 2 root root  96141312 May 10 12:24 gtk-common-themes_1535.snap
drwxr-xr-x 2 root root      4096 May 18  2023 partial
-rw------- 1 root root 123695104 Jun 15 17:28 slack_149.snap
-rw------- 1 root root 125300736 Jun 27 12:50 slack_153.snap
-rw------- 2 root root  40615936 May 10 12:22 snapd_21465.snap
-rw------- 1 root root  40714240 Jun 15 17:26 snapd_21759.snap
-rw------- 2 root root   1986560 Jun 20 20:25 strace-static_90.snap

Could it be that if I change the permissions for the directory, Slack would be able to work?

Edit: also Slack is not visible though I’ve clicked on its icon a couple of times at this point

No, it shouldn’t be needed.

1 Like