24 |
config_display_manager |
config_display_manager |
25 |
|
|
26 |
# got we vnc support ? |
# got we vnc support ? |
27 |
if [ -f /usr/X11R6/lib/xorg/modules/extensions/libvnc.so ] |
if [ -f /usr/lib/xorg/modules/extensions/libvnc.so ] |
28 |
then |
then |
29 |
has_tigervnc="yes" |
has_tigervnc="yes" |
30 |
else |
else |
32 |
fi |
fi |
33 |
|
|
34 |
# show which server we use |
# show which server we use |
35 |
echo -en ${COLOREDSTAR}"Configuring Xorg x11-server " |
rc_echo -en ${COLOREDSTAR}"Configuring Xorg x11-server " |
36 |
|
|
37 |
# show if we have vnc |
# show if we have vnc |
38 |
if [[ ${has_tigervnc} = yes ]] |
if [[ ${has_tigervnc} = yes ]] |
39 |
then |
then |
40 |
echo "with tigervnc enabled ..." |
rc_echo "with tigervnc enabled ..." |
41 |
else |
else |
42 |
echo "..." |
rc_echo "..." |
43 |
fi |
fi |
44 |
|
|
45 |
# set_input_keyboard |
# set_input_keyboard |
65 |
CONFIG="/etc/X11/xorg.conf.d/25-module.conf" |
CONFIG="/etc/X11/xorg.conf.d/25-module.conf" |
66 |
clearconfig |
clearconfig |
67 |
addconfig 'Section "Module"' |
addconfig 'Section "Module"' |
68 |
addconfig ' Load vnc' |
addconfig ' Load "vnc"' |
69 |
addconfig 'EndSection' |
addconfig 'EndSection' |
70 |
fi |
fi |
71 |
|
|
92 |
|
|
93 |
# add cvt modelines |
# add cvt modelines |
94 |
addconfig |
addconfig |
95 |
local cvt="/usr/X11R6/bin/cvt" |
local cvt="/usr/bin/cvt" |
96 |
local modeline |
local modeline |
97 |
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:_.*\":\":') |
98 |
addconfig "${modeline}" |
addconfig "${modeline}" |
124 |
addconfig ' Option "PasswordFile" "/root/.vnc/passwd"' |
addconfig ' Option "PasswordFile" "/root/.vnc/passwd"' |
125 |
fi |
fi |
126 |
addconfig 'EndSection' |
addconfig 'EndSection' |
127 |
|
|
128 |
|
# disable screen blanks, use xscreensaver for it |
129 |
|
CONFIG="/etc/X11/xorg.conf.d/25-server.conf" |
130 |
|
clearconfig |
131 |
|
addconfig 'Section "ServerFlags"' |
132 |
|
addconfig ' Option "BlankTime" "0"' |
133 |
|
addconfig ' Option "StandbyTime" "0"' |
134 |
|
addconfig ' Option "SuspendTime" "0"' |
135 |
|
addconfig ' Option "OffTime" "0"' |
136 |
|
addconfig 'EndSection' |
137 |
|
|
138 |
|
# fixes |
139 |
|
# disable LVDS-1 on zotacs or enable it if hdmi was requested |
140 |
|
if [[ $(alx-hwdetection system) = zotac ]] |
141 |
|
then |
142 |
|
CONFIG="/etc/X11/xorg.conf.d/30-fix-zotac.conf" |
143 |
|
clearconfig |
144 |
|
addconfig 'Section "Monitor"' |
145 |
|
addconfig ' Identifier "LVDS1"' |
146 |
|
if [[ ${cfg_graphic_hdmi} = enable ]] |
147 |
|
then |
148 |
|
# add cvt modelines |
149 |
|
addconfig |
150 |
|
local cvt="/usr/bin/cvt" |
151 |
|
local modeline |
152 |
|
modeline=$("${cvt}" "${cfg_graphic_resolution%x*}" "${cfg_graphic_resolution#*x}" "${cfg_graphic_refresh_rate}" | sed -e 's:^:\t:g' -e 's:_.*\":\":') |
153 |
|
addconfig "${modeline}" |
154 |
|
else |
155 |
|
addconfig ' Option "Ignore" "True"' |
156 |
|
fi |
157 |
|
addconfig 'EndSection' |
158 |
|
else |
159 |
|
# clear this file |
160 |
|
if [ -f /etc/X11/xorg.conf.d/30-fix-zotac.conf ] |
161 |
|
then |
162 |
|
rm /etc/X11/xorg.conf.d/30-fix-zotac.conf |
163 |
|
fi |
164 |
|
fi |
165 |
} |
} |