hc
2024-08-12 233ab1bd4c5697f5cdec94e60206e8c6ac609b4c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
#
# Start linux launcher...
#
 
# Load default env variables from profiles(e.g. /etc/profile.d/weston.sh)
. /etc/profile
 
case "$1" in
  start)
       printf "Starting launcher: "
       export LC_ALL='zh_CN.utf8'
 
       # Uncomment to disable mirror mode
       # unset WESTON_DRM_MIRROR
 
       export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/var/run}
       export QT_QPA_PLATFORM=${QT_QPA_PLATFORM:-wayland}
 
       weston --tty=2 --idle-time=0&
       {
           # Wait for weston ready
           while [ ! -e ${XDG_RUNTIME_DIR}/wayland-0 ]; do
               sleep .1
           done
           /usr/bin/QLauncher &
       }&
   ;;
  stop)
       killall QLauncher
       killall weston
       printf "stop finished"
        ;;
  *)
        echo "Usage: $0 {start|stop}"
        exit 1
        ;;
esac
exit 0