Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/modules/tigervnc/vnc.client.class.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1248 by niro, Wed Feb 2 20:20:24 2011 UTC revision 2062 by niro, Wed May 8 13:04:27 2013 UTC
# Line 1  Line 1 
1  # $Id$  # $Id$
2    
3  provide x0vnc  provide x0vnc
4    require basic-video
5    
6  help_vnc_enable()  help_vnc_enable()
7  {  {
# Line 17  help_vnc_disable() Line 18  help_vnc_disable()
18  help_vnc_passwd()  help_vnc_passwd()
19  {  {
20   mecho "set vnc.passwd [password]"   mecho "set vnc.passwd [password]"
21   mecho " sets given password for X0 display vnc."   mecho " Sets given password for X0 display vnc."
22  }  }
23    
24  set_vnc_enable()  set_vnc_enable()
25  {  {
26   local CONFIG="/etc/X11/xorg.conf.d/25-vnc.conf"   # add to module section
27     local CONFIG="${MROOT}/${MCORE_CONFIG_PATH}/xorg/module/99-vnc.conf"
28   clearconfig   clearconfig
   
  addconfig 'Section "Module"'  
29   addconfig ' Load "vnc"'   addconfig ' Load "vnc"'
30   addconfig 'EndSection'  
31     # add to screen section
32     local CONFIG="${MROOT}/${MCORE_CONFIG_PATH}/xorg/screen/99-vnc.conf"
33     clearconfig
34     addconfig ' Option "SecurityTypes" "VncAuth"'
35            addconfig ' Option "UserPasswdVerifier" "VncAuth"'
36            addconfig ' Option "PasswordFile" "/root/.vnc/passwd"'
37    
38     # requires graphic!
39     helper_graphic_rebuild_xorg_conf_d
40    
41     mecho "Done but X11 restart required!"
42  }  }
43    
44  set_vnc_disable()  set_vnc_disable()
45  {  {
46   if [[ -f /etc/X11/xorg.conf.d/25-vnc.conf ]]   local CONFIG="${MROOT}/${MCORE_CONFIG_PATH}/xorg/screen/99-vnc.conf"
47   then   clearconfig
48   rm /etc/X11/xorg.conf.d/25-vnc.conf  
49   fi   local CONFIG="${MROOT}/${MCORE_CONFIG_PATH}/xorg/module/99-vnc.conf"
50     clearconfig
51    
52     # requires graphic!
53     helper_graphic_rebuild_xorg_conf_d
54    
55     mecho "Done but X11 restart required!"
56  }  }
57    
58  set_vnc_passwd()  set_vnc_passwd()
59  {  {
60   local pass="$1"   local pass="$1"
61   local vncpasswd="/root/.vncpasswd"   local vncpasswd="${MROOT}/root/.vnc/passwd"
62   [[ -z ${pass} ]] && help_vnc_passwd && return 1   [[ -z ${pass} ]] && help_vnc_passwd && return 1
63    
64   vncpasswd "${vncpasswd}" > /dev/null << EOF   vncpasswd "${vncpasswd}" > /dev/null << EOF

Legend:
Removed from v.1248  
changed lines
  Added in v.2062