Add app user to weston-launch group in base-weston postscript
[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 weston-launch group
5 /usr/sbin/usermod app -g users -G weston-launch
6
7 # base-weston-default.post
8 mkdir -p /usr/lib/systemd/system/graphical.target.wants
9 ln -sf ../user-session@.service /usr/lib/systemd/system/graphical.target.wants/user-session@5000.service
10 ln -sf weston.target  /usr/lib/systemd/user/default.target
11
12 # Add over-riding environment to enable the web runtime to
13 # run on an IVI image as a different user then the tizen user
14 cat > /etc/sysconfig/wrt <<EOF
15 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket
16 XDG_RUNTIME_DIR=/run/user/5000
17 ELM_ENGINE=wayland_egl
18 ECORE_EVAS_ENGINE=wayland_egl
19 EOF
20
21 # Use the same over-rides for the native prelaunch daemon
22 cp /etc/sysconfig/wrt /etc/sysconfig/launchpad
23
24 # Add a rule to ensure the app user has permissions to
25 # open the graphics device
26 cat > /etc/udev/rules.d/99-dri.rules <<EOF
27 SUBSYSTEM=="drm", MODE="0666"
28 EOF