--- alx-src/branches/alxconf-060/functions/config_sessions.sh 2011/06/27 15:05:20 2468 +++ alx-src/branches/alxconf-060/functions/config_sessions.sh 2011/06/27 15:07:00 2469 @@ -308,6 +308,45 @@ y=$((${y} + 80)) done + # add shutdown, reboot icons + for i in shutdown reboot + do + # abort if empty + [[ -z ${i} ]] && continue + + # new line if x > xres + if [ ${x} -ge ${xres} ] + then + x=30 + y=$((${y} + 80)) + fi + + # new row if y > yres + if [ ${y} -ge ${yres} ] + then + x=$((${x} + 120)) + y=30 + + # re-check x + [ ${x} -ge ${xres} ] && x=30 + fi + + case ${i} in + shutdown) name="Herunterfahren" + reboot) name="Neustarten" + esac + + generate_icon \ + --name "${name}" \ + --command "/usr/lib/alxconfig-ng/bin/user_${i}.sh" \ + --icon "${ALX_SESSIONS_ICONS}/${i}.png" \ + --dest "${dest}/${i}.lnk" \ + --xres "${x}" \ + --yres "${y}" + + y=$((${y} + 80)) + done + # last but not least gen a icon with some sys informations local sysinfo local hostname @@ -344,6 +383,8 @@ local all_other_ids local CONFIG local screensaver_passwd_cmd + local fbinit + local fbkeys # get all session ids from database all_ses_ids=$(mysqldo "select id from cfg_sessions where serial='${ALX_SERIAL}'") @@ -366,7 +407,13 @@ # now generate fluxbox config files # fluxbox main config - cat ${ALX_SKELETONS}/fluxbox/init > ${ALX_UNPRIV_HOME}/.fluxbox/init + if [ -f ${ALX_SKELETONS}/fluxbox/init ] + then + fbinit="${ALX_SKELETONS}/fluxbox/init" + else + fbinit="/usr/share/fluxbox/init" + fi + cat ${fbinit} > ${ALX_UNPRIV_HOME}/.fluxbox/init # fluxbox autostart CONFIG="${ALX_UNPRIV_HOME}/.fluxbox/apps" @@ -403,7 +450,13 @@ fi # fluxbox hotkeys - cat ${ALX_SKELETONS}/fluxbox/keys > ${ALX_UNPRIV_HOME}/.fluxbox/keys + if [ -f ${ALX_SKELETONS}/fluxbox/keys ] + then + fbkeys="${ALX_SKELETONS}/fluxbox/keys" + else + fbkeys="/usr/share/fluxbox/keys" + fi + cat ${fbkeys} > ${ALX_UNPRIV_HOME}/.fluxbox/keys # generate a fluxbox menu CONFIG="${ALX_UNPRIV_HOME}/.fluxbox/menu"