SHARE
TWEET

~/.xinitrc_puppy

s243a Mar 14th, 2019 (edited) 21 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2. # $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $
  3. #120718 redesign for startup on slow computers. see also /sbin/pup_event_frontend_d and delayedrun.
  4. #130202 xrandr set vert freq. see also /usr/sbin/quicksetup.
  5. #130212 removed glipper code, see latest glipper pet.
  6. #130525 old pc celeron 2ghz cpu, 256mb ram, CPUSPEED=1999, 1st bootup rox failed to start. try experiment.
  7.  
  8. #[ -f /etc/desktop_app ] && read -r desktop < /etc/desktop_app #Commented out by s243a
  9. [ "$desktop" = "" ] && desktop=rox
  10.  
  11. . /etc/rc.d/PUPSTATE
  12.  
  13. #v4.01 BK daemon to handle kernel uevents...
  14. echo '' > /var/local/pup_event_icon_change_flag
  15. /sbin/clean_desk_icons #v4.02 tidy up drive icons first.
  16. #/sbin/pup_event_frontend_d &
  17. #130525 ...start this further down.
  18.  
  19. #w482 reshape background image if widescreen...
  20. #120708 need to reshape for PUPMODE=2 also...
  21. #[ $PUPMODE -eq 5 ] && /usr/sbin/background_reshape
  22. NEEDRESHAPE='yes'
  23. [ -f /usr/share/backgrounds_original/ORIGINAL-default.jpg ] && NEEDRESHAPE='no'
  24. [ -f /usr/share/backgrounds_original/ORIGINAL-default.png ] && NEEDRESHAPE='no'
  25. [ "$NEEDRESHAPE" = "yes" ] && /usr/sbin/background_reshape
  26.  
  27. userresources=$HOME/.Xresources
  28. usermodmap=$HOME/.Xmodmap
  29. sysresources=/usr/lib/X11/xinit/Xresources
  30. sysmodmap=/usr/lib/X11/xinit/.Xmodmap
  31.  
  32. # merge in defaults and keymaps
  33.  
  34. if [ -f $sysresources ]; then
  35.     xrdb -merge -nocpp $sysresources
  36. fi
  37.  
  38. if [ -f $sysmodmap ]; then
  39.     xmodmap $sysmodmap
  40. fi
  41.  
  42. if [ -f $userresources ]; then
  43.     xrdb -merge -nocpp $userresources
  44. fi
  45.  
  46. if [ -f $usermodmap ]; then
  47.     xmodmap $usermodmap
  48. fi
  49.  
  50. CURRENTWM="`cat /etc/windowmanager`"
  51. if [ "$CURRENTWM" = "startkde" ];then
  52.  /sbin/pup_event_frontend_d & #130525
  53.  exec startkde
  54. fi
  55. CURRENTWM="`cat /etc/windowmanager`"
  56. if [ "$CURRENTWM" = "startxfce4" ];then
  57.  /sbin/pup_event_frontend_d & #130525
  58.  exec startxfce4
  59. rox --pinboard=
  60. fi
  61.  
  62. #100501 if full nvidia pkg installed, it has a gui config app...
  63. [ -f /root/.nvidia-settings-rc ] && nvidia-settings --load-config-only
  64.  
  65. [ -f $HOME/.xgamma-gamma ] && /bin/sh $HOME/.xgamma-gamma #100215 see /usr/sbin/xgamma-gui.
  66.  
  67. #0.9.8 sync selection-buffer and clipboard. only useful for older apps
  68. #such as rxvt that use the selection-buffer...
  69. [ -f /usr/bin/autocutsel ] && /usr/bin/autocutsel &
  70. #...disadvantage of this is it creates a little square bottom-right of screen.
  71.  
  72. if [ -e /tmp/videomode ];then #xvesa only: testing a video mode
  73.  video-wizard &
  74. fi
  75.  
  76. [ -f /usr/local/bin/agenda_chk ] && agenda_chk &
  77.  
  78. #v1.0.7 set by xrandrshell, part of xorg wizard... v3.99...
  79. if [ -f /etc/xrandrindex ];then
  80.   #v3.99 workround for dual monitors, 'head -n 1'....
  81.   XRANDRDEFAULT="$(xrandr -q | grep '\*' | tr -s ' ' | grep '^ [0-9]' | cut -f 2,3 -d ' ' | cut -f 1 -d '*' | tr ' ' '@' | head -n 1)" #130202 return 1024x768@60.0
  82.   XRANDRINDEX="`cat /etc/xrandrindex`" #v3.99 XRANDRINDEX now is XxY resolution. #130202 now vertxhoriz@freq (refer quicksetup).
  83.   #but do not switch if default is already this resolution....
  84.   if [ "$XRANDRINDEX" = "$XRANDRDEFAULT" ];then
  85.    rm -f /etc/xrandrindex
  86.   else
  87.    echo "$XRANDRINDEX"|grep -q "@"
  88.    case $? in
  89.     1)NEW_XY="$XRANDRINDEX"
  90.     xrandr -s $NEW_XY #131124 (see quicksetup)
  91.     ;;
  92.     *)NEW_XY="$(echo -n "$XRANDRINDEX" | cut -f 1 -d '@')" #130202
  93.     NEW_VFREQ="$(echo -n "$XRANDRINDEX" | cut -f 2 -d '@')" #130202
  94.     xrandr -s $NEW_XY -r $NEW_VFREQ #130202
  95.     ;;
  96.    esac
  97.   fi
  98. fi
  99.  
  100. if [ -f /root/.xset.sh ];then
  101.  #this is created by /usr/bin/pupx...
  102.  eval "/root/.xset.sh"
  103. else
  104.  ##Xorg has it's own fontpath settings in /etc/X11/xorg.conf...
  105.  #if [ "`readlink /usr/bin/X`" != "Xorg" ];then
  106.  # #xset fp+ /usr/lib/X11/fonts/Type1/
  107.  # #xset fp+ /usr/lib/X11/fonts/TTF/
  108.  # xset fp+ /usr/share/fonts/default/Type1/
  109.  # xset fp+ /usr/share/fonts/default/TTF/
  110.  #fi
  111.  xset s 600 600 s blank
  112. fi
  113.  
  114. #v1.0.7 also see /etc/rc.d/rc.local0
  115. if [ -f /root/.fonts/fonts.dir ];then
  116.  xset fp+ /root/.fonts/
  117. fi
  118.  
  119. [ -f /usr/bin/xsetroot ] && xsetroot -cursor_name top_left_arrow
  120.  
  121. #relocates right-side icons to actual right-side of screen...
  122. /usr/sbin/fixPuppyPin /root/Choices/ROX-Filer/PuppyPin #v1.0.7
  123.  
  124. sleep 1 # let the dust settle
  125.  
  126. case $desktop in
  127.  pcmanfm) pcmanfm --desktop & ;;
  128.  rox)
  129.     if [ -f /root/Choices/ROX-Filer/PuppyPan1 ];then
  130.         roxfiler -p /root/Choices/ROX-Filer/PuppyPin -r /root/Choices/ROX-Filer/PuppyPan1
  131.     else
  132.         roxfiler -p /root/Choices/ROX-Filer/PuppyPin
  133.     fi
  134.     ;;
  135. esac
  136.  
  137. /sbin/pup_event_frontend_d & #130525 moved down.
  138.  
  139. #v2.0.0
  140. /usr/sbin/delayedrun &
  141.  
  142. #v2.01 hide cursor when not moving... (setup in /usr/sbin/input-wizard)
  143. if [ -f /etc/mousehide ];then
  144.  IDLETIME="`cat /etc/mousehide | cut -f 1 -d ','`"
  145.  [ ! "$IDLETIME" = "0" ] && unclutter -idle $IDLETIME &
  146. fi
  147.  
  148. ##v2.14 rarsa: update xdg menu for w.m. that do not allow includes...
  149. #which ${CURRENTWM}_menu_refresh && ${CURRENTWM}_menu_refresh
  150. #...no, now doing it differently, see /usr/sbin/fixmenus
  151.  
  152. if [ "$CURRENTWM" = "xfwm4" ];then
  153.  if [ "`which xfce4-panel`" != "" ];then
  154.   xfwm4 --daemon #note, starts xfce-mcs-manager daemon also.
  155.   exec xfce4-panel
  156.  fi
  157. fi
  158.  
  159. #v3.91 volume tray applet, thanks to hairywill...
  160. [ -f /usr/bin/absvolume ] && absvolume &
  161.  
  162. #v3.95 support fbpanel tray/taskbar...
  163. #only launch tray for w.m. without inbuilt tray...
  164. if [ "$CURRENTWM" != "jwm" -a "$CURRENTWM" != "icewm" ];then
  165.  if [ -f /usr/bin/fbpanel ];then
  166.   #a bit of a hack: when 3builddistro runs fixmenus, which calls variconlinks,
  167.   #which populates /var/local/icons with symlinks, /usr/local/lib/X11/pixmaps
  168.   #is not yet populated (happens at first boot, from default icon theme)...
  169.   [ ! -e /var/local/icons/home48.png ] && ln -fs /usr/local/lib/X11/pixmaps/* /var/local/icons/
  170.   fbpanel &
  171.  fi
  172.  [ "$desktop" = "rox" ] && [ -f /usr/bin/lxpanel ] && lxpanel &
  173. fi
  174.  
  175. which $CURRENTWM && exec $CURRENTWM
  176. [ -x $CURRENTWM ] && exec $CURRENTWM
  177. [ "$desktop" = "rox" ] && exec jwm
  178.  
  179. ###END###
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top