24 |
set_vnc_enable() |
set_vnc_enable() |
25 |
{ |
{ |
26 |
# add to module section |
# add to module section |
27 |
local CONFIG="${MCORE_CONFIG_PATH}/xorg/module/99-vnc.conf" |
local CONFIG="${MROOT}/${MCORE_CONFIG_PATH}/xorg/module/99-vnc.conf" |
28 |
clearconfig |
clearconfig |
29 |
addconfig ' Load "vnc"' |
addconfig ' Load "vnc"' |
30 |
|
|
31 |
# add to screen section |
# add to screen section |
32 |
local CONFIG="${MCORE_CONFIG_PATH}/xorg/screen/99-vnc.conf" |
local CONFIG="${MROOT}/${MCORE_CONFIG_PATH}/xorg/screen/99-vnc.conf" |
33 |
clearconfig |
clearconfig |
34 |
addconfig ' Option "SecurityTypes" "VncAuth"' |
addconfig ' Option "SecurityTypes" "VncAuth"' |
35 |
addconfig ' Option "UserPasswdVerifier" "VncAuth"' |
addconfig ' Option "UserPasswdVerifier" "VncAuth"' |
43 |
|
|
44 |
set_vnc_disable() |
set_vnc_disable() |
45 |
{ |
{ |
46 |
local CONFIG="${MCORE_CONFIG_PATH}/xorg/screen/99-vnc.conf" |
local CONFIG="${MROOT}/${MCORE_CONFIG_PATH}/xorg/screen/99-vnc.conf" |
47 |
clearconfig |
clearconfig |
48 |
|
|
49 |
local CONFIG="${MCORE_CONFIG_PATH}/xorg/module/99-vnc.conf" |
local CONFIG="${MROOT}/${MCORE_CONFIG_PATH}/xorg/module/99-vnc.conf" |
50 |
clearconfig |
clearconfig |
51 |
|
|
52 |
# requires graphic! |
# requires graphic! |
58 |
set_vnc_passwd() |
set_vnc_passwd() |
59 |
{ |
{ |
60 |
local pass="$1" |
local pass="$1" |
61 |
local vncpasswd="/root/.vncpasswd" |
local vncpasswd="${MROOT}/root/.vncpasswd" |
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 |