39 |
local xfconfig |
local xfconfig |
40 |
local HAS_VNC |
local HAS_VNC |
41 |
local HAS_REALVNC |
local HAS_REALVNC |
42 |
|
local HAS_TIGERVNC |
43 |
|
|
44 |
# xfree or xorg ? |
# xfree or xorg ? |
45 |
xserver="$(readlink /usr/X11R6/bin/X)" |
xserver="$(readlink /usr/X11R6/bin/X)" |
65 |
HAS_REALVNC="no" |
HAS_REALVNC="no" |
66 |
fi |
fi |
67 |
|
|
68 |
|
if [ -f /usr/X11R6/lib/xorg/modules/extensions/libvnc.so ] |
69 |
|
then |
70 |
|
HAS_TIGERVNC="yes" |
71 |
|
else |
72 |
|
HAS_TIGERVNC="no" |
73 |
|
fi |
74 |
|
|
75 |
# show which server we use |
# show which server we use |
76 |
echo -en ${COLOREDSTAR}"Using '${xserver}' as x11-server " |
echo -en ${COLOREDSTAR}"Using '${xserver}' as x11-server " |
77 |
|
|
82 |
elif [[ ${HAS_REALVNC} = yes ]] |
elif [[ ${HAS_REALVNC} = yes ]] |
83 |
then |
then |
84 |
echo "with realvnc enabled ..." |
echo "with realvnc enabled ..." |
85 |
|
elif [[ ${HAS_TIGERVNC} = yes ]] |
86 |
|
then |
87 |
|
echo "with tigervnc enabled ..." |
88 |
else |
else |
89 |
echo "..." |
echo "..." |
90 |
fi |
fi |
106 |
|
|
107 |
[[ ${HAS_VNC} = yes ]] && echo ' Load "vnc"' >> ${xfconfig} |
[[ ${HAS_VNC} = yes ]] && echo ' Load "vnc"' >> ${xfconfig} |
108 |
[[ ${HAS_REALVNC} = yes ]] && echo ' Load "vnc"' >> ${xfconfig} |
[[ ${HAS_REALVNC} = yes ]] && echo ' Load "vnc"' >> ${xfconfig} |
109 |
|
[[ ${HAS_TIGERVNC} = yes ]] && echo ' Load "vnc"' >> ${xfconfig} |
110 |
|
|
111 |
echo 'EndSection' >> ${xfconfig} |
echo 'EndSection' >> ${xfconfig} |
112 |
|
|
116 |
|
|
117 |
case ${xserver} in |
case ${xserver} in |
118 |
Xorg) |
Xorg) |
119 |
echo ' FontPath "/usr/share/fonts/local/"' >> ${xfconfig} |
# only add existing font pathes |
120 |
echo ' FontPath "/usr/share/fonts/misc/"' >> ${xfconfig} |
[[ -f /usr/share/fonts/local/fonts.dir ]] && echo ' FontPath "/usr/share/fonts/local/"' >> ${xfconfig} |
121 |
echo ' FontPath "/usr/share/fonts/75dpi/:unscaled"' >> ${xfconfig} |
[[ -f /usr/share/fonts/misc/fonts.dir ]] && echo ' FontPath "/usr/share/fonts/misc/"' >> ${xfconfig} |
122 |
echo ' FontPath "/usr/share/fonts/100dpi/:unscaled"' >> ${xfconfig} |
[[ -f /usr/share/fonts/75dpi/fonts.dir ]] && echo ' FontPath "/usr/share/fonts/75dpi/:unscaled"' >> ${xfconfig} |
123 |
echo ' FontPath "/usr/share/fonts/TrueType/"' >> ${xfconfig} |
[[ -f /usr/share/fonts/100dpi/fonts.dir ]] && echo ' FontPath "/usr/share/fonts/100dpi/:unscaled"' >> ${xfconfig} |
124 |
echo ' FontPath "/usr/share/fonts/freefont/"' >> ${xfconfig} |
[[ -f /usr/share/fonts/TrueType/fonts.dir ]] && echo ' FontPath "/usr/share/fonts/TrueType/"' >> ${xfconfig} |
125 |
echo ' FontPath "/usr/share/fonts/75dpi/"' >> ${xfconfig} |
[[ -f /usr/share/fonts/freefont/fonts.dir ]] && echo ' FontPath "/usr/share/fonts/freefont/"' >> ${xfconfig} |
126 |
echo ' FontPath "/usr/share/fonts/100dpi/"' >> ${xfconfig} |
[[ -f /usr/share/fonts/75dpi/fonts.dir ]] && echo ' FontPath "/usr/share/fonts/75dpi/"' >> ${xfconfig} |
127 |
|
[[ -f /usr/share/fonts/100dpi/fonts.dir ]] && echo ' FontPath "/usr/share/fonts/100dpi/"' >> ${xfconfig} |
128 |
;; |
;; |
129 |
XFree86) |
XFree86) |
130 |
echo ' FontPath "/usr/X11R6/lib/X11/fonts/local/"' >> ${xfconfig} |
echo ' FontPath "/usr/X11R6/lib/X11/fonts/local/"' >> ${xfconfig} |
207 |
fi |
fi |
208 |
|
|
209 |
# monitor |
# monitor |
210 |
|
echo '' >> ${xfconfig} |
211 |
echo 'Section "Monitor"' >> ${xfconfig} |
echo 'Section "Monitor"' >> ${xfconfig} |
212 |
echo ' Identifier "Monitor0"' >> ${xfconfig} |
echo ' Identifier "Monitor0"' >> ${xfconfig} |
213 |
echo ' Option "DPMS"' >> ${xfconfig} |
echo ' Option "DPMS"' >> ${xfconfig} |
217 |
local modeline |
local modeline |
218 |
modeline=$("${cvt}" "${ALX_RESOLUTION%x*}" "${ALX_RESOLUTION#*x}" "${ALX_REFRESH_RATE}" | sed -e 's:^:\t:g' -e 's:_.*\":\":') |
modeline=$("${cvt}" "${ALX_RESOLUTION%x*}" "${ALX_RESOLUTION#*x}" "${ALX_REFRESH_RATE}" | sed -e 's:^:\t:g' -e 's:_.*\":\":') |
219 |
echo "${modeline}" >> ${xfconfig} |
echo "${modeline}" >> ${xfconfig} |
220 |
|
# add ddcxinfo-knoppix modelines (fallback) |
221 |
|
[[ -x /sbin/ddcxinfo-knoppix ]] && ddcxinfo-knoppix -modelines >> ${xfconfig} |
222 |
echo 'EndSection' >> ${xfconfig} |
echo 'EndSection' >> ${xfconfig} |
223 |
|
|
224 |
# vga |
# vga |
225 |
echo '' >> ${xfconfig} |
echo '' >> ${xfconfig} |
226 |
echo 'Section "Device"' >> ${xfconfig} |
echo 'Section "Device"' >> ${xfconfig} |
227 |
echo ' Identifier "vga0"' >> ${xfconfig} |
echo ' Identifier "vga0"' >> ${xfconfig} |
228 |
|
# check for openchrome and use it if available |
229 |
|
if [[ ${ALX_MODULE} = via ]] && [ -f /usr/X11R6/lib/xorg/modules/drivers/openchrome_drv.so ] |
230 |
|
then |
231 |
|
ALX_MODULE="openchrome" |
232 |
|
fi |
233 |
echo " Driver \"${ALX_MODULE}\"" >> ${xfconfig} |
echo " Driver \"${ALX_MODULE}\"" >> ${xfconfig} |
234 |
|
|
235 |
# vnc server options |
# vnc server options |
268 |
echo ' ViewPort 0 0' >> ${xfconfig} |
echo ' ViewPort 0 0' >> ${xfconfig} |
269 |
echo ' EndSubsection' >> ${xfconfig} |
echo ' EndSubsection' >> ${xfconfig} |
270 |
|
|
271 |
if [[ ${HAS_REALVNC} = yes ]] |
if [[ ${HAS_REALVNC} = yes ]] || [[ ${HAS_TIGERVNC} = yes ]] |
272 |
then |
then |
273 |
echo ' Option "SecurityTypes" "VncAuth"' >> ${xfconfig} |
echo ' Option "SecurityTypes" "VncAuth"' >> ${xfconfig} |
274 |
echo ' Option "UserPasswdVerifier" "VncAuth"' >> ${xfconfig} |
echo ' Option "UserPasswdVerifier" "VncAuth"' >> ${xfconfig} |