Linux settings Xhost Method Step __linux

Source: Internet
Author: User
. When setting up Xhost related programs, System prompts

Xhost access control disabled, clients can connect to any host

The first step: using Root to log Linux, start VNC service;
Step two: Based on the VNC port, set export Display=localhost:1 (1 means VNC started on the first TTY)
Step Three: Execute Xhost + and prompt "Access control disabled, clients can connect to any host" is correct.

Switch to an Oracle user to start Setup now

Start

If you use a graphical interface connection between Linux operating systems, you will also use VNC from your system, and then configure VNC.

1 Check whether to install

Rpm-q | grep VNC

If you do not have a system disk to install

Rpm-ivh Vnc-server-...... rpm

2 Specify port Start service

[Root@hp4u ~]# Vncserver:1

New ' hp4u:1 (root) ' Desktop is hp4u:1

Starting applications specified In/root/.vnc/xstartup
Log file Is/root/.vnc/hp4u:1.log

This example is not the first time that you will be prompted to enter your login password the first time it is executed.

Description

The port that VNC gives to the browser is 5800+n, and the port to Vncviewer is 5900+n,n is the display number set.

For example, to start the VNC service with VNCSERVER:1, the specified port number should be 5901 when using the Vncviewer connection, and the browser port number 5801.

3 Modify Login Configuration

This step requires configuration only for the first time you use VNC.

[Root@hp4u ~]# Cd/root/.vnc # This directory is automatically generated after the first run of VNC.

[root@hp4u. vnc]# ll
Total $
-rw-r--r--1 root 1565 Sep 19:48 hp4u:1.log
-rw-r--r--1 root root 6 Sep 19:48 hp4u:1.pid
-rw-r--r--1 root 2211 Sep 13:51 hp4u:2.log
-rw-r--r--1 root 6 Sep 16 13:47 Hp4u:2.pid
-rw-r--r--1 root 1560 Sep 13:50 hp4u:3.log
-rw-r--r--1 root root 6 Sep 13:50 r>-rw-r--r--1 Root 1915 Sep 18:33 Hp4u:4.log
-rw-r--r--1 root 6 Sep 13:51 hp4u:4.pid
-rw-r--r-- 1 root 1915 Sep 18:33 Hp4u:5.log
-rw-r--r--1 root 6 Sep 13:54 hp4u:5.pid
-rw-r--r--1 root root 8770 Sep 13:56 hp4u:6.log
-rw-------1 root 8 Sep 11:09 passwd
-rwxr-xr-x 1 root Sep 19 11:09 Xstartup

[root@hp4u. vnc]# VI xstartup

#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset Session_manager
# EXEC/ETC/X11/XINIT/XINITRC

[-x/etc/vnc/xstartup] && Exec/etc/vnc/xstartup
[-R $HOME/. Xresources] && Xrdb $HOME/. Xresources
Xsetroot-solid Grey
Vncconfig-iconic &
Xterm-geometry 80x24+10+10-ls-title "$VNCDESKTOP Desktop" &
#twm & ### to comment out this line
gnome-session& ### New additions to this line


[Root@hp4u. vnc]# vi/etc/sysconfig/vncservers

# vncservers= "2:myusername"
vncservers= "1:root" ### Add, login with root user
# vncserverargs[2]= "-geometry 800x600-nolisten tcp-nohttpd-localhost"
vncserverargs[1]= "-geometry 800x600-nolisten tcp-nohttpd-localhost" ### Add, set window size
VNC Service



http://blog.csdn.net/yabignshi/article/details/8032076

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.