Magellan Linux

Diff of /alx-src/trunk/tinyalxconfig-ng/functions/config_sessions.sh

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

revision 484 by niro, Sat Jun 7 17:10:04 2008 UTC revision 518 by niro, Sun Jun 22 22:26:47 2008 UTC
# Line 1  Line 1 
1  # $Header: /home/cvsd/alx-cvs/alx-src/tinyalxconfig-ng/functions/config_sessions.sh,v 1.3 2008-06-07 17:10:04 niro Exp $  # $Header: /home/cvsd/alx-cvs/alx-src/tinyalxconfig-ng/functions/config_sessions.sh,v 1.5 2008-06-22 22:26:47 niro Exp $
2  # configures ica-sessions on the host via mysql db settings  # configures ica-sessions on the host via mysql db settings
3    
4  get_sessions_settings()  get_sessions_settings()
# Line 40  get_autostart_settings() Line 40  get_autostart_settings()
40   export ALX_AUTOSTART   export ALX_AUTOSTART
41  }  }
42    
43    get_theme_settings()
44    {
45     # get settings from database
46     ALX_THEME=$(mysqldo "select theme from cfg_theme where serial='${ALX_SERIAL}'")
47    
48     # default setting (use old alx-theme atm)
49     [[ -z ${ALX_THEME} ]] && ALX_THEME=LemonSpace
50    
51     export ALX_THEME
52    }
53    
54  get_screensaver_settings()  get_screensaver_settings()
55  {  {
56   ALX_SCRN_SAVER=$(mysqldo "select screensaver from cfg_screensaver where serial='${ALX_SERIAL}'")   ALX_SCRN_SAVER=$(mysqldo "select screensaver from cfg_screensaver where serial='${ALX_SERIAL}'")
# Line 322  generate_all_desktop_icons() Line 333  generate_all_desktop_icons()
333   xres="$(( ${xres} - 120 ))"   xres="$(( ${xres} - 120 ))"
334   yres="$(( ${yres} - 80 ))"   yres="$(( ${yres} - 80 ))"
335    
  # basic config  
  cat ${ALX_SKELETONS}/xtdesktop/xtdeskrc > ${ALX_UNPRIV_HOME}/.xtdeskrc  
   
336   # clean desktop icon location   # clean desktop icon location
337   [ -d ${ALX_UNPRIV_HOME}/.xtdesktop ] && rm -rf ${ALX_UNPRIV_HOME}/.xtdesktop   [ -d ${ALX_UNPRIV_HOME}/.xtdesktop ] && rm -rf ${ALX_UNPRIV_HOME}/.xtdesktop
338   install -d ${ALX_UNPRIV_HOME}/.xtdesktop   install -d ${ALX_UNPRIV_HOME}/.xtdesktop
# Line 429  generate_all_desktop_icons() Line 437  generate_all_desktop_icons()
437   # restore orig values of xres   # restore orig values of xres
438   xres="$(( ${xres} + 120 ))"   xres="$(( ${xres} + 120 ))"
439   # default y pos (full yres -22 = cur yres + 58 !)   # default y pos (full yres -22 = cur yres + 58 !)
440   yres="$(( ${yres} + 58 ))"   #yres="$(( ${yres} + 58 ))"
441     # place it at top
442     yres="-5"
443   # middle of the screen   # middle of the screen
444   # (no txt - length required, xtdesk manage that itself)   # (no txt - length required, xtdesk manage that itself)
445   xres="$(( ${xres} / 2))"   xres="$(( ${xres} / 2))"
# Line 447  generate_all_desktop_icons() Line 457  generate_all_desktop_icons()
457    
458  config_sessions()  config_sessions()
459  {  {
460     # get theme settings
461     get_theme_settings
462    
463   # generate ica session files   # generate ica session files
464   generate_ica_session_files   generate_ica_session_files
465    
# Line 459  config_sessions() Line 472  config_sessions()
472   local icon   local icon
473   local i   local i
474    
475     # basic config for xtdeskop
476     cat ${ALX_SKELETONS}/xtdesktop/xtdeskrc-${ALX_THEME} > ${ALX_UNPRIV_HOME}/.xtdeskrc
477    
478   # now setup fluxbox for user station   # now setup fluxbox for user station
479    
480   # create a fresh fluxbox directory   # create a fresh fluxbox directory
# Line 466  config_sessions() Line 482  config_sessions()
482   install -d ${ALX_UNPRIV_HOME}/.fluxbox   install -d ${ALX_UNPRIV_HOME}/.fluxbox
483    
484   # now generate fluxbox config files   # now generate fluxbox config files
485     # copy theme
486     [[ ! -d /usr/share/fluxbox/styles ]] && install -d /usr/share/fluxbox/styles
487     cat ${ALX_SKELETONS}/fluxbox/themes/${ALX_THEME} > /usr/share/fluxbox/styles/default
488    
489   # fluxbox main config   # fluxbox main config
490   cat ${ALX_SKELETONS}/fluxbox/init \   cat ${ALX_SKELETONS}/fluxbox/init > ${ALX_UNPRIV_HOME}/.fluxbox/init
  > ${ALX_UNPRIV_HOME}/.fluxbox/init  
491    
492   # fluxbox autostart   # fluxbox autostart
493   cat ${ALX_SKELETONS}/fluxbox/apps \   cat ${ALX_SKELETONS}/fluxbox/apps > ${ALX_UNPRIV_HOME}/.fluxbox/apps
  > ${ALX_UNPRIV_HOME}/.fluxbox/apps  
494    
495   # add screensaver   # add screensaver
496   if [[ -n ${ALX_SCRN_SAVER} ]] && [[ -n ${ALX_SCRN_TIMEOUT} ]]   if [[ -n ${ALX_SCRN_SAVER} ]] && [[ -n ${ALX_SCRN_TIMEOUT} ]]
# Line 499  config_sessions() Line 516  config_sessions()
516   fi   fi
517    
518   # fluxbox hotkeys   # fluxbox hotkeys
519   cat ${ALX_SKELETONS}/fluxbox/keys \   cat ${ALX_SKELETONS}/fluxbox/keys > ${ALX_UNPRIV_HOME}/.fluxbox/keys
  > ${ALX_UNPRIV_HOME}/.fluxbox/keys  
520    
521   # fluxbox menu header   # fluxbox menu header
522   cat ${ALX_SKELETONS}/fluxbox/menu.header \   cat ${ALX_SKELETONS}/fluxbox/menu.header > ${ALX_UNPRIV_HOME}/.fluxbox/menu
  > ${ALX_UNPRIV_HOME}/.fluxbox/menu  
523    
524   # now fix it with proper messages :P   # now fix it with proper messages :P
525   local ver="$(< /etc/mageversion)"   local ver="$(< /etc/mageversion)"
526   sed -i "s:@CHANGEME@:tinyALX-${ver}  #${ALX_SERIAL}:g" \   sed -i "s:@CHANGEME@:tinyALX-${ver}  #${ALX_SERIAL}:g" ${ALX_UNPRIV_HOME}/.fluxbox/menu
  ${ALX_UNPRIV_HOME}/.fluxbox/menu  
527    
528   # add a newline (maybe there is no crlf in the header)   # add a newline (maybe there is no crlf in the header)
529   echo >> ${ALX_UNPRIV_HOME}/.fluxbox/menu   echo >> ${ALX_UNPRIV_HOME}/.fluxbox/menu
# Line 526  config_sessions() Line 540  config_sessions()
540   get_other_menuitems >> ${ALX_UNPRIV_HOME}/.fluxbox/menu   get_other_menuitems >> ${ALX_UNPRIV_HOME}/.fluxbox/menu
541    
542   # fluxbox menu footer   # fluxbox menu footer
543   cat ${ALX_SKELETONS}/fluxbox/menu.footer \   cat ${ALX_SKELETONS}/fluxbox/menu.footer >> ${ALX_UNPRIV_HOME}/.fluxbox/menu
  >> ${ALX_UNPRIV_HOME}/.fluxbox/menu  
544    
545   # add a newline (maybe there is no crlf in the footer)   # add a newline (maybe there is no crlf in the footer)
546   echo >> ${ALX_UNPRIV_HOME}/.fluxbox/menu   echo >> ${ALX_UNPRIV_HOME}/.fluxbox/menu

Legend:
Removed from v.484  
changed lines
  Added in v.518