SSH登录之后运行命令报错的解决办法-- Failed to connect to Mir: Failed to connect to server socket: No such file or d...

问题描述:

Failed to connect to Mir: Failed to connect to server socket: No such file or directory

解决方案:

在 ssh localhost命令上加参数-X

即:

 ssh -X localhost

 

-----------------------------------------------

it"s linux but i solved the problem thanks anyway , it"s bec of wireshark graphical display on the remote computer i had to add a command for it to work !

I asked not just about Linux, but specifically about Ubuntu Linux, because "Mir" is the name of a display server for Linux, being developed for Ubuntu, as a replacement for X11.
The error probably means you're running it on an Ubuntu machine, but not from a GUI session on that machine, and it's therefore failing to connect to the Mir server on that machine. Presumably the command you added was one to try to get it to connect via X11 to the machine on which you had the GUI session.
i just added -X to my ssh labpc1 /directory/wiresharkScript.sh and it worked ..is that correct or it's not the best solution ?

I.e, you did ssh -X labpc1 /directory/wiresharkScript.sh?
If so, my guess is that the -X flag, by enabling X11 forwarding, causes the DISPLAY environment variable to be set, so that it refers to the machine from which you're doing the ssh, when wiresharkScript.sh is run, causing Wireshark to be run with the DISPLAY environment set.
This probably means that the Mir/X11 client libraries that Wireshark uses - or, rather, that GTK+, the GUI toolkit Wireshark is using, uses - will, instead of trying to contact the local Mir server (which fails in the fashion you reported), try to contact the X11 server on the machine from which you did the ssh, so that it opens windows on that machine.

 

  
  
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值