Last update at :2024-07-07,Edit by888u
In the morning, a netizen contacted Snail if he could provide an article on the VNC desktop environment that can be used in the Linux VPS host Ubuntu system environment. Therefore, in order to meet the relevant user needs that may be needed, after searching and testing, the XWindows Gnome desktop environment installed based on the Ubuntu system environment can now be shared, and those who have project needs can refer to it.
In the previous Snail blog, many VNC installation tutorials have been provided. If you need it, you can refer to it:
Complete Linux VPS (CentOS) installs VNC+XFCE visual desktop environment and installs FireFox browser
Linux VPS Debian installs LXDE+VNC desktop with Firefox browser and Simplified Chinese
Linux OpenVZ CentOS 6 64bit environment one-click installation VNC desktop environment tutorial
The installation plan in this article can be based on Ubuntu 10.04 or Ubuntu 10.10, and there is no problem after testing.
First, uninstall and delete unnecessary software in the system
apt-get purge apache2* bind9* samba*
Uninstall unnecessary software to reduce system resource usage and improve utilization. During the uninstallation process, you will be prompted whether you need to continue. Enter y and press Enter to continue.
Second, upgrade the system environment and latest packages and install nano tools
apt-get updateapt-get upgradeapt-get install nano
Third, install the desktop environment
apt-get install ubuntu-desktop
During the installation process, it will be mentioned to select the country, input method keyboard, and encoding, etc. We can directly press Enter. As follows:
Choose console country from the list, for example.: USASelect keyboard layout, for example.: USAIf asked, choose optional keyboard shortcut to switch keyboard languages, for example.: Alt + ShiftChoose console charset, for example.: UTF- 8Choose console font: .Combined – Latin; Slavic Cyrillic, Hebrew, basic Arabic
Fourth, set up Gnome and XWindows desktop environment
/etc/init.d/gdm startdpkg-reconfigure xserver-xorg
Fifth, install TightVNC
apt-get install tightvncserver
Sixth, set VNC login password
vncpasswd
Then you need to enter the password twice, which cannot be seen. We need to see it clearly and not enter it incorrectly. And there will be a prompt "Would you like to enter a view-only password". Here I enter n and there is no need to set it.
Then set the window by the way:
vncserver:1 -geometry 1024x768 -depth 16 -pixelformat rgb565
Seventh, set up Gnome’s window manager
Generally by default, the VNC server does not use the Gnome window manager. In order to make the VNC server use Gnome's window manager by default, we should configure the following file.
nano ~/.vnc/xstartup
Open the xstartup file and check if the x-window-manager line is # commented out. If not, please comment it out. If it is already commented, leave it alone. Then add gnome-session & in the last line, so that all the scripts we see are as follows:
#!/bin/shxrdb $HOME/.Xresourcesxsetroot -solid grey#x-terminal-emulator -geometry 80x24+10+10 -ls -title \\\"$VNCDESKTOP Desktop\\\" -window -manager Fix to make GNOME workexport XKL_XMODMAP_DISABLE=1/etc/X11/Xsessiongnome-session &
Eighth, set up startup
update-rc.d ssh defaults
Ninth, check whether VNC is running
ps aux | grep Xtightvnc
If you see the Xtightvnc: 1-desktop X-auth... prompt in the picture above, it means it is already running.
Tenth, restart VPS to take effect
reboot
After restarting the VPS, we use the VNC tool to connect. If you cannot connect, you need to execute the following script in SSH first:
vncserver:1 -geometry 1024x768 -depth 16 -pixelformat rgb565
Then connect the VNC tool to log in to the desktop.
Recommended site search: domain name and space, PHP space application, Chinese IP segment, overseas server rental price, Jiangsu high-defense server, free virtual host application for Hong Kong virtual host, webmaster IP, free domain name space, cloud host, < /p>
发表评论