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.
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