Gtk-Message: Failed to load module “canberra-gtk-module” Unable to connect to dbus - Sublime text

删除回忆录丶 提交于 2019-11-26 21:57:09

问题


I'm working on a remote server (Ubuntu 14.04) through SSH -X. I have installed Sublime Text and when I try to open it I get

Gtk-Message: Failed to load module "canberra-gtk-module"
Unable to connect to dbus

How do I solve this?


回答1:


As I found at the end of this thread, it appears to be a problem with the libcanberra dependencies, I stumbled upon this and the solution worked for me on Sublime Text 2/Debian 8. So try running this:

sudo apt-get install libcanberra-gtk*

This got rid of the GTK message, but the "Unable to connect to dbus..." stuff disappeared when I executed sublime as a non-root user.




回答2:


sudo apt-get install libcanberra-gtk*

if you run that install it will get 120+ mb of libs, mostly. to get rid of that module error, you only need to install 70k. i fixed the same error with this single package:

sudo apt-get install libcanberra-gtk-module

that should do the trick. if that doesnt work try installing only the canberra libs, you don't need all those Xlibs, or you'd have them already ;) here's just canberra packages apt listed:

libcanberra-gtk-common-dev libcanberra-gtk-dev libcanberra-gtk-module libcanberra-gtk-module-dbg libcanberra-gtk0 libcanberra-gtk0-dbg libcanberra-gtk3-0-dbg libcanberra-gtk3-dev libcanberra-gtk3-module-dbg libcanberra-dev

10 total packages, instead of over 100 packages with that * wildcard. save space, boot time, sys speed etc, always, if you can :)




回答3:


On Debian Stretch:

sudo apt install libcanberra-gtk-module

This will install:

The following additional packages will be installed: libcanberra-gtk0
The following NEW packages will be installed: libcanberra-gtk-module libcanberra-gtk0



来源:https://stackoverflow.com/questions/29058926/gtk-message-failed-to-load-module-canberra-gtk-module-unable-to-connect-to-db

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!