Hello. I am developing my own snap. My program should work for Ubuntu Core. I run tests, I follow instructions, I put mir-kiosk first, then my application, but my application does not start automatically. My application only starts if I write “sudo snap run dalrao-app”, not work “snap run dalrao-app”. Moreover, I noticed that in my directory “/run/user/1000” there are no file “wayland-0”, and folder “snap.dalrao-app”, while they are “/run/user/0”. Tell me what my problem is.
I have tried running my app on Ubunty Desktop 20.04 x84_64 (it’s all right), Ubuntu Core (18 and 20beta) arm64 P4 (The problems that I described above).
link to my snapcraft.yaml - GitHub
link to my app in snap.store - DalRao App (for Mir)
Where are you running this? Ubuntu Core or a desktop? If the latter, this might help:
That seems like you are not running a Wayland server or your snap as your user, but there is a Wayland server running as root. This is the normal situation after installing mir-kiosk on Ubuntu Core.
If that’s what you are doing, your app should be running as a daemon (and as root) the existence of snap.dalrao-app
in /run/user/0
suggests that it does (even if it doesn’t start successfully).
You can get logs of what happens when you app tries to start with snap logs dalrao-app
. Try something like:
snap restart dalrao-app& snap logs -f dalrao-app
Everything is correct. It’s about running on UC. The /run/user/1000 directory does not contain folder “snap.dalrao-app”, unlike the /run/user/0 folder. /run/user/0/snap.dalrao-app exist.
Great. As you can see, the problem is that your application is reporting errors and failing to start. You need to figure out why and fix it.
I found and solved the problem. The fact is that my application uses a call to USB, while I did not use the “removable-media” plugin in the file snapcraft.yaml