Magellan Linux

Diff of /alx-src/branches/alxconf-060/functions/config_x11.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2148 by niro, Tue May 17 11:46:16 2011 UTC revision 3478 by niro, Fri Apr 13 18:13:13 2012 UTC
# Line 8  config_display_manager() Line 8  config_display_manager()
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()
# Line 24  config_x11() Line 26  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
# Line 32  config_x11() Line 34  config_x11()
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
# Line 65  config_x11() Line 67  config_x11()
67   CONFIG="/etc/X11/xorg.conf.d/25-module.conf"   CONFIG="/etc/X11/xorg.conf.d/25-module.conf"
68   clearconfig   clearconfig
69   addconfig 'Section "Module"'   addconfig 'Section "Module"'
70   addconfig ' Load vnc'   addconfig ' Load "vnc"'
71   addconfig 'EndSection'   addconfig 'EndSection'
72   fi   fi
73    
# Line 92  config_x11() Line 94  config_x11()
94    
95   # add cvt modelines   # add cvt modelines
96   addconfig   addconfig
97   local cvt="/usr/X11R6/bin/cvt"   local cvt="/usr/bin/cvt"
98   local modeline   local modeline
99   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:_.*\":\":')
100   addconfig "${modeline}"   addconfig "${modeline}"
# Line 124  config_x11() Line 126  config_x11()
126   addconfig ' Option "PasswordFile" "/root/.vnc/passwd"'   addconfig ' Option "PasswordFile" "/root/.vnc/passwd"'
127   fi   fi
128   addconfig 'EndSection'   addconfig 'EndSection'
129    
130     # disable screen blanks, use xscreensaver for it
131     CONFIG="/etc/X11/xorg.conf.d/25-server.conf"
132     clearconfig
133     addconfig 'Section "ServerFlags"'
134     addconfig ' Option "BlankTime" "0"'
135     addconfig ' Option "StandbyTime" "0"'
136     addconfig ' Option "SuspendTime" "0"'
137     addconfig ' Option "OffTime" "0"'
138     addconfig 'EndSection'
139    
140     # fixes
141     # disable LVDS-1 on zotacs or enable it if hdmi was requested
142     if [[ $(alx-hwdetection system) = zotac ]]
143     then
144     CONFIG="/etc/X11/xorg.conf.d/30-fix-zotac.conf"
145     clearconfig
146     addconfig 'Section "Monitor"'
147     addconfig ' Identifier "LVDS1"'
148     if [[ ${cfg_graphic_hdmi} = enable ]]
149     then
150     # add cvt modelines
151     addconfig
152     local cvt="/usr/bin/cvt"
153     local modeline
154     modeline=$("${cvt}" "${cfg_graphic_resolution%x*}" "${cfg_graphic_resolution#*x}" "${cfg_graphic_refresh_rate}" | sed -e 's:^:\t:g' -e 's:_.*\":\":')
155     addconfig "${modeline}"
156     else
157     addconfig ' Option "Ignore" "True"'
158     fi
159     addconfig 'EndSection'
160     else
161     # clear this file
162     if [ -f /etc/X11/xorg.conf.d/30-fix-zotac.conf ]
163     then
164     rm /etc/X11/xorg.conf.d/30-fix-zotac.conf
165     fi
166     fi
167  }  }

Legend:
Removed from v.2148  
changed lines
  Added in v.3478