GUI snaps can't connect to display in VNC

If I boot into the systemd multi-boot.target (instead of graphical.target), I can’t get the snap-store GUI to start under a VNC server (Xtigervnc). If I reboot into graphical.target, I can start snap-store both under the DM as well as the standalone vncserver. So, it seems like something snap-store is doing depends on the system being booted into graphical.target.

Maybe this can be resolved so that snap-store is usable on a headless system?

The only output I see from snap-store is this:

$ snap-store --verbose
No protocol specified
Unable to init server: Could not connect: Connection refused
17:32:59:0072 Gtk cannot open display: :1.0

What is the multi-boot.target you talk of?

Assuming you meant multi-user.target I was able to reproduce the issue you describe.

Interestingly it doesn’t seem to be related to confinement, as I installed the snap in devmode and got the same issue.

It’s not related to the systemd boot target, though. Booting into graphical.target, switching to the text console and logging in there and starting a vnc server ends with the same error.

It’s not just the snap-store snap, either: installing xbill-xaw you also get a “cannot open display”.

Something for @zyga to look into in the morning, perhaps.

Yes, sorry, I meant multi-user.target. Too many foreign concepts tumbling around in my brain!

1 Like