1 |
# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/config_x11.sh,v 1.7 2005-08-03 17:57:55 niro Exp $ |
# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/config_x11.sh,v 1.8 2005-09-06 07:45:00 niro Exp $ |
2 |
# configures the x11 server on the host via mysql db settings |
# configures the x11 server on the host via mysql db settings |
3 |
|
|
4 |
get_x11_settings() |
get_x11_settings() |
94 |
local xserver |
local xserver |
95 |
local xfconfig |
local xfconfig |
96 |
local HAS_VNC |
local HAS_VNC |
97 |
|
local HAS_REALVNC |
98 |
|
|
99 |
#xfree or xorg ? |
#xfree or xorg ? |
100 |
xserver="$(readlink /usr/X11R6/bin/X)" |
xserver="$(readlink /usr/X11R6/bin/X)" |
120 |
HAS_VNC="no" |
HAS_VNC="no" |
121 |
fi |
fi |
122 |
|
|
123 |
|
if [ -f /usr/X11R6/lib/modules/extensions/vnc.so ] |
124 |
|
then |
125 |
|
HAS_REALVNC="yes" |
126 |
|
else |
127 |
|
HAS_REALVNC="no" |
128 |
|
fi |
129 |
|
|
130 |
#show which server we use |
#show which server we use |
131 |
echo -en ${COLOREDSTAR}"Using '${xserver}' as x11-server " |
echo -en ${COLOREDSTAR}"Using '${xserver}' as x11-server " |
132 |
|
|
134 |
if [ "${HAS_VNC}" = "yes" ] |
if [ "${HAS_VNC}" = "yes" ] |
135 |
then |
then |
136 |
echo "with vnc enabled ..." |
echo "with vnc enabled ..." |
137 |
|
elif [ "${HAS_REALVNC}" = "yes" ] |
138 |
|
then |
139 |
|
echo "with realvnc enabled ..." |
140 |
else |
else |
141 |
echo "..." |
echo "..." |
142 |
fi |
fi |
160 |
echo ' Load "dri"' >> ${xfconfig} |
echo ' Load "dri"' >> ${xfconfig} |
161 |
|
|
162 |
[ "${HAS_VNC}" = "yes" ] && echo ' Load "vnc"' >> ${xfconfig} |
[ "${HAS_VNC}" = "yes" ] && echo ' Load "vnc"' >> ${xfconfig} |
163 |
|
[ "${HAS_REALVNC}" = "yes" ] && echo ' Load "vnc"' >> ${xfconfig} |
164 |
|
|
165 |
echo 'EndSection' >> ${xfconfig} |
echo 'EndSection' >> ${xfconfig} |
166 |
|
|
334 |
echo " Modes \"${ALX_RESOLUTION}\"" >> ${xfconfig} |
echo " Modes \"${ALX_RESOLUTION}\"" >> ${xfconfig} |
335 |
echo ' ViewPort 0 0' >> ${xfconfig} |
echo ' ViewPort 0 0' >> ${xfconfig} |
336 |
echo ' EndSubsection' >> ${xfconfig} |
echo ' EndSubsection' >> ${xfconfig} |
337 |
|
|
338 |
|
if [ "${HAS_REALVNC}" = "yes" ] |
339 |
|
then |
340 |
|
echo ' Option "SecurityTypes" "VncAuth"' >> ${xfconfig} |
341 |
|
echo ' Option "UserPasswdVerifier" "VncAuth"' >> ${xfconfig} |
342 |
|
echo ' Option "PasswordFile" "/root/.vnc/passwd"' >> ${xfconfig} |
343 |
|
fi |
344 |
echo 'EndSection' >> ${xfconfig} |
echo 'EndSection' >> ${xfconfig} |
345 |
|
|
346 |
#server layout |
#server layout |