Opensue solves the problem of can't open display in vncviewer.

Source: Internet
Author: User

First, we will introduce the DISPLAY variable:

The display environment variable format is host: NUMA. Numb. Host indicates the host name or IP address of the xserver,
The image will be displayed on this host. It can be a Linux/Unix machine that has started the graphic interface, or an exceed installation,
X-deep/32 and other Windows platforms run xserver Windows machines. If the host is empty, it indicates that xserver runs on the local machine,
In addition, the graphical program (xclient) connects to the xserver using UNIX socket instead of TCP,
NUMA is the connection port minus the value of 6000. If NUMA is 0, it means to connect to Port 6000.
When the socket method is connected, it indicates the path of the connected UNIX socket. If it is 0, it means to connect to/tmp/. X11-unix/x0.
Numb is almost always 0.

 

To solve the can't open display problem, you only need to enter the following command in terminal:

Export display =: 0.0

You can.

 

You can write this command to. bashrc to save the trouble of writing this command at startup.

 

PS: Introduction to the. bashrc File

/Etc/profile:
This file sets the environment letter for each user of the system.
When the user logs on for the first time, the file is executed.
And collect shell settings from the configuration file in the/etc/profile. d directory.
/Etc/bashrc:
Execute this file for every user running bash shell. When bash
When the shell is opened, the file is read.
~ /. Bash_profile:
Each user can use this
File input is dedicated to the shell information used by the user. When the user logs on,
The file is executed only once! By default, it sets some environment variables to execute the user's. bashrc file.
~ /. Bashrc:
This file contains your Bash
Bash information of the shell. When you log on and each time you open a new shell
The file is read.
~ /. Bash_logout:
When
Execute this file every time you exit the system (exit bash shell.

In addition, the variables (global) set in/etc/profile can act on any
And ~ The variables (local) set in/. bashrc can only inherit the variables in/etc/profile. They are "Parent-Child" relationships.

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.