In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "the introduction of client-side and server-side usage of VNC remote desktop under Ubuntu". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "the introduction of client and server usage of VNC remote desktop under Ubuntu".
Install VNC first
The code is as follows:
# apt-get install vnc4server
Set the password for VNC
The code is as follows:
Root@node1:~/.vnc# vncpasswd
Password:
Enter the password, then confirm it again, and then OK it.
Start VNC
The code is as follows:
Root@node1:~# vncserver: 1
New 'node1:1 (root)' desktop is node1:1
Starting applications specified in / root/.vnc/xstartup
Log file is / root/.vnc/node1:1.log
The code is as follows:
Root@node1:~# ps-ef | grep vnc
Root 1768 10 06:10 pts/0 00:00:00 Xvnc4: 1-desktop node1:1 (root)-auth / root/.Xauthority-geometry 1024x768-depth 16-rfbwait 30000-rfbaut
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/75dpi/,/usr/X11R6/lib/X11/fonts/100dpi/,/usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/ / usr/share/fonts/X11/100dpi/-co / etc/X11/rgb
Started successfully
Start VNCServer
The code is as follows:
Vncserver-geometry 1280 × 800-alwaysshared: 1
This command contains three parameters, the first parameter geometry represents the resolution, you can specify the resolution suitable for your desktop; the second parameter alwaysshared means to run multiple people to connect to the same desktop at the same time; the third parameter: 1 means to open a No. 1 remote desktop, at this time you can use ip:1 to connect to the remote desktop. (note: the hyphen between 1280 and 800 is the letter x (x of xyz), not the multiplication sign in Chinese and English!)
Then a .vnc folder is generated under the root directory of the current user, and after entering the .vnc file, modify the xstartup file:
The code is as follows:
Vim .vnc / xstartup
(suppose you are in the user root directory at this time)
Comment out twm & (that is, add a # at the beginning of the line), add a line gnome-session & at the end of the file, and save exit.
Use VNCViewer to connect to this remote desktop
In VNCViewer, enter ip plus desktop number, that is, X.X.X.X:1, you can connect to the remote desktop just now, and the password is the password set before.
In this way, when you restart the server again, you do not have to run to the server to log in to the system, but you can first use ssh to log in to Ubuntu, execute the above step 4 command, you can open a remote desktop, and then you can use VNCViewer to connect to the remote desktop.
I have also tried whether it is possible to automatically start VNCServer and start a remote desktop under Ubuntu, but unfortunately, most of the methods found on the Internet are aimed at other Linux methods, the directory structure under Ubuntu is completely different, and some very few articles that automatically start VNCServer under Ubuntu are not suitable for Ubuntu 9.04 Server version, so in the end, I did not realize the method of automatically starting VNCServer on Ubuntu 9.04 Server. That is, every time you restart the machine, you have to take one more step for ssh to start VNCServer. Let's use it like this.
Note: in addition, if you want to shut down a remote desktop, you can use the following command:
The code is as follows:
Vncserver-kill: 1
Where ": 1" represents the desktop number when the remote desktop was created.
Modify the resolution:
The code is as follows:
Vncserver-geometry 1280 × 800
Client connection
The client installs vncview and then connects.
When entering IP, enter IP:NO, that is, the ip address plus the session number. The one who opened the account just now is 1. For example, enter it here.
1.1.1.1:1
Then after entering the password, you can connect.
Since there is no desktop environment, we need to install one, which uses Xface
At this point, I believe you have a deeper understanding of the "introduction to the client-side and server-side usage of VNC remote Desktop under Ubuntu". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.