Score:1

Warnings & Errors when launching Emacs from WSL

ru flag

I have a WSL Ubuntu system with systemd enabled. I also configured snap and installed my Emacs using snap.

When I start Emacs from WSL console, I can see the GUI and use Emacs. But I got the following errors and messages.

The Emacs instance seems to be fully functional. So, I think the errors/warnings are not critical. But I wonder if I can fix or disable whatever function triggers them.

(emacs:587975): dbind-WARNING **: 18:37:34.363: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files

(emacs:587975): GLib-GIO-CRITICAL **: 18:37:34.405: g_settings_schema_source_lookup: assertion 'source != NULL' failed
Score:0
vn flag

Short answer:

sudo apt install gvfs at-spi2-core

More detail:

The error messages are due to a few missing D-bus services. Usually, these services would be installed with and started under the Desktop environment (Ubuntu Desktop/Gnome, Xfce4, etc.), but that doesn't happen in WSL. WSL's "desktop" is really Windows itself 1. While it's possible to get a Linux desktop running in WSL2 (see other answers), it's hacky and not needed to answer your particular question.

To fix the warnings, you may have to do a few things. First, the "must have" -- Install the missing services. The services that Emacs is trying to reach, according to the warnings, are:

  • GIO: The Gnome I/O Framework. This is typically a dependency of applications that utilize GVFS (Gnome Virtual Filesystem), a service which allows end-users to access some virtual filesystems in user-space. For example, the "Trashcan" feature in Ubuntu uses GVFS so that, when you delete a file from a GVFS/GIO application, it gets moved to the Trash instead of immediately removed forever. Apparently, Emacs uses GIO and/or GVFS in some way (although I don't know if it uses the Trash function).

  • AT-SPI: The Assisted Technology Service Provider Interface. I'll be honest -- I had to look this one up myself. It's an interface for Accessibility features, such as screen readers, braille, eye-trackers, etc. Without some higher level service (such as a screen-reader), it probably won't be used. But that's the same with GIO, honestly -- Typically it's some higher-level functionality (like GVFS) that uses GIO.

So to resolve the error messages:

sudo apt install gvfs at-spi2-core

This will install GVFS (which will include GIO as a dependency) and AT-SPI.

Personally, I'm seeing a few other errors, but I think those are due to my own configuration issues, especially based on your comment. For now, I'm editing the other error messages out of this answer.


Footnotes

1 Technically, it's Weston, running an RDP/Rails shell that uses the Windows Remote Desktop client to view the application on the Windows desktop. However, for most users, the end-result is simply that it looks like the Linux GUI application is running on the Windows desktop.

David S. avatar
ru flag
I installed the packages, and the errors are gone, and I don't get the `libGL` error or the wrong user permission issue. Do you have the Docker desktop with WSL integration? I remember the `/run/user/UID` issue is caused by the integration.
NotTheDr01ds avatar
vn flag
@DavidS. I do have Docker Desktop, but I after some debugging last night that it's (oddly) the fact that I have `tmux` as my shell in that distribution that is resetting `/run/user/`. Not sure why that is, but I was just coming back to edit that part out of here, since most people won't have that corner case ;-).
David S. avatar
ru flag
Thanks. After I restart my laptop, I also got the `libGL error: MESA-LOADER` error. But it doesn't repeat until reboot.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.