TIVI-1658: Fix command for adding the app user to the weston-launcher group
[profile/ivi/meta-ivi.git] / scripts / base-weston-default.post
1 # Initialize the native application database
2 pkg_initdb
3
4 # Add 'app' user to the weston-launch group
5 /usr/sbin/groupmod -A app weston-launch
6
7 # Temporary work around for bug in filesystem package resulting in the 'app' user home
8 # directory being only readable by root
9 chown -R app:app /opt/home/app
10
11 # base-weston-default.post
12 mkdir -p /usr/lib/systemd/system/graphical.target.wants
13 ln -sf ../user-session@.service /usr/lib/systemd/system/graphical.target.wants/user-session@5000.service
14 ln -sf weston.target  /usr/lib/systemd/user/default.target
15
16 # Add over-riding environment to enable the web runtime to
17 # run on an IVI image as a different user then the tizen user
18 cat > /etc/sysconfig/wrt <<EOF
19 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket
20 XDG_RUNTIME_DIR=/run/user/5000
21 ELM_ENGINE=wayland_egl
22 ECORE_EVAS_ENGINE=wayland_egl
23 EOF
24
25 # Use the same over-rides for the native prelaunch daemon
26 cp /etc/sysconfig/wrt /etc/sysconfig/launchpad
27
28 # Add a rule to ensure the app user has permissions to
29 # open the graphics device
30 cat > /etc/udev/rules.d/99-dri.rules <<EOF
31 SUBSYSTEM=="drm", MODE="0666"
32 EOF