bash 无法连接到 Mir:无法连接到服务器套接字:没有此类文件或目录无法初始化服务器:
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/51453081/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Failed to connect to Mir: Failed to connect to server socket: No such file or directory Unable to init server:
提问by Yanshu Gupta
I have installed ubuntu terminal in window 10. It's work fine but when I install gedit or any other application then these applications installed successfully but I can not open it. Whenever I tried it gives me the Error mentioned below.
我已经在窗口 10 中安装了 ubuntu 终端。它工作正常,但是当我安装 gedit 或任何其他应用程序时,这些应用程序安装成功,但我无法打开它。每当我尝试时,它都会给我下面提到的错误。
"Failed to connect to Mir: Failed to connect to server socket: No such file or directory Unable to init server: Could not connect: Connection refused (gedit:4821): Gtk-WARNING **: cannot open display:"
“无法连接到 Mir:无法连接到服务器套接字:没有这样的文件或目录无法初始化服务器:无法连接:连接被拒绝(gedit:4821):Gtk-警告**:无法打开显示:”
回答by Poshi
In the description of "Ubuntu terminal", it says: "run Ubuntu command line utilities". gedit
is not a command line utility. It is a graphical utility, so it is not supported out of the box.
在“Ubuntu 终端”的描述中,它说:“运行 Ubuntu 命令行实用程序”。gedit
不是命令行实用程序。它是一个图形实用程序,因此不支持开箱即用。
Your hope is that the final error is cannot open display
. I bet that if you provide a suitable display in your computer, the utility will show up. Search for a X-server for your windows machine and try with the X-server installed.
您希望最终的错误是cannot open display
. 我敢打赌,如果您在计算机中提供合适的显示器,该实用程序就会显示出来。为您的 Windows 机器搜索 X-server 并尝试安装 X-server。
This could help: https://www.howtogeek.com/261575/how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/
这可能会有所帮助:https: //www.howtogeek.com/261575/how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/