Difference between revisions of "VNC"

From Amahi Wiki
Jump to: navigation, search
Line 19: Line 19:
 
* MAC:  [http://cotvnc.sourceforge.net/ Chicken of the VNC]
 
* MAC:  [http://cotvnc.sourceforge.net/ Chicken of the VNC]
 
* For Linux, you have the vncviewer package, available in most, if not all distros.  For Fedora 12, do the following as '''root''' user:
 
* For Linux, you have the vncviewer package, available in most, if not all distros.  For Fedora 12, do the following as '''root''' user:
yum -y install tigervnc
+
        yum -y install tigervnc
  
 
== Server: Installation - Method 1 ==  
 
== Server: Installation - Method 1 ==  
 
* To start the server in your HDA, you need install tigervnc-server rpm package:
 
* To start the server in your HDA, you need install tigervnc-server rpm package:
 
* From the '''root''' user:
 
* From the '''root''' user:
yum -y install tigervnc-server
+
        yum -y install tigervnc-server
chkconfig vncserver on
+
        chkconfig vncserver on
 
* Edit /etc/sysconfig/vncservers and change lines as follows (username is your linux user for the VNC session):
 
* Edit /etc/sysconfig/vncservers and change lines as follows (username is your linux user for the VNC session):
VNCSERVERS="2:username"
+
        VNCSERVERS="2:username"
VNCSERVERARGS[2]="-geometry 1024x768 -nolisten tcp -localhost"
+
        VNCSERVERARGS[2]="-geometry 1024x768 -nolisten tcp -localhost"
 
** Note you can have users 1-9 and each will connect to their VNC session at port 590n (some VNC clients 'know' the 590 part and only have you enter n)
 
** Note you can have users 1-9 and each will connect to their VNC session at port 590n (some VNC clients 'know' the 590 part and only have you enter n)
 
* Run vncpasswd for each user in VNCSERVERS= list; this performs the initial user setup.
 
* Run vncpasswd for each user in VNCSERVERS= list; this performs the initial user setup.
 
* Start and stop vncserver to initialize vnc for each configured user
 
* Start and stop vncserver to initialize vnc for each configured user
service vncserver start
+
        service vncserver start
service vncserver stop
+
        service vncserver stop
 
* Edit /home/username/.vnc/xstartup and change the end of the file:
 
* Edit /home/username/.vnc/xstartup and change the end of the file:
twm &
+
        twm &
 
To:
 
To:
exec gnome-session &
+
        exec gnome-session &
 
* Now finally start vncserver for real!
 
* Now finally start vncserver for real!
 
  service vncserver start
 
  service vncserver start
Line 45: Line 45:
 
* To start the server in your HDA, you need install tigervnc-server rpm package:
 
* To start the server in your HDA, you need install tigervnc-server rpm package:
 
* From the '''root''' user:
 
* From the '''root''' user:
yum -y install tigervnc-server xinetd
+
        yum -y install tigervnc-server xinetd
chkconfig vncserver off
+
        chkconfig vncserver off
service vncserver stop
+
        service vncserver stop
 
* Create /etc/gdm/custom.conf file and add the following:
 
* Create /etc/gdm/custom.conf file and add the following:
#GDM configuration storage
+
        #GDM configuration storage
[xdmcp]
+
        [xdmcp]
Enable=true
+
        Enable=true
[chooser]
+
        [chooser]
[security]
+
        [security]
DisallowTCP=false
+
        DisallowTCP=false
[debug]
+
        [debug]
 
* Create /etc/xinetd.d/vnc1024 file and add the following (you can change the screen resolution by changing the geometry setting):
 
* Create /etc/xinetd.d/vnc1024 file and add the following (you can change the screen resolution by changing the geometry setting):
service vnc1024
+
        service vnc1024
{
+
        {
disable = no
+
        disable = no
socket_type = stream
+
        socket_type = stream
protocol = tcp
+
        protocol = tcp
group = tty
+
        group = tty
wait = no
+
        wait = no
user = nobody
+
        user = nobody
server = /usr/bin/Xvnc
+
        server = /usr/bin/Xvnc
server_args = -inetd -query localhost -geometry 1024×768 -depth 16 -once -fp /usr/share/X11/fonts/misc -securitytypes=none
+
        server_args = -inetd -query localhost -geometry 1024×768 -depth 16 -once -fp /usr/share/X11/fonts/misc -securitytypes=none
}
+
        }
 
* Edit /etc/services and comment out the two lines as listed below:
 
* Edit /etc/services and comment out the two lines as listed below:
#vnc-server      5900/tcp                # VNC Server
+
        #vnc-server      5900/tcp                # VNC Server
#vnc-server      5900/udp                # VNC Server
+
        #vnc-server      5900/udp                # VNC Server
 
* Add this line below the two lines you commented out and save the changes:
 
* Add this line below the two lines you commented out and save the changes:
vnc1024        5900/tcp                # VNC and GDM
+
        vnc1024        5900/tcp                # VNC and GDM
 
* Now restart the xinetd service
 
* Now restart the xinetd service
service xinetd restart
+
        service xinetd restart
 
* Run your VNC Client and enter your HDA IP address for host/IP address.  You should now see your HDA Desktop login screen.  If you don't see the login screen, a reboot of the HDA may be required.  This can be done via the dashboard or by executing the following as '''root''' user:
 
* Run your VNC Client and enter your HDA IP address for host/IP address.  You should now see your HDA Desktop login screen.  If you don't see the login screen, a reboot of the HDA may be required.  This can be done via the dashboard or by executing the following as '''root''' user:
reboot now
+
        reboot now
  
  

Revision as of 03:23, 28 November 2010

Using VNC to use a remote desktop in the HDA (Fedora 12)

Using VNC is useful if:

  • You would like a Linux desktop to the HDA remotely
  • You run your HDA headless (no monitor) and like to still use a desktop in it
  • You would like to use a GUI to configure printer(s) or have a scanner or other device that requires a desktop program to configure and the machine is headless

What you need

  • A server
  • A client

Client: Installation

Download the client software and install:

       yum -y install tigervnc

Server: Installation - Method 1

  • To start the server in your HDA, you need install tigervnc-server rpm package:
  • From the root user:
       yum -y install tigervnc-server
       chkconfig vncserver on
  • Edit /etc/sysconfig/vncservers and change lines as follows (username is your linux user for the VNC session):
       VNCSERVERS="2:username"
       VNCSERVERARGS[2]="-geometry 1024x768 -nolisten tcp -localhost"
    • Note you can have users 1-9 and each will connect to their VNC session at port 590n (some VNC clients 'know' the 590 part and only have you enter n)
  • Run vncpasswd for each user in VNCSERVERS= list; this performs the initial user setup.
  • Start and stop vncserver to initialize vnc for each configured user
       service vncserver start
       service vncserver stop
  • Edit /home/username/.vnc/xstartup and change the end of the file:
       twm &

To:

       exec gnome-session &
  • Now finally start vncserver for real!
service vncserver start
  • Run your VNC Client and enter hda:1 as the host/IP address. You should now see your HDA Desktop screen.

Server: Installation - Method 2

  • To start the server in your HDA, you need install tigervnc-server rpm package:
  • From the root user:
       yum -y install tigervnc-server xinetd
       chkconfig vncserver off
       service vncserver stop
  • Create /etc/gdm/custom.conf file and add the following:
       #GDM configuration storage
       [xdmcp]
       Enable=true
       [chooser]
       [security]
       DisallowTCP=false
       [debug]
  • Create /etc/xinetd.d/vnc1024 file and add the following (you can change the screen resolution by changing the geometry setting):
       service vnc1024
       {
       disable = no
       socket_type = stream
       protocol = tcp
       group = tty
       wait = no
       user = nobody
       server = /usr/bin/Xvnc
       server_args = -inetd -query localhost -geometry 1024×768 -depth 16 -once -fp /usr/share/X11/fonts/misc -securitytypes=none
       }
  • Edit /etc/services and comment out the two lines as listed below:
       #vnc-server      5900/tcp                # VNC Server
       #vnc-server      5900/udp                # VNC Server
  • Add this line below the two lines you commented out and save the changes:
       vnc1024         5900/tcp                # VNC and GDM
  • Now restart the xinetd service
       service xinetd restart
  • Run your VNC Client and enter your HDA IP address for host/IP address. You should now see your HDA Desktop login screen. If you don't see the login screen, a reboot of the HDA may be required. This can be done via the dashboard or by executing the following as root user:
       reboot now


NOTE: More detailed instructions are available here.

Troubleshooting for Vista

This helpful page has helped with blocking VNC