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} |
214 |
echo '' >> ${xfconfig} |
|
215 |
|
# add hsync, vrefresh |
216 |
|
if [[ -x /sbin/ddcxinfo-knoppix ]] |
217 |
|
then |
218 |
|
local hsync="$(ddcxinfo-knoppix -hsync)" |
219 |
|
local vsync="$(ddcxinfo-knoppix -vsync)" |
220 |
|
# fallback |
221 |
|
[[ ${hsync} = 0-0 ]] && hsync="28-96" |
222 |
|
[[ ${vsync} = 0-0 ]] && vsync="50-60" |
223 |
|
|
224 |
|
echo '' >> ${xfconfig} |
225 |
|
echo " HorizSync ${hsync}" >> ${xfconfig} |
226 |
|
echo " VertRefresh ${vsync}" >> ${xfconfig} |
227 |
|
fi |
228 |
|
|
229 |
# add cvt modelines |
# add cvt modelines |
230 |
|
echo '' >> ${xfconfig} |
231 |
local cvt="/usr/X11R6/bin/cvt" |
local cvt="/usr/X11R6/bin/cvt" |
232 |
local modeline |
local modeline |
233 |
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:_.*\":\":') |
234 |
echo "${modeline}" >> ${xfconfig} |
echo "${modeline}" >> ${xfconfig} |
235 |
|
# add ddcxinfo-knoppix modelines (fallback) |
236 |
|
if [[ -x /sbin/ddcxinfo-knoppix ]] |
237 |
|
then |
238 |
|
echo '' >> ${xfconfig} |
239 |
|
ddcxinfo-knoppix -modelines >> ${xfconfig} |
240 |
|
fi |
241 |
echo 'EndSection' >> ${xfconfig} |
echo 'EndSection' >> ${xfconfig} |
242 |
|
|
243 |
# vga |
# vga |
244 |
echo '' >> ${xfconfig} |
echo '' >> ${xfconfig} |
245 |
echo 'Section "Device"' >> ${xfconfig} |
echo 'Section "Device"' >> ${xfconfig} |
246 |
echo ' Identifier "vga0"' >> ${xfconfig} |
echo ' Identifier "vga0"' >> ${xfconfig} |
247 |
|
# check for openchrome and use it if available |
248 |
|
if [[ ${ALX_MODULE} = via ]] && [ -f /usr/X11R6/lib/xorg/modules/drivers/openchrome_drv.so ] |
249 |
|
then |
250 |
|
ALX_MODULE="openchrome" |
251 |
|
fi |
252 |
echo " Driver \"${ALX_MODULE}\"" >> ${xfconfig} |
echo " Driver \"${ALX_MODULE}\"" >> ${xfconfig} |
253 |
|
|
254 |
# vnc server options |
# vnc server options |