分类: LINUX
2010-11-04 14:49:34
Open up your terminal and install tigervnc via yum.
Type this command in your terminal:
Edit the VNC configuration file
and append these lines:
VNCSERVERS="1:user"
VNCSERVERARGS[1]="-geometry 800x600 -depth 16"
Where VNCSERVERS= is for configuring the username.
The "1:user" tells the vnc server that the username user is map to display 1, so the port number to access this user via vnc is 5901.
Note: "By default, VNC uses ports numbered 5900 plus the display number. In
this example, the display is 1, so the port number is 5901.
Please make sure the username to match your linux login name.
The VNCSERVERARGS[1]= refers to the argument for "1:user". The -geometry sets the size of the VNC desktop while -depth sets the pixel depth.
If you want to allow more than one users to access VNC, your config should be like this:
VNCSERVERS="1:user 2:user2"
VNCSERVERARGS[1]="-geometry 800x600 -depth 16"
VNCSERVERARGS[2]="-geometry 800x600 -depth 16"
but we will stick to our example which is using one user only.
Create password for your VNC user by typing this command:
Then edit the vnc startup scrtipt in .vnc folder inside your users home directory.
This line should be commented because it will break your desktop, trust me.
#twm &
And append this line instead:
metacity &
Now start your vnc server and configure it to run automatically at system boot.
Last but not the least, allow the vnc packet through your firewall.
To access your server from your other Fedora system using vnc, use this command: