Background:
Mac via [terminal]SSH login Linux and display Linux graphics on Mac
MAC Host ip:10.2.1.1
Linux host ip:192.168.1.1
Description
To SSH access and display the Linux host graphics, here, first use the Xquartz tool. Second, you need to tell the Linux host where to display the graph (display), and also open access on the Mac side (Xhost)
Steps:
1-mac Installing Xquartz 2.7.4
2-Start Xquartz, select [Application]->[xterm]
3-Link Linux via this xterm
SSH [email protected]
4-Login to the Linux host 192.168.1.1, want to be displayed, be sure to define, where to be displayed, execute the command
Export display=10.2. 1.1:0.0 //10.2.1.1 for MACIP so import as temporary variables, each time need to import, if the permanent need to write to the startup shell,
Graphics that represent a Linux host can be displayed on the client 10.2.1.1
5-mac host wants to display the Linux host client, requires authorization, the authorization command is:
Xhost +
6-Execute the Linux graphics program and display it on the MAC host
Start a graphics program in xterm and display the results in your Mac
Knowledge Supplement:
About Xhost
Xhost is used to control access to the X server
Xhost + // is to enable all users to access Xserver. // enables users on the IP to access xserver. Xhost + nis:[email protected] // enable NIS user on domain to access Xhost + inet:[email protected] / / enable inet users on domain to access
// Quick reference-xhost Xhost + hostname //Adds hostname to X server access control list. Xhost-hostname //removes hostname from X server access control list. Xhost + //Turns off acccess control (all remote hosts has access to X server) xhost - //Turns access control back on.
Resources:
Http://download.chinaunix.net/download/0014000/13296.shtml
2-display,linux Environment variables
Export display=10.2.1.1:0.0
display=< host name or IP address >:< monitor number >