Magellan Linux

Diff of /alx-src/branches/alxconf-060/init.d/alxsettings

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

revision 2156 by niro, Tue May 17 21:41:48 2011 UTC revision 2470 by niro, Mon Jun 27 15:07:24 2011 UTC
# Line 51  unset ALX_SERIAL ALX_STATE Line 51  unset ALX_SERIAL ALX_STATE
51  # setup needed directories  # setup needed directories
52  [ ! -d /etc/alxconfig-ng/state ] && install -d /etc/alxconfig-ng/state  [ ! -d /etc/alxconfig-ng/state ] && install -d /etc/alxconfig-ng/state
53    
   
 # read_cmdline ${item}  
 read_cmdline()  
 {  
  local i  
   
  for i in $(< /proc/cmdline)  
  do  
  [[ ${i} = $1 ]] && return 0  
  done  
   
  return 1  
 }  
   
54  update_system_settings()  update_system_settings()
55  {  {
56   rc_mecho Checking system setup ...   rc_mecho Checking system setup ...
# Line 588  import_settings_local() Line 574  import_settings_local()
574   # now generate fluxbox config files   # now generate fluxbox config files
575    
576   # fluxbox main config   # fluxbox main config
577   cat ${ALX_SKELETONS}/fluxbox/init > ${ALX_UNPRIV_HOME}/.fluxbox/init   local fbinit
578     if [ -f ${ALX_SKELETONS}/fluxbox/init ]
579     then
580     fbinit="${ALX_SKELETONS}/fluxbox/init"
581     else
582     fbinit="/usr/share/fluxbox/init"
583     fi
584     cat ${fbinit} > ${ALX_UNPRIV_HOME}/.fluxbox/init
585    
586   # fluxbox autostart   # fluxbox autostart
587   cat ${ALX_SKELETONS}/fluxbox/apps > ${ALX_UNPRIV_HOME}/.fluxbox/apps   CONFIG="${ALX_UNPRIV_HOME}/.fluxbox/apps"
588     # do not show decorations on messages generated with xmessage
589     if [ -x /usr/bin/xmessage ]
590     then
591     addconfig '[app] (xmessage)'
592     addconfig ' [Deco] {NONE}'
593     addconfig '[end]'
594     fi
595     # add icon utility
596     [ -x /usr/bin/idesk ] && addconfig '[startup] {nohup idesk > /dev/null &}'
597     # add numlock utility
598     [ -x /usr/bin/numlockx ] && addconfig '[startup] {nohup numlockx on &}'
599    
600     # fluxbox hotkeys
601     local fbkeys
602     if [ -f ${ALX_SKELETONS}/fluxbox/keys ]
603     then
604     fbkeys="${ALX_SKELETONS}/fluxbox/keys"
605     else
606     fbkeys="/usr/share/fluxbox/keys"
607     fi
608     cat ${fbkeys} > ${ALX_UNPRIV_HOME}/.fluxbox/keys
609    
610   # fluxbox menu header   # fluxbox menu header
611   cat ${ALX_SKELETONS}/fluxbox/menu.header > ${ALX_UNPRIV_HOME}/.fluxbox/menu   cat ${ALX_SKELETONS}/fluxbox/menu.header > ${ALX_UNPRIV_HOME}/.fluxbox/menu
# Line 609  import_settings_local() Line 623  import_settings_local()
623   # add a newline (maybe there is no crlf in the footer)   # add a newline (maybe there is no crlf in the footer)
624   echo >> ${ALX_UNPRIV_HOME}/.fluxbox/menu   echo >> ${ALX_UNPRIV_HOME}/.fluxbox/menu
625    
   
626   # setup some standart icons (sysinfo.lnk)   # setup some standart icons (sysinfo.lnk)
  # basic config  
  cat ${ALX_SKELETONS}/xtdesktop/xtdeskrc > ${ALX_UNPRIV_HOME}/.xtdeskrc  
   
627   # clean desktop icon location   # clean desktop icon location
628   [ -d ${ALX_UNPRIV_HOME}/.xtdesktop ] && rm -rf ${ALX_UNPRIV_HOME}/.xtdesktop   [ -d ${ALX_UNPRIV_HOME}/.idesktop ] && rm -rf ${ALX_UNPRIV_HOME}/.idesktop
629   install -d ${ALX_UNPRIV_HOME}/.xtdesktop   install -d ${ALX_UNPRIV_HOME}/.idesktop
630    
631   # last but not least gen a icon with some sys informations   # last but not least gen a icon with some sys informations
632   local sysinfo   local sysinfo
# Line 638  import_settings_local() Line 648  import_settings_local()
648   --name "${sysinfo}" \   --name "${sysinfo}" \
649   --command "exit 0" \   --command "exit 0" \
650   --icon "${ALX_SESSIONS_ICONS}/sysinfo.png" \   --icon "${ALX_SESSIONS_ICONS}/sysinfo.png" \
651   --dest "${ALX_UNPRIV_HOME}/.xtdesktop/sysinfo.lnk" \   --dest "${ALX_UNPRIV_HOME}/.idesktop/sysinfo.lnk" \
652   --xres "${xres}" \   --xres "${xres}" \
653   --yres "${yres}" \   --yres "${yres}" \
654   --icon-width "1" \   --icon-width "1" \
655   --icon-height "1"   --icon-height "1"
656    
  # create a xinitrc  
  echo "exec startfluxbox" > ${ALX_UNPRIV_HOME}/.xinitrc  
   
657   # set correct permissions   # set correct permissions
658   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}
659   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox
660   chmod 0755 ${ALX_UNPRIV_HOME}/.fluxbox   chmod 0755 ${ALX_UNPRIV_HOME}/.fluxbox
661   chmod 0755 ${ALX_UNPRIV_HOME}/.xtdesktop   chmod 0755 ${ALX_UNPRIV_HOME}/.idesktop
662   chmod 0644 ${ALX_UNPRIV_HOME}/.xtdeskrc   if [ -f ${ALX_UNPRIV_HOME}/.ideskrc ]
663   chmod 0644 ${ALX_UNPRIV_HOME}/.xinitrc   then
664     chmod 0644 ${ALX_UNPRIV_HOME}/.ideskrc
665     fi
666  }  }
667    
668  # start|stop  # start|stop

Legend:
Removed from v.2156  
changed lines
  Added in v.2470