e68f40dde4b29b26b3a21dd98eccb469ef456265
[profile/ivi/ico-uxf-homescreen.git] / start_homescreen_appcore
1 #!/bin/sh
2
3 # 1. kill pulseaudio and weston, and start pulseaudio
4 /usr/bin/killall pulseaudio > /dev/null 2>&1
5 /usr/bin/killall weston > /dev/null 2>&1
6 /bin/sleep 0.2
7 /usr/bin/killall -9 pulseaudio > /dev/null 2>&1
8 /usr/bin/killall -9 weston > /dev/null 2>&1
9
10 # 2. Delete log file
11 /bin/mkdir /var/log/ico > /dev/null 2>&1
12 /bin/chmod -R 0777 /var/log/ico > /dev/null 2>&1
13 /bin/rm -f /var/log/ico/* /var/log/weston.log > /dev/null 2>&1
14 /bin/rm -f /opt/bs/core/* > /dev/null 2>&1
15
16 # 3. Weston/Wayland Envionment
17 export XDG_RUNTIME_DIR=/tmp/run-root
18 export QT_QPA_PLATFORM=wayland
19 export ELM_ENGINE=wayland_egl
20 export ECORE_EVAS_ENGINE=wayland_egl
21 #export ELM_ENGINE=wayland_shm
22 #export ECORE_EVAS_ENGINE=wayland_shm
23 export EVAS_FONT_DPI=72
24 export ECORE_IMF_MODULE=isf
25 export ELM_MODULES="ctxpopup_copypasteUI>entry/api:datetime_input_ctxpopup>datetime/api"
26 export ELM_SCALE="0.7"
27 export ELM_PROFILE=mobile
28
29 # 4. Start Device Input Controller for eGalax TouchPanel
30 #/usr/bin/ico_ictl-touch_egalax -t
31 /usr/bin/ico_ictl-touch_egalax
32 sleep 0.3
33
34 # 5. Start Weston
35 ORG_UMASK=`umask`
36 umask 000
37 /usr/bin/weston --backend=drm-backend.so --idle-time=0 --log=/var/log/weston.log &
38 sync;sync
39 sleep 0.8
40 if [ -f $XDG_RUNTIME_DIR/wayland-0 ] ; then
41         chmod 0777 $XDG_RUNTIME_DIR/wayland-0
42 fi
43 umask $ORG_UMASK
44
45 ## if pulseaudio dose not start ... kick pulseaudio
46 /bin/ps ax | /bin/grep pulseaudio | /bin/grep -v grep > /dev/null
47 if [ "$?" = "1" ] ; then
48         /usr/bin/pulseaudio --log-level=3 --log-target=file:/var/log/ico/pulse.log --system -D
49         sleep 0.5
50 fi
51
52 # 5 start sample wayland client for display cursor
53 sync;sync
54 /usr/bin/nice -19 /usr/bin/wayland-smoke &
55 sleep 0.3
56
57 # 6 start app core daemon
58 /bin/ps ax | /bin/grep launchpad_preloading_preinitializing_daemon | /bin/grep -v grep > /dev/null
59 if [ "$?" = "1" ] ; then
60         /usr/bin/launchpad_preloading_preinitializing_daemon &
61         sleep 1
62 fi
63
64 # 7 start homescreen
65 /usr/bin/launch_app org.tizen.ico.homescreen &
66