Magellan Linux

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

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

revision 2382 by niro, Tue Jun 14 13:51:37 2011 UTC revision 2479 by niro, Mon Jun 27 15:20:33 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 611  import_settings_local() Line 625  import_settings_local()
625    
626   # setup some standart icons (sysinfo.lnk)   # setup some standart icons (sysinfo.lnk)
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   # basic config   # add shutdown, reboot icons
632   cat ${ALX_SKELETONS}/xtdesktop/xtdeskrc > ${ALX_UNPRIV_HOME}/.xtdesktop/xtdeskrc   local name
633     # default settings
634     declare -i x=30
635     declare -i y=30
636     for i in shutdown reboot
637     do
638     case ${i} in
639     shutdown) name="Herunterfahren" ;;
640     reboot) name="Neustarten" ;;
641     esac
642    
643     generate_icon \
644     --name "${name}" \
645     --command "/usr/lib/alxconfig-ng/bin/user_${i}.sh" \
646     --icon "${ALX_SESSIONS_ICONS}/${i}.png" \
647     --dest "${dest}/${i}.lnk" \
648     --xres "${x}" \
649     --yres "${y}"
650    
651     y=$((${y} + 80))
652     done
653    
654   # last but not least gen a icon with some sys informations   # last but not least gen a icon with some sys informations
655   local sysinfo   local sysinfo
# Line 637  import_settings_local() Line 671  import_settings_local()
671   --name "${sysinfo}" \   --name "${sysinfo}" \
672   --command "exit 0" \   --command "exit 0" \
673   --icon "${ALX_SESSIONS_ICONS}/sysinfo.png" \   --icon "${ALX_SESSIONS_ICONS}/sysinfo.png" \
674   --dest "${ALX_UNPRIV_HOME}/.xtdesktop/sysinfo.lnk" \   --dest "${ALX_UNPRIV_HOME}/.idesktop/sysinfo.lnk" \
675   --xres "${xres}" \   --xres "${xres}" \
676   --yres "${yres}" \   --yres "${yres}" \
677   --icon-width "1" \   --icon-width "1" \
678   --icon-height "1"   --icon-height "1"
679    
  # create a xinitrc  
  echo "exec startfluxbox" > ${ALX_UNPRIV_HOME}/.xinitrc  
   
680   # set correct permissions   # set correct permissions
681   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}
682   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox
683   chmod 0755 ${ALX_UNPRIV_HOME}/.fluxbox   chmod 0755 ${ALX_UNPRIV_HOME}/.fluxbox
684   chmod 0755 ${ALX_UNPRIV_HOME}/.xtdesktop   chmod 0755 ${ALX_UNPRIV_HOME}/.idesktop
685   chmod 0644 ${ALX_UNPRIV_HOME}/.xtdeskrc   if [ -f ${ALX_UNPRIV_HOME}/.ideskrc ]
686   chmod 0644 ${ALX_UNPRIV_HOME}/.xinitrc   then
687     chmod 0644 ${ALX_UNPRIV_HOME}/.ideskrc
688     fi
689  }  }
690    
691  # start|stop  # start|stop

Legend:
Removed from v.2382  
changed lines
  Added in v.2479