[英]Can't get remote desktop to open in x11 window through ssh
I am having trouble getting an x11 window of the desktop of a remote machine. 我无法获取远程计算机桌面的x11窗口。
I am VPN'ed into a local network and I can get into the computer I want through the command line using: 我已将VPN连接到本地网络,并且可以使用以下命令通过命令行进入所需的计算机:
ssh -X computer_name -l login_name
I thought that the -X would cause the remote machine's desktop to pop up in x11, and although x11 launched on my mac, I did not get an x11 window of the machines desktop. 我以为-X会导致远程计算机的桌面在x11中弹出,尽管x11在我的mac机上启动,但我没有获得计算机桌面的x11窗口。
I can get things like emacs to run and pop up in new x11 windows, but I want to get the whole desktop going. 我可以让emacs之类的东西在新的x11窗口中运行并弹出,但我想让整个桌面正常运行。
I am running Mac OS 10.7, and the remote machine is running linux. 我正在运行Mac OS 10.7,并且远程计算机正在运行linux。
Any help would be appreciated. 任何帮助,将不胜感激。
Figured it out. 弄清楚了。
after the command 命令后
ssh -X computer_name -l login_name
I had to start a gnome-session 我不得不开始一个侏儒会议
gnome-session >&/dev/null &
this gave me the linux desktop in an x11 window. 这给了我x11窗口中的linux桌面。
ssh -X
(or -Y
) only tunnels the connection to your local X server for the applications started on the remote machine from your SSH session. 对于从SSH会话在远程计算机上启动的应用程序,
ssh -X
(或-Y
)仅将连接建立到本地X服务器的隧道 。 It cannot do anything about the desktop environment that is running on the remote machine's own X server. 它不能对远程计算机自己的X服务器上运行的桌面环境做任何事情。
You're probably looking for something like VNC , not X11 forwarding. 您可能正在寻找VNC之类的东西,而不是X11转发。
X-Window allows you to run programs remotely, and have their windows appear locally on your machine. X-Window允许您远程运行程序,并使它们的窗口本地显示在计算机上。 As you stated, you were able to get this working properly.
如您所述,您能够使其正常工作。 If you want to see the entire linux desktop on your mac, you will want to use a program like VNC.
如果要在Mac上查看整个linux桌面,则需要使用VNC之类的程序。
You will need to run vncserver on your linux machine, then you can use any of a number of VNC clients on your mac to see the entire linux desktop. 您将需要在Linux机器上运行vncserver,然后可以在mac上使用任何多个VNC客户端来查看整个linux桌面。 For example, Chicken of the VNC .
例如, VNC的Chicken 。
如果希望将远程Linux桌面显示在Mac上的窗口中,则应在Mac上使用(假设VPN已设置并正在运行,您可以访问Linux服务器,并且已在其中配置XDMCP):
$ Xephyr -query <linux-ip-or-name> :1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.