--- alx-src/trunk/alxconfig-ng/functions/config_sessions.sh 2005/08/18 02:51:16 291 +++ alx-src/branches/alxconf-060/functions/config_sessions.sh 2011/06/15 12:43:55 2401 @@ -1,48 +1,17 @@ -# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/config_sessions.sh,v 1.10 2005-08-18 02:51:16 niro Exp $ +# $Id$ # configures ica-sessions on the host via mysql db settings -get_sessions_settings() +fix_whitespaces() { - local x i all count - - # all arrays: - # -> session1 session2 ... sessionN - - # get settings from database - all=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ - "select filename from cfg_sessions where serial='${ALX_SERIAL}'") - - # split'em up and put in an array (only if $all not zero) - declare -i i=0 - if [ -n "${all}" ] - then - for x in ${all} - do - ALX_SESSIONS[${i}]=${x} - ((i++)) - done - count=${i} - else - count=0 - fi - - export ALX_SESSIONS + local var="$@" + echo "${var//\ /_}" } -get_autostart_settings() +# helper function to create citrix session files +generate_ica_session_file() { - # get settings from database - ALX_AUTOSTART=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ - "select session from cfg_autostart where serial='${ALX_SERIAL}'") - - export ALX_AUTOSTART -} - -generate_ica_session_files() -{ - local all_ids local i - local x + local num local server local ses_session local ses_filename @@ -50,144 +19,364 @@ local ses_domain local ses_password local ses_browseradrs - local ses_colors + local CONFIG + + # very basic getops + for i in $* + do + case $1 in + --session) shift; ses_session="$1" ;; + --filename) shift; ses_filename="$1" ;; + --username) shift; ses_username="$1" ;; + --password) shift; ses_password="$1" ;; + --domain) shift; ses_domain="$1" ;; + --server) shift; ses_browseradrs="$1" ;; + esac + shift + done + + # abort if session, filename or server not given + [[ -z ${ses_session} ]] && return 1 + [[ -z ${ses_filename} ]] && return 1 + [[ -z ${ses_browseradrs} ]] && return 1 + + # write session files + CONFIG="${ALX_ICA_SESSIONS}/${ses_filename}" + clearconfig - # get settings from database - all_ids=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ - "select id from cfg_sessions where serial='${ALX_SERIAL}'") + addconfig '[WFClient]' + addconfig 'Version=2' - for i in ${all_ids} + # use ';' as ifs + declare -i i=0 + for server in ${ses_browseradrs//;/ } do - # get settings - ses_session=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ - "select session from cfg_sessions where serial='${ALX_SERIAL}' and id='${i}'") - - ses_filename=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ - "select filename from cfg_sessions where serial='${ALX_SERIAL}' and id='${i}'") - - ses_username=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ - "select username from cfg_sessions where serial='${ALX_SERIAL}' and id='${i}'") - - ses_domain=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ - "select domain from cfg_sessions where serial='${ALX_SERIAL}' and id='${i}'") - - ses_password=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ - "select password from cfg_sessions where serial='${ALX_SERIAL}' and id='${i}'") - - ses_browseradrs=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ - "select browseradrs from cfg_sessions where serial='${ALX_SERIAL}' and id='${i}'") - - # get the right colors - ses_colors=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ - "select depth from cfg_graphic where serial='${ALX_SERIAL}'") - case ${ses_colors} in - 24) ses_colors="8";; - 16) ses_colors="4";; - 8) ses_colors="2";; - *) ses_colors="2";; - esac - - # write session files - echo '[WFClient]' > ${ALX_ICA_SESSIONS}/${ses_filename} - echo 'Version=2' >> ${ALX_ICA_SESSIONS}/${ses_filename} - OLD_IFS="$IFS" - IFS=";" - declare -i x=0 - for server in ${ses_browseradrs} - do - (( x++ )) - echo "TcpBrowserAddress${x}=${server}" >> ${ALX_ICA_SESSIONS}/${ses_filename} - done - IFS="${OLD_IFS}" - unset x - unset OLD_IFS - - echo 'ScreenPercent=0' >> ${ALX_ICA_SESSIONS}/${ses_filename} - - echo '[ApplicationServers]' >> ${ALX_ICA_SESSIONS}/${ses_filename} - echo "${ses_session}=" >> ${ALX_ICA_SESSIONS}/${ses_filename} - - echo "[${ses_session}]" >> ${ALX_ICA_SESSIONS}/${ses_filename} - echo "Address=${ses_session}" >> ${ALX_ICA_SESSIONS}/${ses_filename} - echo "InitialProgram=#${ses_session}" >> ${ALX_ICA_SESSIONS}/${ses_filename} - echo "DesiredColor=${ses_colors}" >> ${ALX_ICA_SESSIONS}/${ses_filename} - echo 'TransportDriver=TCP/IP' >> ${ALX_ICA_SESSIONS}/${ses_filename} - echo 'WinStationDriver=ICA 3.0' >> ${ALX_ICA_SESSIONS}/${ses_filename} - echo "ClearPassword=${ses_password}" >> ${ALX_ICA_SESSIONS}/${ses_filename} - echo "Username=${ses_username}" >> ${ALX_ICA_SESSIONS}/${ses_filename} - echo "Domain=${ses_domain}" >> ${ALX_ICA_SESSIONS}/${ses_filename} - echo 'UseFullScreen=Yes' >> ${ALX_ICA_SESSIONS}/${ses_filename} - echo 'NoWindowManager=True' >> ${ALX_ICA_SESSIONS}/${ses_filename} + (( i++ )) + num="${i}" + # support newer ica-clients: + # the first address must be named TcpBrowserAddress, but not TcpBrowserAddress1 !! + [[ ${i} -eq 1 ]] && num="" + addconfig "TcpBrowserAddress${num}=${server}" done + + addconfig 'ScreenPercent=0' + addconfig '[ApplicationServers]' + addconfig "${ses_session}=" + addconfig "[${ses_session}]" + addconfig "Address=${ses_session}" + addconfig "InitialProgram=#${ses_session}" + addconfig 'TransportDriver=TCP/IP' + addconfig 'WinStationDriver=ICA 3.0' + addconfig "ClearPassword=${ses__password}" + addconfig "Username=${ses_username}" + addconfig "Domain=${ses_domain}" + addconfig 'UseFullScreen=Yes' + addconfig 'NoWindowManager=True' } -get_other_menuitems() +# generates a sh file to start programs +generate_program_sh() { - local x i count name exec icon workdir + local dest + local name + local exec + local param + local workdir + local CONFIG - # all arrays: - # -> session1 session2 ... sessionN + # very basic getops + for i in $* + do + case $1 in + --name|-n) shift; name="$1" ;; + --exec|-x) shift; exec="$1" ;; + --param|-p) shift; param="$1" ;; + --dest|-d) shift; dest="$1" ;; + --workdir|-w) shift; workdir="$1" ;; + esac + shift + done - # get settings from database - count=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ - "select name from cfg_other_menuitems where serial='${ALX_SERIAL}'") + # abort if name, dest or exec not given + [[ -z ${name} ]] && return 1 + [[ -z ${exec} ]] && return 1 + [[ -z ${dest} ]] && return 1 + + CONFIG="${dest}" + addconfig "#!/bin/sh" + [ -n "${workdir}" ] && addconfig "cd ${workdir}" + addconfig "exec ${exec} ${param}" - # get all instances and put them into an array - if [ -n "${count}" ] + chmod 0755 "${dest}" +} + +# helper functions for generate all desktop icons +generate_icon() +{ + local name + local icon + local command + local dest + local yres + local xres + local iwidth + local iheight + local deficon + local CONFIG + local utility + + # very basic getops + for i in $* + do + case $1 in + --name|-n) shift; name="$1" ;; + --command|-c) shift; command="$1" ;; + --icon|-i) shift; icon="$1" ;; + --dest|-d) shift; dest="$1" ;; + --xres|-x) shift; xres="$1" ;; + --yres|-y) shift; yres="$1" ;; + --icon-width|-w) shift; iwidth="$1" ;; + --icon-height|-h) shift; iheight="$1" ;; + --default-icon) shift; deficon="$1" ;; + esac + shift + done + + # some sanity checks: + + # abort if name or command not given + [[ -z ${name} ]] && return 1 + [[ -z ${command} ]] && return 1 + + # which utility are we using idesk|xtdesk ? + if [ -x /usr/bin/idesk ] + then + utility="idesk" + [[ -z ${dest} ]] && dest="${ALX_UNPRIV_HOME}/.idesktop/${name}.lnk" + else + utility="xtdesk" + [[ -z ${dest} ]] && dest="${ALX_UNPRIV_HOME}/.xtdesktop/${name}.lnk" + fi + + # use some defaults for icon, dest, {x,y}res + [[ -z ${xres} ]] && xres=30 + [[ -z ${yres} ]] && xres=30 + if [[ -z ${icon} ]] || [ ! -f ${icon} ] then - for x in ${count} - do - # to be sure - unset name - unset exec - unset workdir - unset icon - - name=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ - "select name from cfg_other_menuitems where serial='${ALX_SERIAL}' and name='${x}'") - - exec=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ - "select exec from cfg_other_menuitems where serial='${ALX_SERIAL}' and name='${x}'") - - workdir=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ - "select workdir from cfg_other_menuitems where serial='${ALX_SERIAL}' and name='${x}'") - - icon=$(mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \ - "select icon from cfg_other_menuitems where serial='${ALX_SERIAL}' and name='${x}'") - - # debug only - #echo "DEBUG: ${x}: name:'${name}' exec:'${exec}' workdir:'${workdir}' ic$ - - # now echo config line for fluxbox-menu - # make it "configureable" :P - [ -n "${workdir}" ] && workdir="cd ${workdir};" - [ -n "${icon}" ] && icon="[${icon}]" - echo "[exec] (${name}) {${workdir}${exec}} ${icon}" - done + # if no default icon is given use default.png + [[ -z ${deficon} ]] && deficon="default.png" + icon="${ALX_SESSIONS_ICONS}/${deficon}" + fi + + CONFIG="${dest}" + clearconfig + + addconfig 'table Icon' + [[ ${utility} = xtdesk ]] && addconfig ' Type: Program' + addconfig " Caption: ${name}" + addconfig " Command: ${command}" + addconfig " Icon: ${icon}" + addconfig " X: ${xres}" + addconfig " Y: ${yres}" + + # add these only if not zero + if [[ ! -z ${iwidth} ]] && [[ ! -z ${iheight} ]] + then + if [[ ${utility} = xtdesk ]] + then + addconfig " IconWidth: ${iwidth}" + addconfig " IconHeight: ${iheight}" + fi + if [[ ${utility} = idesk ]] + then + addconfig " Width: ${iwidth}" + addconfig " Height: ${iheight}" + fi fi + + addconfig 'end' +fi } -config_sessions() +generate_all_desktop_icons() { - # generate ica session files - generate_ica_session_files + local session_list="$1" + local other_menuitem_list="$2" + local res + local xres + local yres + local x + local y + local i + local name + local progsh_path + local utility + local dest + local rc + + # which utility are we using idesk|xtdesk ? + if [ -x /usr/bin/idesk ] + then + utility="idesk" + dest="${ALX_UNPRIV_HOME}/.idesktop" + rc="${ALX_UNPRIV_HOME}/.ideskrc" + else + utility="xtdesk" + dest="${ALX_UNPRIV_HOME}/.xtdesktop" + rc="${ALX_UNPRIV_HOME}/.xtdeskrc" + fi - # first of all get the vars - get_sessions_settings - get_autostart_settings - local count=${#ALX_SESSIONS[*]} - local icon - local i + # progsh path + progsh_path="${ALX_UNPRIV_HOME}/.alxprogs" + + # get the resolution + res=$(mysqldo "select resolution from cfg_graphic where serial='${ALX_SERIAL}'") + + # split res to x & y + xres="${res%x*}" + yres="${res#*x}" + + # top left edge of the icon is given in config file + # remove a little bit to simulate the bottom-right edge + xres="$(( ${xres} - 120 ))" + yres="$(( ${yres} - 80 ))" + + # clean desktop icon location + [ -d ${dest} ] && rm -rf ${dest} + [ -f ${rc} ] && rm -f ${rc} + install -d ${dest} + +if [[ ${utility} = xtdesk ]] +then + # basic config + cat ${ALX_SKELETONS}/xtdesktop/xtdeskrc > ${ALX_UNPRIV_HOME}/.xtdesktop/xtdeskrc +fi + + # default settings + declare -i x=30 + declare -i y=30 + + # ica icons + for i in ${session_list} + do + # abort if empty + [[ -z ${i} ]] && continue + + # get database information + evaluate_table cfg_sessions "where serial='${ALX_SERIAL}' and id='${i}'" + + # 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 + + generate_icon \ + --name "${cfg_sessions_session}" \ + --command "nice -n 19 wfica ${ALX_ICA_SESSIONS}/$(fix_whitespaces ${cfg_sessions_filename})" \ + --icon "${ALX_SESSIONS_ICONS}/$(fix_whitespaces ${cfg_sessions_session}).png" \ + --dest "${dest}/$(fix_whitespaces ${cfg_sessions_session}).lnk" \ + --xres "${x}" \ + --yres "${y}" + + y=$((${y} + 80)) + done + + for i in ${other_menuitem_list} + do + # abort if empty + [[ -z ${i} ]] && continue + + # get database information + evaluate_table cfg_other_menuitems "where serial='${ALX_SERIAL}' and id='${i}'" - # DEBUG -# declare -i i=0 -# echo count=${count} -# echo "Number of new sessions: ${count}" -# for ((i=0; i < count; i++)) -# do -# echo "${i} - ${ALX_SESSIONS[${i}]}" -# done + # 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 + + generate_icon \ + --name "${cfg_other_menuitems_name}" \ + --command "${progsh_path}/$(fix_whitespaces ${cfg_other_menuitems_name})" \ + --icon "${ALX_SESSIONS_ICONS}/$(fix_whitespaces ${cfg_other_menuitems_name}).png" \ + --dest "${dest}/$(fix_whitespaces ${cfg_other_menuitems_name}).lnk" \ + --xres "${x}" \ + --yres "${y}" \ + --default-icon "default_item.png" + + y=$((${y} + 80)) + done + + # last but not least gen a icon with some sys informations + local sysinfo + local hostname + local osversion + + osversion="$(< /etc/mageversion)" + hostname=$(mysqldo "select hostname from cfg_network where serial='${ALX_SERIAL}'") + sysinfo="Hostname: ${hostname} Serial: #${ALX_SERIAL} OS: alx-${osversion} Kernel: $(uname -r)" + + # now get the right position: + # restore orig values of xres + xres="$(( ${xres} + 120 ))" + # default y pos (full yres -22 = cur yres + 58 !) + yres="$(( ${yres} + 58 ))" + # middle of the screen + # (no txt - length required, xtdesk manage that itself) + xres="$(( ${xres} / 2))" + + generate_icon \ + --name "${sysinfo}" \ + --command "exit 0" \ + --icon "${ALX_SESSIONS_ICONS}/sysinfo.png" \ + --dest "${dest}/sysinfo.lnk" \ + --xres "${xres}" \ + --yres "${yres}" \ + --icon-width "1" \ + --icon-height "1" +} + +config_sessions() +{ + local i + local all_ses_ids + local all_other_ids + local CONFIG + local screensaver_passwd_cmd + + # get all session ids from database + all_ses_ids=$(mysqldo "select id from cfg_sessions where serial='${ALX_SERIAL}'") + # get all other_menutiem ids from database + all_other_ids=$(mysqldo "select id from cfg_other_menuitems where serial='${ALX_SERIAL}'") + + # get screensaver settings + evaluate_table cfg_screensaver + # get autostart settings + evaluate_table cfg_autostart # now setup fluxbox for user station @@ -198,89 +387,107 @@ # now generate fluxbox config files # fluxbox main config - cat ${ALX_SKELETONS}/fluxbox/init \ - > ${ALX_UNPRIV_HOME}/.fluxbox/init + cat ${ALX_SKELETONS}/fluxbox/init > ${ALX_UNPRIV_HOME}/.fluxbox/init # fluxbox autostart - cat ${ALX_SKELETONS}/fluxbox/apps \ - > ${ALX_UNPRIV_HOME}/.fluxbox/apps + cat ${ALX_SKELETONS}/fluxbox/apps > ${ALX_UNPRIV_HOME}/.fluxbox/apps + + CONFIG="${ALX_UNPRIV_HOME}/.fluxbox/apps" + # add screensaver + if [[ ! -z ${cfg_screensaver_screensaver} ]] && [[ ! -z ${cfg_screensaver_screensaver_timeout} ]] + then + if [[ -z ${cfg_screensaver_password} ]] || [[ ${cfg_screensaver_password} = NULL ]] + then + screensaver_passwd_cmd="-nolock" + else + screensaver_passwd_cmd="-cpasswd $(cryptpw -m des ${cfg_screensaver_password})" + fi + + addconfig "[startup] {nohup xautolock -time ${cfg_screensaver_timeout} -locker 'xlock -mode ${cfg_screensaver_screensaver} ${screensaver_passwd_cmd}' > /dev/null &}" + fi # add autostart session - if [[ ${ALX_AUTOSTART} != "" ]] + if [[ ! -z ${cfg_autostart_session} ]] then - echo "[startup] {wfica ${ALX_ICA_SESSIONS}/${ALX_AUTOSTART}}" \ - >> ${ALX_UNPRIV_HOME}/.fluxbox/apps + # sleep one second to wait until busybox is fully initialized and the screen is really centered + addconfig "[startup] {sleep 1 && nohup nice -n 19 wfica ${ALX_ICA_SESSIONS}/$(fix_whitespaces ${cfg_autostart_session}) &}" fi # fluxbox hotkeys - cat ${ALX_SKELETONS}/fluxbox/apps \ - > ${ALX_UNPRIV_HOME}/.fluxbox/keys + cat ${ALX_SKELETONS}/fluxbox/keys > ${ALX_UNPRIV_HOME}/.fluxbox/keys - # fluxbox menu header - cat ${ALX_SKELETONS}/fluxbox/menu.header \ - > ${ALX_UNPRIV_HOME}/.fluxbox/menu + # generate a fluxbox menu + CONFIG="${ALX_UNPRIV_HOME}/.fluxbox/menu" + clearconfig + # fluxbox menu header + cat ${ALX_SKELETONS}/fluxbox/menu.header >> ${ALX_UNPRIV_HOME}/.fluxbox/menu # now fix it with proper messages :P local ver="$(< /etc/mageversion)" - sed -i "s:@CHANGEME@:alx-${ver} #${ALX_SERIAL}:g" \ - ${ALX_UNPRIV_HOME}/.fluxbox/menu - + sed -i "s:@CHANGEME@:alx-${ver} #${ALX_SERIAL}:g" ${ALX_UNPRIV_HOME}/.fluxbox/menu # add a newline (maybe there is no crlf in the header) - echo >> ${ALX_UNPRIV_HOME}/.fluxbox/menu + addconfig - # fluxbox menu sessions - for (( i=0; i < count; i++ )) + # first generate session files + for i in ${all_ses_ids} do - [ -n "${ALX_SESSIONS[${i}]}" ] && \ - echo "[exec] ($(basename ${ALX_SESSIONS[${i}]} .ica)) {wfica ${ALX_ICA_SESSIONS}/${ALX_SESSIONS[${i}]}}" \ - >> ${ALX_UNPRIV_HOME}/.fluxbox/menu - done - - # add other menuitems - get_other_menuitems >> ${ALX_UNPRIV_HOME}/.fluxbox/menu - - # fluxbox menu footer - cat ${ALX_SKELETONS}/fluxbox/menu.footer \ - >> ${ALX_UNPRIV_HOME}/.fluxbox/menu + evaluate_table cfg_sessions "where serial='${ALX_SERIAL}' and id='${i}'" + generate_ica_session_file \ + --session "${cfg_sessions_session}" \ + --filename "$(fix_whitespaces ${cfg_sessions_filename})" \ + --username "${cfg_sessions_username}" \ + --password "${cfg_sessions_password}" \ + --domain "${cfg_sessions_domain}" \ + --server "${cfg_sessions_browseradrs}" - # add a newline (maybe there is no crlf in the footer) - echo >> ${ALX_UNPRIV_HOME}/.fluxbox/menu + # fluxbox menusession + addconfig "[exec] (${cfg_sessions_session}) {nice -n 19 wfica ${ALX_ICA_SESSIONS}/$(fix_whitespaces ${cfg_sessions_filename})}" + done - # now we generate the desktop icons - cat ${ALX_SKELETONS}/idesk/ideskrc \ - > ${ALX_UNPRIV_HOME}/.ideskrc - - # whipe out old stuff and install a fresh directory - [ -d ${ALX_UNPRIV_HOME}/.idesktop ] && rm -rf ${ALX_UNPRIV_HOME}/.idesktop - install -d ${ALX_UNPRIV_HOME}/.idesktop + # delete all progs + progsh_path="${ALX_UNPRIV_HOME}/.alxprogs" + [ -d ${progsh_path} ] && rm -rf ${progsh_path} + install -d ${progsh_path} - local name - for (( i=0; i < count; i++ )) + # add other menuitems + for i in ${all_other_ids} do - name="$(basename ${ALX_SESSIONS[${i}]} .ica)" + evaluate_table cfg_other_menuitems "where serial='${ALX_SERIAL}' and id='${i}'" - if [ -f ${ALX_SESSIONS_ICONS}/${name}.png ] + # now echo config line for fluxbox-menu + # make it "configureable" :p + if [[ -n ${cfg_other_menuitems_workdir} ]] then - icon="${ALX_SESSIONS_ICONS}/${name}.png" - else - icon="${ALX_SESSIONS_ICONS}/default.png" + workdir="--workdir ${cfg_other_menuitems_workdir}" + fi + if [[ -n ${cfg_other_menuitems_icon} ]] + then + cfg_other_menuitems_icon="<${cfg_other_menuitems_icon}>" fi - echo "table Icon -Caption: ${name} -Command: wfica ${ALX_ICA_SESSIONS}/${name}.ica -Icon: ${icon} -end" > ${ALX_UNPRIV_HOME}/.idesktop/${name}.lnk + # gen prog startup wrapper + generate_program_sh \ + --name "${cfg_other_menuitems_name}" \ + --exec "${cfg_other_menuitems_exec}" \ + --param "${cfg_other_menuitems_param}" \ + --dest "${progsh_path}/$(fix_whitespaces ${cfg_other_menuitems_name})" \ + "${workdir}" + + addconfig "[exec] (${cfg_other_menuitems_name}) {${progsh_path}/$(fix_whitespaces ${cfg_other_menuitems_name})} ${cfg_other_menuitems_icon}" done - # set correct permissions + # fluxbox menu footer + cat ${ALX_SKELETONS}/fluxbox/menu.footer >> ${ALX_UNPRIV_HOME}/.fluxbox/menu + # add a newline (maybe there is no crlf in the footer) + addconfig + + # now it's a good time to generate *all* icons :) + generate_all_desktop_icons "${all_ses_ids}" "${all_other_ids}" + + # fix permissions chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME} chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox chmod 0755 ${ALX_UNPRIV_HOME}/.fluxbox - chmod 0755 ${ALX_UNPRIV_HOME}/.idesktop - chmod 0644 ${ALX_UNPRIV_HOME}/.ideskrc - - - # unset vars - unset ALX_SESSIONS + chmod 0755 ${ALX_UNPRIV_HOME}/.xtdesktop + chmod 0644 ${ALX_UNPRIV_HOME}/.xtdeskrc }