39 |
[[ -z ${name} ]] && return 1 |
[[ -z ${name} ]] && return 1 |
40 |
[[ -z ${command} ]] && return 1 |
[[ -z ${command} ]] && return 1 |
41 |
|
|
42 |
[[ -z ${dest} ]] && dest="${ALX_UNPRIV_HOME}/.idesktop/${name}.lnk" |
[[ -z ${dest} ]] && dest="${MCORE_UNPRIV_HOME}/.idesktop/${name}.lnk" |
43 |
|
|
44 |
# use some defaults for icon, dest, {x,y}res |
# use some defaults for icon, dest, {x,y}res |
45 |
[[ -z ${xres} ]] && xres=50 |
[[ -z ${xres} ]] && xres=50 |
48 |
then |
then |
49 |
# if no default icon is given use default.png |
# if no default icon is given use default.png |
50 |
[[ -z ${deficon} ]] && deficon="default.png" |
[[ -z ${deficon} ]] && deficon="default.png" |
51 |
icon="${ALX_SESSIONS_ICONS}/${deficon}" |
icon="@@PIXMAPSDIR@@/${deficon}" |
52 |
fi |
fi |
53 |
|
|
54 |
CONFIG="${dest}" |
CONFIG="${dest}" |
88 |
local dest |
local dest |
89 |
local rc |
local rc |
90 |
|
|
91 |
dest="${ALX_UNPRIV_HOME}/.idesktop" |
dest="${MCORE_UNPRIV_HOME}/.idesktop" |
92 |
rc="${ALX_UNPRIV_HOME}/.ideskrc" |
rc="${MCORE_UNPRIV_HOME}/.ideskrc" |
93 |
|
|
94 |
# progsh path |
# progs path |
95 |
progsh_path="${ALX_UNPRIV_HOME}/.alxprogs" |
progsh_path="${MCORE_UNPRIV_HOME}/.progs" |
96 |
|
|
97 |
# get the resolution |
# get the resolution |
98 |
res=$(mysqldo "select resolution from cfg_graphic where serial='${ALX_SERIAL}'") |
res=$(mysqldo "select resolution from cfg_graphic where serial='${MCORE_SERIAL}'") |
99 |
|
|
100 |
# split res to x & y |
# split res to x & y |
101 |
xres="${res%x*}" |
xres="${res%x*}" |
122 |
[[ -z ${i} ]] && continue |
[[ -z ${i} ]] && continue |
123 |
|
|
124 |
# get database information |
# get database information |
125 |
evaluate_table cfg_sessions "where serial='${ALX_SERIAL}' and id='${i}'" |
evaluate_table cfg_sessions "where serial='${MCORE_SERIAL}' and id='${i}'" |
126 |
|
|
127 |
# new line if x > xres |
# new line if x > xres |
128 |
if [ ${x} -ge ${xres} ] |
if [ ${x} -ge ${xres} ] |