Support Tizen3.0
[profile/ivi/ico-uxf-homescreen.git] / start_homescreen
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. Start Device Input Controller for eGalax TouchPanel
10 #/usr/bin/ico_ictl-touch_egalax -t
11 /usr/bin/ico_ictl-touch_egalax
12 sleep 0.3
13
14 # 3. Start Weston
15 /usr/bin/weston-launch -- -i0 --log=/var/log/ico/weston.log &
16 sync;sync
17 #sleep 0.8
18 #if [ -e $XDG_RUNTIME_DIR/wayland-0 ] ; then
19 #       chmod 0777 $XDG_RUNTIME_DIR/wayland-0
20 #fi
21
22 # 4 start some daemons
23 ## if pulseaudio dose not start ... kick pulseaudio
24 /bin/ps ax | /bin/grep pulseaudio | /bin/grep -v grep > /dev/null
25 if [ "$?" = "1" ] ; then
26         /usr/bin/pulseaudio --log-level=3 --log-target=file:/var/log/ico/pulse.log --system -D
27         sleep 0.5
28 fi
29
30 ## if appcore launcher dose not start ... kick launchpad_preloading_preinitializing_daemon
31 /bin/ps ax | /bin/grep launchpad_preloading_preinitializing_daemon | /bin/grep -v grep > /dev/null
32 if [ "$?" = "1" ] ; then
33         /usr/bin/launchpad_preloading_preinitializing_daemon &
34         sleep 1
35 fi
36
37 # 5 start homescreen
38 export PKG_NAME="org.tizen.ico.homescreen"
39 /usr/bin/launch_app org.tizen.ico.homescreen &
40