OpenSuse Tumbleweed Cannot start any snap

Hello!

I have installed snapd according to official how-to.
Then installed two snaps: telegram-desktop and notepadqq.

Neither can really run.

For example, telegram-desktop output (start):
No protocol specified
QXcbConnection: Could not connect to display :0.0

I am sure I am doing something wrong, because cannot be that everybody using it and on opensuse Tumbleweed 20190904 it is not working at all.

Can you please help me to check together some obvious staff, from simple to complex together?

Lets focus on the telegram-desktop snap to begin with. Can you run snap connections telegram-desktop and paste the output here, please? This will let us see if the desktop and x11 interfaces are correctly connected (they are supposed to automatically connect, but sometimes things go awry). Another useful pair of commands to post the output of are snap version and snap changes.

Than you Deniel!

Here is the output:

Interface Plug Slot Notes
content[gtk-3-themes] telegram-desktop:gtk-3-themes gtk-common-themes:gtk-3-themes -
content[icon-themes] telegram-desktop:icon-themes gtk-common-themes:icon-themes -
content[sound-themes] telegram-desktop:sound-themes gtk-common-themes:sound-themes -
desktop telegram-desktop:desktop :desktop -
desktop-legacy telegram-desktop:desktop-legacy :desktop-legacy -
gsettings telegram-desktop:gsettings :gsettings -
home telegram-desktop:home :home -
network telegram-desktop:network :network -
network-bind telegram-desktop:network-bind :network-bind -
network-manager telegram-desktop:network-manager - -
pulseaudio telegram-desktop:pulseaudio :pulseaudio -
removable-media telegram-desktop:removable-media - -
unity7 telegram-desktop:unity7 :unity7

snap 2.39.1-3.9
snapd 2.39.1-3.9
series 16
opensuse-tumbleweed 20190904
kernel 5.2.11-1-default

ID Status Spawn Ready Summary
1 Done today at 09:49 MSK today at 09:49 MSK Initialize system state
2 Done today at 09:51 MSK today at 09:54 MSK Install “telegram-desktop” snap
3 Done today at 09:51 MSK today at 09:51 MSK Initialize device
4 Done today at 10:15 MSK today at 10:16 MSK Install “notepadqq” snap
5 Done today at 10:50 MSK today at 10:50 MSK Remove “notepadqq” snap

Hope to brake through with the help of community!

I have to mention that I have notebook with nvidia optimus technology and use prime-select.

Well to my mind this is pretty standart thing, once done “sudo prime-select intel2” I am using only intel card.

All apps are launching ok from terminal, only problem with snaps…

I believe this may be https://bugs.launchpad.net/snapd/+bug/1842615

I will cherry pick this fix into the next update and release 2.41 to tumbleweed today. I will ping you after the update to see if that helps, okay?

Hello! Thank you for your reply.

Can you please tell me what I need to update and test? Maybe it can help other people with same problem…

I’m running into the same thing. Is there a command I can run to see if that fixes the issue?

I’ve released 2.41 but I didn’t cherry pick this fix. I’m doing this now.

Hi! Thank you for an update!

Once We can test it on tumbleweed, please tell me, I will do all needed to test and report back!
=)

It’s building now on https://build.opensuse.org/project/show/system:snappy so once that build finishes you should be able to zypper dup to update.

EDIT: The patch is included in 2.41-2 witch is now available in the repository.

Thanks you! I look forward to this!

1 Like

I have updated machine to opensuse tumbleweed 20191002 snapshot.

Now have latest snap but still have this:

Run command 'snap run telegram-desktop'

snap run telegram-desktop
No protocol specified
QXcbConnection: Could not connect to display :0.0
Telegram[0x13b31aa]
Telegram[0x1c38aa3]
Telegram(_ZN15google_breakpad16ExceptionHandler12GenerateDumpEPNS0_12CrashContextE+0x382)[0x205fe2e]
Telegram(_ZN15google_breakpad16ExceptionHandler12HandleSignalEiP9siginfo_tPv+0x1c3)[0x205fa09]
Telegram(_ZN15google_breakpad16ExceptionHandler13SignalHandlerEiP9siginfo_tPv+0x1ab)[0x205f721]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f98cf542390]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7f98cec7d428]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f98cec7f02a]
Telegram[0xb633c3]
Telegram(_ZN14QXcbConnectionC2EP19QXcbNativeInterfacebjPKc+0xee6)[0x2495926]
Telegram(_ZN15QXcbIntegrationC1ERK11QStringListRiPPc+0x2d1)[0x2466e31]
Telegram[0x2465bdd]
Telegram[0x2c55e03]
Telegram[0x29a6f7f]
Telegram[0x29a7fa5]
Telegram[0x2f17d31]
Telegram[0x29a9f4f]
Telegram[0x2668759]
Telegram(_ZN4Core7SandboxC1EN3gsl8not_nullIPNS_8LauncherEEERiPPc+0x36)[0x1c21166]
Telegram(_ZN4Core8Launcher18executeApplicationEv+0x5e)[0x1c3430e]
Telegram(_ZN4Core8Launcher4execEv+0x47)[0x1c34427]
Telegram(main+0x32)[0xb95a42]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f98cec68830]
Telegram(_start+0x29)[0xba5a69]

