8 |
sed -i "s:@@USERNAME@@:${ALX_UNPRIV_USER}:" /etc/slim.conf |
sed -i "s:@@USERNAME@@:${ALX_UNPRIV_USER}:" /etc/slim.conf |
9 |
|
|
10 |
# windowmanager |
# windowmanager |
11 |
echo "exec startfluxbox" > ${ALX_UNPRIV_HOME}/.xinitrc |
local CONFIG="${ALX_UNPRIV_HOME}/.xinitrc" |
12 |
|
clearconfig |
13 |
|
addconfig "exec startfluxbox" |
14 |
} |
} |
15 |
|
|
16 |
config_x11() |
config_x11() |
26 |
config_display_manager |
config_display_manager |
27 |
|
|
28 |
# got we vnc support ? |
# got we vnc support ? |
29 |
if [ -f /usr/X11R6/lib/xorg/modules/extensions/libvnc.so ] |
if [ -f /usr/lib/xorg/modules/extensions/libvnc.so ] |
30 |
then |
then |
31 |
has_tigervnc="yes" |
has_tigervnc="yes" |
32 |
else |
else |
34 |
fi |
fi |
35 |
|
|
36 |
# show which server we use |
# show which server we use |
37 |
echo -en ${COLOREDSTAR}"Configuring Xorg x11-server " |
rc_echo -en ${COLOREDSTAR}"Configuring Xorg x11-server " |
38 |
|
|
39 |
# show if we have vnc |
# show if we have vnc |
40 |
if [[ ${has_tigervnc} = yes ]] |
if [[ ${has_tigervnc} = yes ]] |
41 |
then |
then |
42 |
echo "with tigervnc enabled ..." |
rc_echo "with tigervnc enabled ..." |
43 |
else |
else |
44 |
echo "..." |
rc_echo "..." |
45 |
fi |
fi |
46 |
|
|
47 |
# set_input_keyboard |
# set_input_keyboard |
58 |
clearconfig |
clearconfig |
59 |
addconfig 'Section "Device"' |
addconfig 'Section "Device"' |
60 |
addconfig ' Identifier "Card0"' |
addconfig ' Identifier "Card0"' |
61 |
addconfig " Driver \"${cfg_graphic_module}\"" |
|
62 |
|
if [[ $(alx-hwdetection system) = i845 ]] |
63 |
|
then |
64 |
|
addconfig ' # i845 hack - using vesa driver atm' |
65 |
|
addconfig ' Driver "vesa"' |
66 |
|
else |
67 |
|
addconfig " Driver \"${cfg_graphic_module}\"" |
68 |
|
fi |
69 |
|
|
70 |
addconfig 'EndSection' |
addconfig 'EndSection' |
71 |
|
|
72 |
# vnc module |
# vnc module |
75 |
CONFIG="/etc/X11/xorg.conf.d/25-module.conf" |
CONFIG="/etc/X11/xorg.conf.d/25-module.conf" |
76 |
clearconfig |
clearconfig |
77 |
addconfig 'Section "Module"' |
addconfig 'Section "Module"' |
78 |
addconfig ' Load vnc' |
addconfig ' Load "vnc"' |
79 |
addconfig 'EndSection' |
addconfig 'EndSection' |
80 |
fi |
fi |
81 |
|
|
94 |
# fallback |
# fallback |
95 |
[[ ${hsync} = 0-0 ]] && hsync="28-96" |
[[ ${hsync} = 0-0 ]] && hsync="28-96" |
96 |
[[ ${vsync} = 0-0 ]] && vsync="50-60" |
[[ ${vsync} = 0-0 ]] && vsync="50-60" |
97 |
|
|
98 |
addconfig |
addconfig |
99 |
addconfig " HorizSync ${hsync}" |
addconfig " HorizSync ${hsync}" |
100 |
addconfig " VertRefresh ${vsync}" |
addconfig " VertRefresh ${vsync}" |
102 |
|
|
103 |
# add cvt modelines |
# add cvt modelines |
104 |
addconfig |
addconfig |
105 |
local cvt="/usr/X11R6/bin/cvt" |
local cvt="/usr/bin/cvt" |
106 |
local modeline |
local modeline |
107 |
modeline=$("${cvt}" "${cfg_graphic_resolution%x*}" "${cfg_graphic_resolution#*x}" "${cfg_graphic_refresh_rate}" | sed -e 's:^:\t:g' -e 's:_.*\":\":') |
modeline=$("${cvt}" "${cfg_graphic_resolution%x*}" "${cfg_graphic_resolution#*x}" "${cfg_graphic_refresh_rate}" | sed -e 's:^:\t:g' -e 's:_.*\":\":') |
108 |
addconfig "${modeline}" |
addconfig "${modeline}" |
134 |
addconfig ' Option "PasswordFile" "/root/.vnc/passwd"' |
addconfig ' Option "PasswordFile" "/root/.vnc/passwd"' |
135 |
fi |
fi |
136 |
addconfig 'EndSection' |
addconfig 'EndSection' |
137 |
|
|
138 |
|
# disable screen blanks, use xscreensaver for it |
139 |
|
CONFIG="/etc/X11/xorg.conf.d/25-server.conf" |
140 |
|
clearconfig |
141 |
|
addconfig 'Section "ServerFlags"' |
142 |
|
addconfig ' Option "BlankTime" "0"' |
143 |
|
addconfig ' Option "StandbyTime" "0"' |
144 |
|
addconfig ' Option "SuspendTime" "0"' |
145 |
|
addconfig ' Option "OffTime" "0"' |
146 |
|
addconfig 'EndSection' |
147 |
|
|
148 |
|
# fixes |
149 |
|
# disable LVDS-1 on zotacs or enable it if hdmi was requested |
150 |
|
if [[ $(alx-hwdetection system) = zotac ]] |
151 |
|
then |
152 |
|
CONFIG="/etc/X11/xorg.conf.d/30-fix-zotac.conf" |
153 |
|
clearconfig |
154 |
|
addconfig 'Section "Monitor"' |
155 |
|
addconfig ' Identifier "LVDS1"' |
156 |
|
if [[ ${cfg_graphic_hdmi} = enable ]] |
157 |
|
then |
158 |
|
# add cvt modelines |
159 |
|
addconfig |
160 |
|
local cvt="/usr/bin/cvt" |
161 |
|
local modeline |
162 |
|
modeline=$("${cvt}" "${cfg_graphic_resolution%x*}" "${cfg_graphic_resolution#*x}" "${cfg_graphic_refresh_rate}" | sed -e 's:^:\t:g' -e 's:_.*\":\":') |
163 |
|
addconfig "${modeline}" |
164 |
|
else |
165 |
|
addconfig ' Option "Ignore" "True"' |
166 |
|
fi |
167 |
|
addconfig 'EndSection' |
168 |
|
else |
169 |
|
# clear this file |
170 |
|
if [ -f /etc/X11/xorg.conf.d/30-fix-zotac.conf ] |
171 |
|
then |
172 |
|
rm /etc/X11/xorg.conf.d/30-fix-zotac.conf |
173 |
|
fi |
174 |
|
fi |
175 |
} |
} |