Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2024 - (show annotations) (download)
Mon Aug 13 11:27:11 2012 UTC (11 years, 8 months ago) by niro
Original Path: mcore-src/trunk/mcore-tools/daemon/client/include/vnc.client.class
File size: 1356 byte(s)
-support $MROOT variable
1 # $Id$
2
3 provide x0vnc
4 require basic-video
5
6 help_vnc_enable()
7 {
8 mecho "Enable vnc for the X0 display"
9 mecho "X11 restart required!"
10 }
11
12 help_vnc_disable()
13 {
14 mecho "Disable vnc for the X0 display"
15 mecho "X11 restart required!"
16 }
17
18 help_vnc_passwd()
19 {
20 mecho "set vnc.passwd [password]"
21 mecho " Sets given password for X0 display vnc."
22 }
23
24 set_vnc_enable()
25 {
26 # add to module section
27 local CONFIG="${MROOT}/${MCORE_CONFIG_PATH}/xorg/module/99-vnc.conf"
28 clearconfig
29 addconfig ' Load "vnc"'
30
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/.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()
45 {
46 local CONFIG="${MROOT}/${MCORE_CONFIG_PATH}/xorg/screen/99-vnc.conf"
47 clearconfig
48
49 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()
59 {
60 local pass="$1"
61 local vncpasswd="${MROOT}/root/.vncpasswd"
62 [[ -z ${pass} ]] && help_vnc_passwd && return 1
63
64 vncpasswd "${vncpasswd}" > /dev/null << EOF
65 ${pass}
66 ${pass}
67 EOF
68 }