I also have that problem. Snaps with a GUI do not run because they cannot connect to :0. (I hope you don’t mind that I will be using chromium instead of telegram-desktop). The message is:

/snap/bin/chromium
    No protocol specified
    [4520:4520:0616/011650.598989:ERROR:browser_main_loop.cc(1473)] Unable to open X display.

If I execute xhost +local:, so that local connections are always accepted by X, chromium runs normally.

I have checked that from inside the the snap the DISPLAY and XAUTHORITY variables are set properly and the .Xauthority file is readable:

snap run --shell chromium
        bash: /etc/profile.d/ls.bash: Permission denied
        bash: /etc/profile.d/alias.bash: Permission denied
        bash: /etc/profile.d/bash_completion.sh: Permission denied
        bash: /etc/bash_command_not_found: Permission denied
    echo "$DISPLAY"
        :0
    echo "$XAUTHORITY"
        /home/iggy/.Xauthority
    cat /home/iggy/.Xauthority
        *Content of the file*

I am also using a laptop with an Intel graphics chip (the regular modesetting driver) and an Nvidia graphics card (proprietary nvidia driver), and using prime-select (package suse-prime) to set the graphics card that should be used. However, I have rolled back to a file system snapshot from before I installed the proprietary drivers and suse-prime and confirmed that the snap doesn’t work with the default OS setup either.

Also here are the connections of the snap:

Summary
Interface                 Plug                               Slot                            Notes
audio-playback            chromium:audio-playback            :audio-playback                 -
audio-record              chromium:audio-record              :audio-record                   -
browser-support           chromium:browser-sandbox           :browser-support                -
camera                    chromium:camera                    :camera                         -
content[gtk-3-themes]     chromium:gtk-3-themes              gtk-common-themes:gtk-3-themes  -
content[icon-themes]      chromium:icon-themes               gtk-common-themes:icon-themes   -
content[sound-themes]     chromium:sound-themes              gtk-common-themes:sound-themes  -
cups-control              chromium:cups-control              :cups-control                   -
desktop                   chromium:desktop                   :desktop                        -
gsettings                 chromium:gsettings                 :gsettings                      -
home                      chromium:home                      :home                           -
joystick                  chromium:joystick                  :joystick                       -
mount-observe             chromium:mount-observe             -                               -
mpris                     -                                  chromium:mpris                  -
network                   chromium:network                   :network                        -
network-bind              chromium:network-bind              :network-bind                   -
network-manager           chromium:network-manager           -                               -
opengl                    chromium:opengl                    :opengl                         -
password-manager-service  chromium:password-manager-service  -                               -
personal-files            chromium:chromium-config           :personal-files                 -
pulseaudio                chromium:pulseaudio                -                               -
raw-usb                   chromium:raw-usb                   -                               -
removable-media           chromium:removable-media           -                               -
screen-inhibit-control    chromium:screen-inhibit-control    :screen-inhibit-control         -
u2f-devices               chromium:u2f-devices               :u2f-devices                    -
unity7                    chromium:unity7                    :unity7                         -
upower-observe            chromium:upower-observe            :upower-observe                 -
x11                       chromium:x11                       :x11                            -

I haven’t yet figured out how to get proper debug messages from X about the rejected connection. If you have any tips on that or you need further information, please tell me.

Two things I forgot: I have tried installing chromium in devmode and it didn’t help.
Also, after installing a snap I get the following message:

Warning: /snap/bin was not found in your $PATH. If you've not restarted your session since you
         installed snapd, try doing that. Please see https://forum.snapcraft.io/t/9469 for more
         details.

But in fact /snap/bin is inside my PATH. I don’t know if that message could be relevant to this issue in any way.

This is caused by sudo resetting $PATH to some known set of locations. Unfortunately we have no way of extending this. Recently, we have merged a change that will no longer show when warning when snap install is invoked under sudo.

Ok thanks, good to know. I just wanted to let you guys know in case the environment scrubbing has some kind of impact on the X11 connection (even though the DISPLAY and XAUTHORITY variables seem to be set correctly inside the snap).