想在moba xterm中打开gedit,firefox等带GUI的程序,如:
$ firefox
报错:
No protocol specified
Unable to init server: Could not connect: Connection refused(gedit:159060): Gtk-WARNING **: 14:13:21.902: cannot open display: :2.0
解决:
你在使用命令行建立ssh连接的时候,将
ssh abc@server:port
命令改为
ssh -X abc@server:port
即可