RealVNC - VNC Server on Redhat Linux 9
目次
- Download
- Install
- Getting started
- Accessing by Web Browsers
- Using GUI Login (GDM)
- GUI Login with Web Browsers
- Trouble Shooting
VNC Server on Redhat Linux 9
Download
- Download the RPM pakage from < http://www.realvnc.com/ >
- In my case: vnc-4_1_2-x86_linux.rpm
- Place it to your convenient directory.
( For example. /usr/local/src )
Install
- su root
- cd /usr/local/src
- rpm -i vnc-4_1_2-x86_linux.rpm
Getting started
General Information
- Support multiple display at once.
- Using port is 5900 + <Display number>
User Settings
- Login as User
- Add the following line to your .bashrc file in your home directory.
export PATH=$PATH:/usr/bin - source ./.bashrc ( refrect the settings )
Run VNC server
- vncpasswd. ( Set your password )
- vncserver :1 ( Display number: 1 )
Using VNC viewers
- Run your vnc viewer. ( Windows or linux versions, both are useable )
- Type the server url or IP.
- Type the password that you have set.
Stop the server
- vncserver -kill :1 ( Display number: 1 )
Tips
- If you want to use gnome instead of twm, you need following steps.
- Login as User
- cp /etc/X11/xinit/xinitrc ~/.xinitrc ( If there is no .xinitrc )
- cd ~/.vnc
- mv xstartup xstartup.org ( Backup the original .xinitrc )
- ln -s ../.xinitrc xstartup
Accessing by Web Browsers
General Information
- You can also access the vnc server by your web browser with java environment.
- Recent vnc package includes all the environment for browser connection. So, do not need any preparation for browsing.
- Using port is 5800 + <Display number>
- The sequence is like this.
- Browser sends the request to vncserver via the port 580x.
- Vncserver responds the html file includes the link to java applet for viewing.
- Browser runs the applet.
- The applet serves view and operation to us.
Run VNC server
- Same as for vncviewer.
Browsing
- Type the server url with the port number to your browser address box.
( For example. http://<server-url>:5801/ ) - Type the password that you have set.
Stop the server
- Same as for vncviewer.
Using GUI Login (GDM)
General Information
- If you want to use graphical login, you have to start the vnc server via xinetd when you access.
Settings
- Make the common password file
vncpasswd /etc/vnc_passwd chmod 644 /etc/vnc_passwd
- Add following line to the file /etc/services.
vnc-800x600 5950/tcp # VNC by xinetd
- Make the file /etc/xinet.d/vnc-800x600 as following.
service vnc-800x600 { disable = no socket_type = stream user = root wait = no server = /usr/bin/Xvnc server_args = -inetd -query localhost -once -geometry 800x600 -depth 16 --PasswordFile=/etc/vnc_passwd }
- Edit the file /etc/X11/gdm/gdm.conf as following.
[daemon] KillInitClients=false [xdmcp] Enable=true
Restart the related services
- service xinetd restart ( Restart xinetd )
- init 3; sleep 10; init 5 ( Restart gdm )
Login with VNC viewers
- Run your vnc viewer. ( Windows or linux versions, both are useable )
- Type the server url or IP + <port number>.
( For example. <host_name>:5950 ) - Type the password that you have set.
Tips
- In this section, It support only 800x600 resolution. However, you can support any resolution by the following method.
- Add some lines for another port number corresponding other resolution to the file /etc/services.
- Place some xinetd files corresponding other resolution into the directory /etc/xinet.d/.
GUI Login with Web Browsers
General Information
- For getting this function, you have to borrow the power of web server.
- The trick is this.
- Browser sends the request via normal http port 80.
- Web server responds the html file includes the link to java applet.
- Browser runs the applet.
- The applet serves view and operation to us.
Settings
- At first you have to run web server. ( This is the out of range of this page )
- Place the following html file to the directory /usr/share/vnc/classes/
index.html <HTML> <HEAD> <TITLE> VNC viewer for Java </TITLE> </HEAD> <BODY> <APPLET CODE=vncviewer/VNCViewer.class ARCHIVE=vncviewer.jar WIDTH=800 HEIGHT=600> <PARAM name="port" value=5950> </APPLET> </BODY> </HTML>
- ln -s /usr/share/vnc /var/www/htdocs/vnc
( Place the symbolic link for accessing web browser. )
Accessing by browsers
- Type the url to your browser address box.
( For example. http://<server-url>/vnc/classes/index.html ) - Type the password that you have set.
- And, Login.
Tips
- If the html file includes some links corresponding differrent resolution, It is very useful. Try it.
Trouble Shooting
Maybe, you have to open the firewall for vnc packets.
- Add following lines to the file /etc/sysconfig/iptables
-A INPUT -p 5900:5903 -j ACCEPT ( This line is for normal vnc connection ) -A INPUT -p 5800:5803 -j ACCEPT ( This line is for browser connection ) -A INPUT -p 5950 -j ACCEPT (This line is for the vnc server with xinetd)
- Restart iptables by following command.
- service iptables restart
Why do I get only gray screen with GUI login.
- Gray screen means success to connect Xserver, but could not to start GDM.
- Recheck /etc/xinet.d/vnc file and the user is real user who can login.
- Recheck /etc/X11/gdm/gdm.conf. (/etc/gdm/custom.conf)
- Did you restart the GDM ? (try Init 3: sleep 10; Init 5 # or try gdm-restart)
GDM is started, but I can not login.
- Check the file /etc/vnc_passwd. It's permission must be 644.
Can not start GNOME application that needs the root password.
- It maybe due to access restriction.
- Try "xhost +localhost" command befor starting.
- You can place the command into the .bashrc file in your home directory.
Powered by YukiWiki 2.1.3
Modified by Makoto Ito.