1 |
# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/config_x11.sh,v 1.4 2005-03-08 23:03:18 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() |
24 |
on cfg_graphic.monitorid=list_monitors.id |
on cfg_graphic.monitorid=list_monitors.id |
25 |
and cfg_graphic.serial='${ALX_SERIAL}';") |
and cfg_graphic.serial='${ALX_SERIAL}';") |
26 |
|
|
27 |
echo "DEBUG: ${all}" |
# echo "DEBUG: ${all}" |
28 |
|
|
29 |
#split'em up and put 'em in an array |
#split'em up and put 'em in an array |
30 |
declare -i i=0 |
declare -i i=0 |
50 |
depth |
depth |
51 |
from cfg_graphic where serial='${ALX_SERIAL}'") |
from cfg_graphic where serial='${ALX_SERIAL}'") |
52 |
|
|
53 |
echo "DEBUG: ${all}" |
# echo "DEBUG: ${all}" |
54 |
|
|
55 |
#split'em up and put 'em in an array |
#split'em up and put 'em in an array |
56 |
declare -i i=0 |
declare -i i=0 |
82 |
get_x11_settings |
get_x11_settings |
83 |
|
|
84 |
# DEBUG |
# DEBUG |
85 |
echo "MODULE: '${ALX_MODULE}'" |
# echo "MODULE: '${ALX_MODULE}'" |
86 |
echo "RESOLUTION: '${ALX_RESOLUTION}'" |
# echo "RESOLUTION: '${ALX_RESOLUTION}'" |
87 |
echo "DEPTH: '${ALX_DEPTH=}'" |
# echo "DEPTH: '${ALX_DEPTH=}'" |
88 |
echo "VENDOR: '${ALX_VENDOR}'" |
# echo "VENDOR: '${ALX_VENDOR}'" |
89 |
echo "MODEL: '${ALX_MODEL}'" |
# echo "MODEL: '${ALX_MODEL}'" |
90 |
echo "HSYNC: '${ALX_HSYNC}'" |
# echo "HSYNC: '${ALX_HSYNC}'" |
91 |
echo "VREF: '${ALX_VREF}'" |
# echo "VREF: '${ALX_VREF}'" |
92 |
echo "MOUSE: '${ALX_MOUSE}'" |
# echo "MOUSE: '${ALX_MOUSE}'" |
93 |
|
|
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 |
|
|
235 |
;; |
;; |
236 |
esac |
esac |
237 |
|
|
238 |
echo ' Option "XkbModel" "pc104"' >> ${xfconfig} |
echo ' Option "XkbModel" "pc105"' >> ${xfconfig} |
239 |
echo ' Option "XkbLayout" "de"' >> ${xfconfig} |
echo ' Option "XkbLayout" "de"' >> ${xfconfig} |
240 |
echo 'EndSection' >> ${xfconfig} |
echo 'EndSection' >> ${xfconfig} |
241 |
|
|
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 |