Mac SSH login Linux and display Linux graphics

Source: Internet
Author: User
Tags ssh access

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 >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.