Ubuntu Server Remote VNC service configuration xfce4

Source: Internet
Author: User

Link: http://blog.csdn.net/bykjscn/article/details/8140566

Environment:

 

[Plain] View plaincopyprint?

    1. Root @ node1 :~ # Cat/etc/issue
    2. Ubuntu 12.04 lts \ n \ L

 

 

 Requirement: now we need to remotely connect to the Ubuntu GUI because there isProgramIt must be configured using the graphical interface.

By default, the Ubuntu server does not have a graphical interface. You can use xmanager to remotely connect to Ubuntu. After the connection is complete, you would like to use the built-in functions of xmanager to bring up a graphic interface, however, no matter how you play it, the program won't be able to play out, and it's very tangled. You can use xclock for testing. It can only be used separately.

In the past, VNC was configured in RedHat, but it was not done in Ubuntu. This is a bit of research. The following describes the configuration process in detail. The graphic program used is xface.

1. install and configure VNC

1. First install VNC

  

 

[Plain] View plaincopyprint?

    1. # Apt-Get install vnc4server

 

 

2. Set a password for VNC

 

[Plain] View plaincopyprint?

    1. Root @ node1 :~ /. VNC # vncpasswd
    2. Password:

 

 

Enter the password and confirm it again.

3. Start VNC

 

[Plain] View plaincopyprint?

  1. Root @ node1 :~ # Vncserver: 1
  2. New 'node1: 1 (Root) 'desktop is node1: 1
  3. Starting applications specified in/root/. VNC/xstartup
  4. Log File is/root/. VNC/node1: 1.log
  5. Root @ node1 :~ # Ps-Ef | grep VNC
  6. Root 1768 1 0 00:00:00 pts/0 xvnc4: 1-desktop node1: 1 (Root)-auth/root/. Xauthority-geometry 1024x768-depth 16-rfbwait 30000-rfbaut
  7. H/root /. VNC/passwd-rfbport 5901-PN-FP/usr/x11r6/lib/X11/fonts/type1/,/usr/x11r6/lib/X11/fonts/Speedo /, /usr/x11r6/lib/X11/fonts/MISC/,/usr/x11r6/lib/X11/fonts/75 DPI /, /usr/x11r6/lib/X11/fonts/100 dpi/,/usr/share/fonts/X11/MISC/,/usr/share/fonts/X11/type1 /, /usr/share/fonts/X11/75 DPI/,/usr/share/fonts/X11/100 dpi/-Co/etc/X11/RGB

 

 

Started successfully

2. Client Connection

Install vncview on the client and connect

 

When you enter the IP address, enter IP: No, that is, the IP address and session number. The account you just opened is 1. Enter

1.1.1.1: 1

After entering the password, you can connect

 

Because there is no desktop environment, we need to install one. Here we use xface

3. Install xface

 

[Plain] View plaincopyprint?

    1. # Apt-Get install xfce4

 

 

The process is long and the size is about MB. After the installation is complete, we can use VNC to call xface.

Change VNC configuration and load xface Desktop

 

[Plain] View plaincopyprint?

    1. Root @ node1 :~ # Pwd
    2. /Root
    3. Root @ node1 :~ # Cd. VNC/
    4. Root @ node1 :~ /. VNC # ls
    5. Node1: 1.log node1: 1.pid passwd xstartup
    6. Root @ node1 :~ /. VNC # Vim xstartup

 

 

Comment out the original configuration and add the xface configuration.

 

[Plain] View plaincopyprint?

  1. Root @ node1 :~ /. VNC # Cat xstartup
  2. #! /Bin/sh
  3. # Uncomment the following two lines for normal desktop:
  4. # Unset session_manager
  5. # Exec/etc/X11/xinit/xinitrc
  6. [-X/etc/VNC/xstartup] & exec/etc/VNC/xstartup
  7. [-R $ home/. Xresources] & xrdb $ home/. Xresources
  8. Xsetroot-solid gray
  9. Vncconfig-iconic &
  10. # X-terminal-emulator-geometry 80x24 + 10 + 10-ls-title "$ vncdesktop desktop "&
  11. # X-window-manager &
  12. Sesion-manager & xfdesktop & xfce4-panel &
  13. Xfce4-menu-plugin &
  14. Xfsettingsd &
  15. Xfconfd &
  16. Xfwm4 &

 

 

Then restart VNC

 

[Plain] View plaincopyprint?

    1. Root @ node1 :~ /. VNC # vncserver-kill: 1
    2. Killing xvnc4 process ID 1844
    3. Root @ node1 :~ /. VNC # vncserver: 1
    4. New 'node1: 1 (Root) 'desktop is node1: 1
    5. Starting applications specified in/root/. VNC/xstartup
    6. Log File is/root/. VNC/node1: 1.log

 

 

Connect with the client

 

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.