Bug fix for TIVI-1002
[profile/ivi/ico-uxf-homescreen.git] / test / start_hsfork
1 #!/bin/sh
2
3 # 1. Delete log file
4 /bin/mkdir /var/log/ico > /dev/null 2>&1
5 /bin/chmod -R 0777 /var/log/ico > /dev/null 2>&1
6 /bin/rm -f /var/log/ico/* /var/log/weston.log > /dev/null 2>&1
7 /bin/rm -f /opt/share/crash/core.* > /dev/null 2>&1
8
9 # 2. Weston/Wayland Envionment
10 export QT_QPA_PLATFORM=wayland
11 export ELM_ENGINE=wayland_egl
12 export ECORE_EVAS_ENGINE=wayland_egl
13 export XDG_CONFIG_HOME=/etc/xdg/weston
14
15 # 3. Start Device Input Controller for eGalax TouchPanel
16 #/usr/bin/ico_ictl-touch_egalax -t
17 /usr/bin/ico_ictl-touch_egalax
18 sleep 0.3
19
20 # 4. Start Weston
21 ORG_UMASK=`umask`
22 umask 000
23 /usr/bin/weston --backend=drm-backend.so --idle-time=0 --log=/var/log/ico/weston.log &
24 sync;sync
25 sleep 0.8
26 if [ -f $XDG_RUNTIME_DIR/wayland-0 ] ; then
27         chmod 0777 $XDG_RUNTIME_DIR/wayland-0
28 fi
29 umask $ORG_UMASK
30
31 # 5 start some daemons
32 ## if pulseaudio dose not start ... kick pulseaudio
33 /bin/ps ax | /bin/grep pulseaudio | /bin/grep -v grep > /dev/null
34 if [ "$?" = "1" ] ; then
35         /usr/bin/pulseaudio --log-level=3 --log-target=file:/var/log/ico/pulse.log --system -D
36         sleep 0.5
37 fi
38
39 ## if appcore launcher dose not start ... kick launchpad_preloading_preinitializing_daemon
40 /bin/ps ax | /bin/grep launchpad_preloading_preinitializing_daemon | /bin/grep -v grep > /dev/null
41 if [ "$?" = "1" ] ; then
42         /usr/bin/launchpad_preloading_preinitializing_daemon &
43         sleep 1
44 fi
45
46 # 6 start homescreen
47 export PKG_NAME="org.tizen.ico.homescreen"
48 /usr/apps/org.tizen.ico.homescreen/bin/HomeScreen &
49