Ghost Desktop Issue with Snap, AppArmor and Ubuntu 18.10

a month ago

So today I rebuilt my desktop operating systems.  I just ended up with too much fragmentation amongst disk partitions that I created over the last six months and wanted to clean it up.  I also moved from 18.04 to 18.10, which I'm finding quite pleasent.  18.10 was

So today I rebuilt my desktop operating systems.  I just ended up with too much fragmentation amongst disk partitions that I created over the last six months and wanted to clean it up.  

I also moved from 18.04 to 18.10, which I'm finding quite pleasent.  18.10 was a problem not too many months ago with getting .Net Core to install, so I pass on it until then.  I tried it yesterday on an 18.10 virtual machine and it worked fine :)

I like to write my blog posts using Ghost Desktop, as this blog run on Ghost on an Azure Linux VM, and I like the desktop more than using the browser version.  But when installing it, I ended up with it not running, and the diagnosis was not really simple.

You can install Ghost Desktop using the store's GUI, as seen here:

Clicking install will go and install the app as a Snap application, which is quite a cool way of deploying applications with all of their inherent dependencies.  They are kind of like Docker containers as everything is self contained.  Very nice.

But this had an issue.  The app would come up with the login screen, but after entering credentials it would just hang:

So I tried this from bash and got the following:

$ ghost-desktop
[14:02:21.108] [info] 
 ⚡️  Welcome to Ghost 1.7.0  👻

[14:02:21.113] [info] Logging to: /home/mike/snap/ghost-desktop/71/.config/ghost/log.log
[14:02:22.327] [info] Blog rkcf7fds (http://smac.io/ghost/) updated. Blogs known to main thread: 1
[14:02:22.469] [info] Updater: Checking for update
[14:02:22.470] [info] Updater: Running version 1.7.0
[14:02:22.470] [info] Updater: Using https://update.electronjs.org/tryghost/ghost-desktop/linux/1.7.0
[14:02:22.470] [info] Trying to reach https://update.electronjs.org/tryghost/ghost-desktop/linux/1.7.0
[14:02:22.642] [info] gh-instance-host: WebView The Social, Mobile, Analytic and Cloud Blog: Rendered, now setting up listeners
[14:02:22.643] [info] Main window ready: true
[14:02:22.777] [info] Saving configuration to /home/mike/snap/ghost-desktop/71/.config/ghost-desktop/ghost.json
[14:02:23.182] [info] Reached https://update.electronjs.org/tryghost/ghost-desktop/linux/1.7.0
[14:02:23.182] [info] Updater: Not supported, because Linux or MAS
[14:02:23.183] [info] Updater: Environment not supported, bailing
[14:02:23.389] [info] gh-instance-host: WebView The Social, Mobile, Analytic and Cloud Blog:  did-finish-loading
** Message: 14:02:23.401: Remote error from secret service: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.278" (uid=1000 pid=91336 comm="/snap/ghost-desktop/71/usr/lib/Ghost/Ghost --type=" label="snap.ghost-desktop.ghost-desktop (enforce)") interface="org.freedesktop.Secret.Service" member="OpenSession" error name="(unset)" requested_reply="0" destination=":1.24" (uid=1000 pid=80346 comm="/usr/bin/gnome-keyring-daemon --daemonize --login " label="unconfined")

So, after much research and many attempts, the only solution I found was to uninstall the ghost-desktop snap (with sudo snap remove ghost-desktop) and then reinstall it using the --devmode flag:

$ sudo snap install ghost-desktop --devmode

And then it runs fine!

So what was the issue?  I'm not totally sure, but appears to be a combination of the snap package, AppArmor, and the gnome keyring.  Apparently the ghost-desktop package was not configured to be able to communicate with the gnome keyring to store the username and password.

I'm sure there's some way of figuring this out, but I could only resolve it with the process of uninstalling and reinstall from bash using the --devmode flag.  If I figure out more, I'll write it up...

Comments