Graphical access to Ubuntu desktop environment via VNC under Windows

Source: Internet
Author: User

There are many ways to access Ubuntu or other Linux desktop environments in Windows, and I prefer to use the VNC service, which requires installing vncserver under Ubuntu and installing Client access tools under Windows.


1. Client Access tools under Windows

For VNC, there are many client access tools, such as RealVNC, Vncviewer and so on, I prefer the vncviewer, relatively small and lightweight, the use is very simple, as shown:


The following: 1 is the assigned desktop number, you can assign different clients to different desktop number access, if it is the default port so input, if you set the port number also need to add port number after IP access.


2. Ubuntu Server Configuration

1) First install the Vncserver service

sudo apt-get install Vnc4server


2) After successful installation, turn on VNC service

If you want to access the root user's desktop environment with sudo vncserver, if access to the current ordinary user's environment directly Vncserver can be, first boot will require a password to use when the client access, later can use vncpasswd modified.

When VNC is successful, a. VNC directory is generated in the home directory.


3) Modify the original Xstartup file for graphical access

If you do not modify the Xstartup file and access it under the client, the following interface will appear:


That is, only one terminal window does not have a graphical interface, which is obviously not what we want, so how do we graphically access it? This requires modifying the VNC configuration file Xstartup.

The default Xstartup file is this:

#!/bin/sh # Uncomment the following-lines for no Rmal desktop:# unset session_manager# exec/etc/x11/xinit/xinitrc[-x/etc/vnc/xstartup] && Exec/etc/vnc/xstart up[-R $HOME/. Xresources] && Xrdb $HOME/. Xresourcesxsetroot-solid greyvncconfig-iconic &x-terminal-emulator-geometry 80x24+10+10-ls-title "$VNCDESKTOP Desktop "&X-window-manager &

We need to change the last line of "X-window-manager &" to our own Ubuntu GUI service. This depends on your Ubuntu desktop environment, Ubuntu has gnome, KDE, unity and other desktop environment.

    • If it is GNOME desktop, change to gnome-session &;
    • If it is KDE desktop, change to Startkde &;
    • If it's a unity desktop, first go to/usr/share/gnome-session/sessions/to see the name of the desktop session, and if it is ubuntu-2d, change the last line to:

      Export startup= "/usr/bin/gnome-session--session=ubuntu-2d"

      $STARTUP

Now Ubuntu is the Unity desktop, like this:

After the modification is complete, if you have already opened the Vncserver service, you need to usevncserver-kill:1(Here is the default number 1th desktop, modify it according to your own circumstances) to kill the running desktop service, and then restart the service:vncserver:1A graphical interface appears when a new session is generated and the client is reconnected.
Note: If it is not successful, your Ubuntu may not have the appropriate desktop environment installed, if it is a GNOME desktop environment, you can install the following method:

(1) Foundation of installation X-windows

sudo apt-get install X-window-system-core (typically installed)

(2) Install Login Manager

sudo apt-get install GDM (also available for KDM/XDM)

(3) Installing Ubuntu desktop

sudo apt-get install ubuntu-desktop  

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.