Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/daemon/client/include/vnc.client.class

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

revision 1248 by niro, Wed Feb 2 20:20:24 2011 UTC revision 1263 by niro, Fri Feb 4 20:06:54 2011 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="${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="${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/.vncpasswd"'
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="${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="${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()

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