7d94bfa508d9c83e6425df4248def25336262eaf
[profile/ivi/weston.git] / packaging / weston.sh
1 if [ -z "$USER" ]; then
2     export USER=root
3 fi
4
5 if [ -z "$XDG_RUNTIME_DIR"]; then
6     # User may not have sufficient privilege to make a directory in
7     # /run/user/$USER.  Fall back on a subdirectory /tmp instead.
8     XDG_RUNTIME_DIR=/tmp/run-$USER
9 fi
10
11 if [ ! -d "${XDG_RUNTIME_DIR}" ]; then
12     mkdir -p $XDG_RUNTIME_DIR
13     # This really should be 700 but we currently have to run Weston as
14     # root.
15     chmod 777 $XDG_RUNTIME_DIR
16 fi
17
18 export XDG_RUNTIME_DIR
19
20 if [ -z "$HOME" ] || [ "$HOME" = "/" ]; then
21     export HOME=/root
22 fi
23
24 export ELM_ENGINE=wayland_shm
25 export ECORE_EVAS_ENGINE=wayland_shm