Snap application do not start

Hello there,
I installed snapd and 2 applications; SweetHome3D and Foobar2000.
Non is working . The app appears in the panel for few seconds then vanish.
Info:

 ~>zypper info snapd
Loading repository data...
Reading installed packages...


Information for package snapd:
------------------------------
Repository     : snappy
Name           : snapd
Version        : 2.59.5-lp155.1.1
Arch           : x86_64
Vendor         : obs://build.opensuse.org/system:snappy
Installed Size : 60.9 MiB
Installed      : Yes
Status         : up-to-date
Source package : snapd-2.59.5-lp155.1.1.src
Upstream URL   : https://github.com/snapcore/snapd
Summary        : Tools enabling systems to work with .snap files
Description    : 
    This package contains that snapd daemon and the snap command line tool.
    Together they can be used to install, refresh (update), remove and configure
    snap packages on a system. Snap packages are a novel format based on simple
    principles. Bundle your dependencies, run in a predictable environment, use
    modern kernel features for setting up the execution environment and security.
    The same binary snap package can be installed and used on many diverse systems
    such as Debian, Fedora and OpenSUSE as well as their multiple derivatives.

    This package contains the official build, endorsed by snapd developers. It is
    updated as soon as new upstream releases are made and is designed to live in
    the system:snappy repository.

~> snap list
Name                          Version          Rev    Tracking       Publisher   Notes
bare                          1.0              5      latest/stable  canonicalâś“  base
core18                        20230703         2790   latest/stable  canonicalâś“  base
core20                        20230801         2015   latest/stable  canonicalâś“  base
foobar2000                    2.0              479    latest/stable  mmtrt       -
gnome-3-38-2004               0+git.efb213a    143    latest/stable  canonicalâś“  -
gtk-common-themes             0.1-81-g442e511  1535   latest/stable  canonicalâś“  -
snapd                         2.60.4           20290  latest/stable  canonicalâś“  snapd
sweethome3d-homedesign        6.6              15     latest/stable  jibel       -
wine-platform-7-devel-core20  7.22             24     latest/stable  mmtrt       -
wine-platform-runtime-core20  v1.0             82     latest/stable  mmtrt       -

~> snap find foobar
Name             Version  Publisher     Notes  Summary
foobar2000       2.0      mmtrt         -      foobar2000 is an advanced freeware audio player.
foobar-tbrandon  0.1      tbrandon      -      Foobar foobared foobaring foobar
gambit           0.1.0    kz6fittycent  -      Chess board in your terminal.
~> snap find sweethome
Name                    Version  Publisher  Notes  Summary
sweethome3d-homedesign  6.6      jibel      -      An interior design application to draw house plans & arrange furniture

I get the error

~> snap run foobar2000
Authorization required, but no authorization protocol specified
Starting application..

Thanks for your help

@MrNice:

Which “snapd”?
From where?

Are you using this repository? → <https://download.opensuse.org/repositories/system:/snappy/openSUSE_Leap_15.5/>

Thanks

~> zypper lr -u | grep  snap
13 | snappy     | snappy     | Yes     | (r ) Yes  | Yes     | https://download.opensuse.org/repositories/system:/snappy/openSUSE_Leap_15.5

Yes

@MrNice:

Is there a User Group associated with “snap”?
Is your User a member of that Group?

I can’t find any snap group

~> cat /etc/group
root:x:0:brltty
shadow:x:15:vnc
trusted:x:42:
users:x:100:
messagebus:x:499:
lock:x:498:
systemd-journal:x:497:
systemd-network:x:496:
systemd-timesync:x:495:
kmem:x:494:
tty:x:5:brltty
utmp:x:493:
audio:x:492:brltty,pulse
cdrom:x:491:
dialout:x:490:brltty
disk:x:489:
input:x:488:brltty
lp:x:487:
render:x:486:
sgx:x:485:
tape:x:484:
video:x:483:
nogroup:x:65533:
nobody:x:65534:
mail:!:482:postfix
chrony:!:481:
maildrop:x:59:postfix
postfix:x:51:
kvm:x:36:
audit:x:480:
nscd:x:479:
sshd:!:478:
tftp:x:477:dnsmasq
srvGeoClue:!:476:
pulse-access:x:475:brltty
pulse:!:474:
man:x:62:
daemon:x:2:
wheel:x:473:
polkitd:x:472:
avahi:!:471:
dnsmasq:!:470:
bin:x:1:daemon
rtkit:x:469:
scard:x:468:
brlapi:x:467:brltty
ntadmin:x:71:
nm-openconnect:!:466:
nm-openvpn:!:465:
lightdm:x:464:
vnc:x:463:
brltty:x:462:
at:x:25:
flatpak:!:461:
svn:!:460:
wsdd:!:459:

However I see flatpak group but user 100 (I am) is not in that group. Flatpak is working fine.

Another idea?

A DuckDuckGo search – “Linux snap Authorization required, but no authorization protocol specified” –

Either, you haven’t set the hostname for your system or, if Wayland then, it’s a Wayland issue and, for that snap application you need to set the X11 hostname.
<https://bbs.archlinux.org/viewtopic.php?id=272491>
<https://superuser.com/questions/1721539/terminal-in-xrdp-session-solve-authorization-required-but-no-authorization-pr>
<https://unix.stackexchange.com/questions/209746/how-to-resolve-no-protocol-specified-for-su-user/417233#417233>
<https://stackoverflow.com/questions/73490184/sudo-nautilus-gives-authorization-required-but-no-authorization-protocol-specif>

For example, on this Leap 15.5 X11 system:

 > xhost
access control enabled, only authorized clients can connect
 > xhost + local
xhost:  bad hostname "local"
 > xhost + local:
non-network local connections being added to access control list
 > xhost
access control enabled, only authorized clients can connect
LOCAL:
 > xhost - local:
non-network local connections being removed from access control list
 > xhost
access control enabled, only authorized clients can connect
 >
1 Like

Working.
What I did:

~> xhost + local:
Authorization required, but no authorization protocol specified
non-network local connections being added to access control list

Thank you for your help.

I am back here as the solution above is not permanent after reboot.
I have read here that I should add

...
if [ "$DISPLAY" != "" ]
then
 xhost +host01.example.com +host02.example.com +host03.example.com +host04.example.com
 xhost -host05.example.com
fi
#eof

in /etc/profile file. However as written in this file I should use /etc/profile/local instead as upgrade could delete it.
Questions:
Should I create the file /etc/profile/local?
Is the command right, I will replace the examples by

xhost +local:

Thank you

If I needed this, I would put it in $HOME/.profile

1 Like

Thank you for your help.
This is working fine.
RESOLVED