--- alx-src/branches/alxconf_20060908/alxconfig-ng/functions/config_sessions.sh 2009/02/04 19:51:39 543 +++ alx-src/branches/alxconf-060/functions/config_sessions.sh 2011/05/09 14:51:55 2001 @@ -1,4 +1,4 @@ -# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/functions/config_sessions.sh,v 1.18 2006-01-26 19:55:53 niro Exp $ +# $Id$ # configures ica-sessions on the host via mysql db settings get_sessions_settings() @@ -56,6 +56,7 @@ local all_ids local i local x + local browser_address_num local server local ses_session local ses_filename @@ -97,17 +98,21 @@ for server in ${ses_browseradrs} do (( x++ )) - echo "TcpBrowserAddress${x}=${server}" >> ${ALX_ICA_SESSIONS}/${ses_filename} + browser_address_num="${x}" + # support newer ica-clients: + # the first address must be named TcpBrowserAddress, but not TcpBrowserAddress1 !! + [[ ${x} -eq 1 ]] && browser_address_num="" + echo "TcpBrowserAddress${browser_address_num}=${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} @@ -237,8 +242,8 @@ [ -z "${command}" ] && return 1 # use some defaults for icon, dest, {x,y}res - [ -z "${xres}" ] && xres=20 - [ -z "${yres}" ] && xres=20 + [ -z "${xres}" ] && xres=30 + [ -z "${yres}" ] && xres=30 [ -z "${dest}" ] && dest="${ALX_UNPRIV_HOME}/.xtdesktop/${name}.lnk" if [ -z "${icon}" ] || [ ! -f "${icon}" ] then @@ -298,8 +303,8 @@ # default settings - declare -i x=20 - declare -i y=20 + declare -i x=30 + declare -i y=30 # first all ica sessions local count=${#ALX_SESSIONS[*]} @@ -316,17 +321,17 @@ # new line if x > xres if [ ${x} -ge ${xres} ];then - x=20 + x=30 y=$((${y} + 80)) fi # new row if y > yres if [ ${y} -ge ${yres} ];then x=$((${x} + 120)) - y=20 + y=30 # re-check x - [ ${x} -ge ${xres} ] && x=20 + [ ${x} -ge ${xres} ] && x=30 fi # ica icons @@ -356,17 +361,17 @@ # new line if x > xres if [ ${x} -ge ${xres} ];then - x=20 + x=30 y=$((${y} + 80)) fi # new row if y > yres if [ ${y} -ge ${yres} ];then x=$((${x} + 120)) - y=20 + y=30 # re-check x - [ ${x} -ge ${xres} ] && x=20 + [ ${x} -ge ${xres} ] && x=30 fi generate_icon \ @@ -461,7 +466,7 @@ # add autostart session if [[ ${ALX_AUTOSTART} != "" ]] then - echo "[startup] {nice -n 19 wfica ${ALX_ICA_SESSIONS}/${ALX_AUTOSTART}}" \ + echo "[startup] {nohup nice -n 19 wfica ${ALX_ICA_SESSIONS}/${ALX_AUTOSTART} &}" \ >> ${ALX_UNPRIV_HOME}/.fluxbox/apps fi