Vnc erver settings (job is reposted)
As customers need to take full advantage of the N spend more money to buy a server, and servers running the Linux AS, the client will not use text mode, it can only use the X-server approach to every user has a graphics terminal This thanks to the design of the X-windows advanced ah.
To simple, I use the onboard vnc-Linux server.
Code::
# Uname-a
Linux server1.linux 2.4.21-4.ELsmp # 1 SMP
# Rpm-q vnc-server
Vnc-server-4.0-0.beta4.1.1
You can use specific account to run your vncserver orders. This can be done at the same time there are a number of graphical user terminals. At the same time a graphic terminal code there can be only one user.
Code::
# Useradd demo
# Passwd-d demo
# Su demo
$ Vncserver
Passwd: / / If this is the first time running account vncserver, will ask you to enter the password link.
Verify:
New 'server1.linux: 4 (demo)' desktop is server1.linux: 4
Starting applications specified in / home / demo / .vnc / xstartup
Log file is / home/demo/.vnc/server1.linux: 4.log
Starting this passage above that of a graphic terminals, No. 4, it is necessary to remember this number, such as the need to provide this login code.
If you want to stop this process, the use of code::
$ Vncserver-kill: 4
Can be, and that the figures behind the graphics terminal code.
Ok, so that x-server has been a starter.
We have to test.
Find another machine, if it is the Linux system, it more convenient to use the following direct orders code::
# Vncviewer xx.xx.xx.xx: 4; connections ip address is: #, # 4 here.
Will pop up a dialog box, asking you to enter your password, if it is correct, this is there will be a graphics terminal.
If the windows of the machine, then download a software vnc it. I use the winVNC.
Connectivity is the same.
But we can see, is that although the graphical interface, but Haochou! Indeed, because of the default graphics terminals used xterm + twm, desktop, there were none. If we can use the default KDE or GNOME or FVWM, such as the X-manager how good?
No problem, the next configuration is to solve the problem.
Whenever a vncserver a running account, will be at home directory creation. Vnc directory.
There are an executable script xstartup. Look at the contents inside will know, the default start-up is twm.
Then we change the document it, remove all the contents inside, and his party into the code below::
Gnome-session
This designated starter gnome.
Can also be written code::
Unset SESSION_MANAGER
Exec / etc/X11/xinit/xinitrc
Starting said that the default graphics manager.
Kept out, and then restart vncserver.
Code::
$ Vncserver-kill: 4
$ Vncserver
Then to the client to link with the X-server, is not to see you become more beautiful.
You may be asked, if I have 1,000 users, it is not every user needs to amend this document ah, ah that much trouble.
Then we find the root causes it to see who is in the end xstartup created.
Find / usr / bin / vncserver, he is a perl script.
Open to look at the 43 line, you will see
$ DefaultXStartup the definition of variables, see the bar.
Do you know how this changed under the bar.
He became like this:
Code::
$ DefaultXStartup
= ("#!/ Bin / shnn. "
"# Uncomment the following two lines for normal desktop: n."
"Unset SESSION_MANAGERn."
"Exec / etc/X11/xinit/xinitrcnn."
"# [-R $ HOME / .Xresources] & & xrdb $ HOME / .Xresourcesn."
"# Xsetroot-solid greyn."
"# & N vncconfig-iconic."
"# Xterm-geometry 80×24 +10 +10-ls-title" $ VNCDESKTOP Desktop "& n."
"# Twm & n");
Actually removed from the top of the two lines of notes, comment out the following few lines. Kept out.
If you create an account, vncserver look at the operation.
Is not the default graphics terminals on the amendment?
My task completed.
The need to interview.
We try it.
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=624227
Published in 2007-04-02 10:19 with you-reading (115) Comments (0) edit collections cited






