4 |
source @@SYSCONFDIR@@/mcore/mcore.conf |
source @@SYSCONFDIR@@/mcore/mcore.conf |
5 |
source ${MCORE_LIBDIR}/include/common.global.class |
source ${MCORE_LIBDIR}/include/common.global.class |
6 |
|
|
7 |
|
if [[ $(whoami) = ${MCORE_UNPRIV_USER} ]] |
8 |
|
then |
9 |
|
x11runas="" |
10 |
|
sudo="sudo" |
11 |
|
else |
12 |
|
x11runas="x11runas" |
13 |
|
sudo="" |
14 |
|
fi |
15 |
|
|
16 |
# die if no display was found |
# die if no display was found |
17 |
xinfo &> /dev/null || exit 1 |
${x11runas} xinfo &> /dev/null || exit 1 |
18 |
|
|
19 |
# eval xorg_width and xorg_height |
# eval xorg_width and xorg_height |
20 |
eval $(x11runas xinfo) |
eval $(${x11runas} xinfo) |
21 |
|
|
22 |
# fallback |
# fallback |
23 |
[[ -z ${xorg_width} ]] && xorg_width="1024" |
[[ -z ${xorg_width} ]] && xorg_width="1024" |
61 |
ypos="$(( ${xorg_height} - 22))" |
ypos="$(( ${xorg_height} - 22))" |
62 |
|
|
63 |
# generate icon info |
# generate icon info |
64 |
${MCORE_LIBDIR}/idesk-generate-icon-info \ |
${sudo} ${MCORE_LIBDIR}/idesk-generate-icon-info \ |
65 |
--add \ |
--add \ |
66 |
--name "sysinfo" \ |
--name "${sysinfo}" \ |
67 |
|
--filename "sysinfo" \ |
68 |
--command "exit 0" \ |
--command "exit 0" \ |
69 |
--icon "sysinfo.png" \ |
--icon "sysinfo.png" \ |
70 |
--xpos "${xpos}" \ |
--xpos "${xpos}" \ |