59 |
# the first address must be named TcpBrowserAddress, but not TcpBrowserAddress1 !! |
# the first address must be named TcpBrowserAddress, but not TcpBrowserAddress1 !! |
60 |
[[ ${i} -eq 1 ]] && num="" |
[[ ${i} -eq 1 ]] && num="" |
61 |
addconfig "TcpBrowserAddress${num}=${server}" |
addconfig "TcpBrowserAddress${num}=${server}" |
62 |
|
addconfig "HttpBrowserAddress${num}=${server}" |
63 |
done |
done |
64 |
|
|
65 |
addconfig 'ScreenPercent=0' |
addconfig 'ScreenPercent=0' |
264 |
|
|
265 |
generate_icon \ |
generate_icon \ |
266 |
--name "${cfg_sessions_session}" \ |
--name "${cfg_sessions_session}" \ |
267 |
--command "nice -n 19 wfica ${ALX_ICA_SESSIONS}/$(fix_whitespaces ${cfg_sessions_filename})" \ |
--command "wfica-launcher ${ALX_ICA_SESSIONS}/$(fix_whitespaces ${cfg_sessions_filename})" \ |
268 |
--icon "${ALX_SESSIONS_ICONS}/$(fix_whitespaces ${cfg_sessions_session}).png" \ |
--icon "${ALX_SESSIONS_ICONS}/$(fix_whitespaces ${cfg_sessions_session}).png" \ |
269 |
--dest "${dest}/$(fix_whitespaces ${cfg_sessions_session}).lnk" \ |
--dest "${dest}/$(fix_whitespaces ${cfg_sessions_session}).lnk" \ |
270 |
--xres "${x}" \ |
--xres "${x}" \ |
301 |
generate_icon \ |
generate_icon \ |
302 |
--name "${cfg_other_menuitems_name}" \ |
--name "${cfg_other_menuitems_name}" \ |
303 |
--command "${progsh_path}/$(fix_whitespaces ${cfg_other_menuitems_name})" \ |
--command "${progsh_path}/$(fix_whitespaces ${cfg_other_menuitems_name})" \ |
304 |
--icon "${ALX_SESSIONS_ICONS}/$(fix_whitespaces ${cfg_other_menuitems_name}).png" \ |
--icon "${ALX_SESSIONS_ICONS}/$(fix_whitespaces ${cfg_other_menuitems_icon}).png" \ |
305 |
--dest "${dest}/$(fix_whitespaces ${cfg_other_menuitems_name}).lnk" \ |
--dest "${dest}/$(fix_whitespaces ${cfg_other_menuitems_name}).lnk" \ |
306 |
--xres "${x}" \ |
--xres "${x}" \ |
307 |
--yres "${y}" \ |
--yres "${y}" \ |
314 |
do |
do |
315 |
# abort if empty |
# abort if empty |
316 |
[[ -z ${i} ]] && continue |
[[ -z ${i} ]] && continue |
317 |
|
|
318 |
evaluate_table cfg_plugins "where serial='${ALX_SERIAL}' and id='${i}'" |
evaluate_table cfg_plugins "where serial='${ALX_SERIAL}' and id='${i}'" |
319 |
if [[ -x ${ALX_PLUGINS}/${cfg_plugins_plugin}/plugin.sh ]] |
if [[ -x ${ALX_PLUGINS}/${cfg_plugins_plugin}/plugin.sh ]] |
320 |
then |
then |
437 |
local screensaver_passwd_cmd |
local screensaver_passwd_cmd |
438 |
local fbinit |
local fbinit |
439 |
local fbkeys |
local fbkeys |
440 |
|
local progsh_path |
441 |
|
|
442 |
|
progsh_path="${ALX_UNPRIV_HOME}/.alxprogs" |
443 |
|
|
444 |
# get all session ids from database |
# get all session ids from database |
445 |
all_ses_ids=$(mysqldo "select id from cfg_sessions where serial='${ALX_SERIAL}'") |
all_ses_ids=$(mysqldo "select id from cfg_sessions where serial='${ALX_SERIAL}'") |
499 |
addconfig "[startup] {nohup xautolock -time ${cfg_screensaver_timeout} -locker 'xlock -mode ${cfg_screensaver_screensaver} ${screensaver_passwd_cmd}' > /dev/null &}" |
addconfig "[startup] {nohup xautolock -time ${cfg_screensaver_timeout} -locker 'xlock -mode ${cfg_screensaver_screensaver} ${screensaver_passwd_cmd}' > /dev/null &}" |
500 |
fi |
fi |
501 |
|
|
502 |
|
# add plugins autostart |
503 |
|
for i in ${all_plugin_ids} |
504 |
|
do |
505 |
|
evaluate_table cfg_plugins "where serial='${ALX_SERIAL}' and id='${i}'" |
506 |
|
if [[ -x ${ALX_PLUGINS}/${cfg_plugins_plugin}/plugin.sh ]] |
507 |
|
then |
508 |
|
eval $(${ALX_PLUGINS}/${cfg_plugins_plugin}/plugin.sh autostart) |
509 |
|
|
510 |
|
if [[ ${PLUGIN_AUTOSTART} = 1 ]] |
511 |
|
then |
512 |
|
addconfig "[startup] {${progsh_path}/$(fix_whitespaces ${PLUGIN_MENUITEM_NAME}) &}" |
513 |
|
fi |
514 |
|
# unset all variables |
515 |
|
unset PLUGIN_AUTOSTART |
516 |
|
unset PLUGIN_MENUITEM_NAME |
517 |
|
fi |
518 |
|
done |
519 |
|
|
520 |
# add autostart session |
# add autostart session |
521 |
if [[ ! -z ${cfg_autostart_session} ]] |
if [[ ! -z ${cfg_autostart_session} ]] |
522 |
then |
then |
523 |
# sleep one second to wait until busybox is fully initialized and the screen is really centered |
# sleep one second to wait until busybox is fully initialized and the screen is really centered |
524 |
addconfig "[startup] {sleep 1 && nohup nice -n 19 wfica ${ALX_ICA_SESSIONS}/$(fix_whitespaces ${cfg_autostart_session}) &}" |
addconfig "[startup] {sleep 1 && wfica-launcher ${ALX_ICA_SESSIONS}/$(fix_whitespaces ${cfg_autostart_session}) &}" |
525 |
fi |
fi |
526 |
|
|
527 |
# fluxbox hotkeys |
# fluxbox hotkeys |
559 |
--colordepth "${cfg_graphic_depth}" |
--colordepth "${cfg_graphic_depth}" |
560 |
|
|
561 |
# fluxbox menusession |
# fluxbox menusession |
562 |
addconfig "[exec] (${cfg_sessions_session}) {nice -n 19 wfica ${ALX_ICA_SESSIONS}/$(fix_whitespaces ${cfg_sessions_filename})}" |
addconfig "[exec] (${cfg_sessions_session}) {wfica-launcher ${ALX_ICA_SESSIONS}/$(fix_whitespaces ${cfg_sessions_filename})}" |
563 |
done |
done |
564 |
|
|
565 |
# delete all progs |
# delete all progs |
|
progsh_path="${ALX_UNPRIV_HOME}/.alxprogs" |
|
566 |
[ -d ${progsh_path} ] && rm -rf ${progsh_path} |
[ -d ${progsh_path} ] && rm -rf ${progsh_path} |
567 |
install -d ${progsh_path} |
install -d ${progsh_path} |
568 |
|
|
620 |
generate_program_sh \ |
generate_program_sh \ |
621 |
--name "${PLUGIN_MENUITEM_NAME}" \ |
--name "${PLUGIN_MENUITEM_NAME}" \ |
622 |
--exec "${PLUGIN_MENUITEM_EXEC}" \ |
--exec "${PLUGIN_MENUITEM_EXEC}" \ |
623 |
--param "${PLUGIN_MENUITEM_PARM}" \ |
--param "${PLUGIN_MENUITEM_PARAM}" \ |
624 |
--dest "${progsh_path}/$(fix_whitespaces ${PLUGIN_MENUITEM_NAME})" \ |
--dest "${progsh_path}/$(fix_whitespaces ${PLUGIN_MENUITEM_NAME})" \ |
625 |
"${workdir}" |
"${workdir}" |
626 |
|
|
648 |
chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox |
chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox |
649 |
chmod 0755 ${ALX_UNPRIV_HOME}/.fluxbox |
chmod 0755 ${ALX_UNPRIV_HOME}/.fluxbox |
650 |
chmod 0755 ${ALX_UNPRIV_HOME}/.idesktop |
chmod 0755 ${ALX_UNPRIV_HOME}/.idesktop |
|
chmod 0644 ${ALX_UNPRIV_HOME}/.ideskrc |
|
651 |
} |
} |