Guest User

Untitled

a guest
Jun 15th, 2011
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 5.91 KB | None | 0 0
  1. #!/bin/sh
  2. # $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $
  3.  
  4. . /etc/rc.d/PUPSTATE
  5. . /etc/rc.d/BOOTCONFIG
  6.  
  7. if [ -f /root/.jwm/jwm_colors ];then #v3.96
  8. . /root/.jwm/jwm_colors
  9. fi
  10.  
  11. [ -x /usr/sbin/fixicons ] && fixicons #icon fix for lupu by 01micko
  12.  
  13. if [ "$LASTUNIONRECORD" != "$PREVUNIONRECORD" ];then  #sfs fix?
  14. echo "ICONWIPE" >/tmp/pup_event_icon_change_flag
  15. fi
  16.  
  17. #v4.01 BK daemon to handle kernel uevents...
  18. /sbin/clean_desk_icons #v4.02 tidy up drive icons first.
  19. /sbin/pup_event_frontend_d & #v403
  20.  
  21. #w482 reshape background image if widescreen...
  22. [ $PUPMODE -eq 5 ] && /usr/sbin/background_reshape
  23.  
  24. userresources=$HOME/.Xresources
  25. usermodmap=$HOME/.Xmodmap
  26. sysresources=/usr/lib/X11/xinit/Xresources
  27. sysmodmap=/usr/lib/X11/xinit/.Xmodmap
  28.  
  29. # merge in defaults and keymaps
  30.  
  31. if [ -f $sysresources ]; then
  32.     xrdb -merge -nocpp $sysresources
  33. fi
  34.  
  35. if [ -f $sysmodmap ]; then
  36.     xmodmap $sysmodmap
  37. fi
  38.  
  39. if [ -f $userresources ]; then
  40.     xrdb -merge -nocpp $userresources
  41. fi
  42.  
  43. if [ -f $usermodmap ]; then
  44.     xmodmap $usermodmap
  45. fi
  46.  
  47. CURRENTWM="`cat /etc/windowmanager`"
  48. #start compiz
  49. if [[ "$CURRENTWM" != "jwm" && "$CURRENTWM" != "icewm" && "$CURRENTWM" != "openbox" && "$CURRENTWM" != "startfluxbox" ]];then
  50.  if [[ `which compiz` != "" ]];then LIBGL_ALWAYS_INDIRECT=1 compiz --replace --indirect-rendering --sm-disable ccp emerald --replace &
  51.  sleep 3
  52.  fi
  53. fi
  54. if [ "$CURRENTWM" = "startkde" ];then
  55.  exec startkde
  56. fi
  57.  
  58. #100501 if full nvidia pkg installed, it has a gui config app...
  59. [ -f /root/.nvidia-settings-rc ] && nvidia-settings --load-config-only
  60.  
  61. [ -f $HOME/.xgamma-gamma ] && /bin/sh $HOME/.xgamma-gamma #100215 see /usr/sbin/xgamma-gui.
  62.  
  63. #0.9.8 sync selection-buffer and clipboard. only useful for older apps
  64. #such as rxvt that use the selection-buffer...
  65. [ -f /usr/bin/autocutsel ] && /usr/bin/autocutsel &
  66. #...disadvantage of this is it creates a little square bottom-right of screen.
  67.  
  68. if [ -e /tmp/videomode ];then #xvesa only: testing a video mode
  69.  video-wizard &
  70. fi
  71.  
  72. [ -f /usr/local/bin/agenda_chk ] && agenda_chk &
  73.  
  74. #v1.0.7 set by xrandrshell, part of xorg wizard... v3.99...
  75. if [ -f /etc/xrandrindex ];then
  76.   #v3.99 workround for dual monitors, 'head -n 1'....
  77.   XYDEFAULT="`xrandr | grep '\*' | tr -s " " | grep '^ [0-9]' | cut -f 2 -d " " | head -n 1`"
  78.   XRANDRINDEX="`cat /etc/xrandrindex`" #v3.99 XRANDRINDEX now is XxY resolution.
  79.   #but do not switch if default is already this resolution....
  80.   if [ "$XRANDRINDEX" = "$XYDEFAULT" ];then
  81.    rm -f /etc/xrandrindex
  82.   else
  83.    xrandr -s $XRANDRINDEX
  84.   fi
  85. fi
  86.  
  87.  
  88. if [ -f /root/.xset.sh ];then
  89.  #this is created by /usr/bin/pupx...
  90.  eval "/root/.xset.sh"
  91. else
  92.  ##Xorg has it's own fontpath settings in /etc/X11/xorg.conf...
  93.  #if [ "`readlink /usr/bin/X`" != "Xorg" ];then
  94.  # #xset fp+ /usr/lib/X11/fonts/Type1/
  95.  # #xset fp+ /usr/lib/X11/fonts/TTF/
  96.  # xset fp+ /usr/share/fonts/default/Type1/
  97.  # xset fp+ /usr/share/fonts/default/TTF/
  98.  #fi
  99.  xset s 600 600 s blank
  100. fi
  101.  
  102. #v1.0.7 also see /etc/rc.d/rc.local0
  103. if [ -f /root/.fonts/fonts.dir ];then
  104.  xset fp+ /root/.fonts/
  105. fi
  106.  
  107. [ -f /usr/bin/xsetroot ] && xsetroot -cursor_name top_left_arrow
  108.  
  109. #v555 w003
  110. #[ -f /usr/bin/xfce-mcs-manager ] && xfce-mcs-manager
  111. #[ "$CURRENTWM" = "xfwm4" ] && xfce-mcs-manager
  112. #...no need to start it here, fvwm4 below will start it automatically.
  113.  
  114. #if jwm, icewm, openbox or fluxbox then we run rox-desktop #micko 311010 v luci-234
  115. if [[ "$CURRENTWM" != "startxfce4" && "$CURRENTWM" != "startkde" ]];then
  116. #relocates right-side icons to actual right-side of screen...
  117.  /usr/sbin/fixPuppyPin /root/Choices/ROX-Filer/PuppyPin #v1.0.7
  118.  
  119.  #w468 on old PCs this sometimes does not start, see further down...
  120.  if [ -f /root/Choices/ROX-Filer/PuppyPan1 ];then
  121.   rox -p /root/Choices/ROX-Filer/PuppyPin -r /root/Choices/ROX-Filer/PuppyPan1
  122.   else
  123.   rox -p /root/Choices/ROX-Filer/PuppyPin
  124.  fi
  125. fi
  126. #v2.0.0
  127. /usr/sbin/delayedrun &
  128.  
  129. #v2.01 hide cursor when not moving... (setup in /usr/sbin/input-wizard)
  130. if [ -f /etc/mousehide ];then
  131.  IDLETIME="`cat /etc/mousehide | cut -f 1 -d ','`"
  132.  [ ! "$IDLETIME" = "0" ] && unclutter -idle $IDLETIME &
  133. fi
  134.  
  135. ##v2.14 rarsa: update xdg menu for w.m. that do not allow includes...
  136. #which ${CURRENTWM}_menu_refresh && ${CURRENTWM}_menu_refresh
  137. #...no, now doing it differently, see /usr/sbin/fixmenus
  138.  
  139. #v2.17 removed, interferes with clipboard in Composer....
  140. ##v2.15 disovered by GuestToo...
  141. #[ "`which glipper`" != "" ] && glipper &
  142. #v2.17 made it optional...
  143. [ -f /root/.glipper_on ] && glipper &
  144.  
  145. if [ "$CURRENTWM" = "xfwm4" ];then
  146.  if [ "`which xfce4-panel`" != "" ];then
  147.   xfwm4 --daemon #note, starts xfce-mcs-manager daemon also.
  148.   exec xfce4-panel
  149.  fi
  150. fi
  151.  
  152. #v3.91 volume tray applet, thanks to hairywill... v3.96 MENU_BG variable...
  153. if [ -f /usr/bin/absvolume ];then
  154.  if [ "$MENU_BG" = "" ];then
  155.   absvolume &
  156.  else
  157.   absvolume -bg $MENU_BG &
  158.  fi
  159. fi
  160.  
  161. #v3.95 support fbpanel tray/taskbar...
  162. #only launch tray for w.m. without inbuilt tray...
  163. if [[ "$CURRENTWM" != "jwm" && "$CURRENTWM" != "icewm" && "$CURRENTWM" != "startxfce4" && "$CURRENTWM" != "startfluxbox" ]];then
  164.  if [ -f /usr/bin/fbpanel ];then
  165.   #a bit of a hack: when 3builddistro runs fixmenus, which calls variconlinks,
  166.   #which populates /var/local/icons with symlinks, /usr/local/lib/X11/pixmaps
  167.   #is not yet populated (happens at first boot, from default icon theme)...
  168.   [ ! -e /var/local/icons/home48.png ] && ln -fs /usr/local/lib/X11/pixmaps/* /var/local/icons/
  169.   fbpanel &
  170.  fi
  171.  [ -f /usr/bin/lxpanel ] && lxpanel &
  172. fi
  173.  
  174. ##w468 rox may not start old hardware, try again...
  175. #PS="`ps`"
  176. #if [ "`echo "$PS" | grep 'ROX\-Filer'`" = "" ];then
  177. # touch /tmp/roxfilerstartupproblem #see /sbin/pup_event_frontend_d
  178. # sleep 0.2
  179. # rox -p /root/Choices/ROX-Filer/PuppyPin
  180. #fi
  181.  
  182. #exec $CURRENTWM
  183. #v2.11 GuestToo suggested this improvement...
  184. which $CURRENTWM && exec $CURRENTWM
  185. [ -x $CURRENTWM ] && exec $CURRENTWM
  186. exec jwm
  187.  
  188. ###END###
Advertisement
Add Comment
Please, Sign In to add comment