我在我的 Windows 10 机器上使用 Ubuntu 18.04 作为 Linux 的 Windows 子系统。
我已经安装了 gedit
没有任何错误或警告。
但是每当我尝试使用命令 gedit something
(这里是文件名)
我收到此错误:
Unable to init server: Could not connect: Connection refused
(gedit:48): Gtk-WARNING **: 21:03:26.729: cannot open display:
原文由 Ayush Basak 发布,翻译遵循 CC BY-SA 4.0 许可协议
您需要 X 服务器来运行图形应用程序,例如
gedit
。我在我的 Windows 桌面上使用 VcXsrv 或 Xming ,它们都非常小且易于安装,但还有其他服务器,例如 Cygwin/X 。VcXsrv/Xming 的简短说明:
我的问题是 gedit 首选项中的某些复选框不起作用(dconf 错误,我不在乎),但除此之外编辑器可用。
有关的: