Add app user to audio/video/weston-launch groups; fix ownership of /opthome/app
[profile/ivi/meta-ivi.git] / scripts / base-weston-default.post
1 # Initialize the native application database
2 pkg_initdb
3
4 # Create the 'app' user
5 /usr/sbin/usermod app -g users -G audio,video,weston-launch
6 chown -R app:app /opt/home/app
7
8 # base-weston-default.post
9 mkdir -p /usr/lib/systemd/system/graphical.target.wants
10 ln -sf ../user-session@.service /usr/lib/systemd/system/graphical.target.wants/user-session@5000.service
11 ln -sf weston.target  /usr/lib/systemd/user/default.target
12
13 # Add over-riding environment to enable the web runtime to
14 # run on an IVI image as a different user then the tizen user
15 cat > /etc/sysconfig/wrt <<EOF
16 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket
17 XDG_RUNTIME_DIR=/run/user/5000
18 ELM_ENGINE=wayland_egl
19 ECORE_EVAS_ENGINE=wayland_egl
20 EOF
21
22 # Use the same over-rides for the native prelaunch daemon
23 cp /etc/sysconfig/wrt /etc/sysconfig/launchpad
24
25 # Add a rule to ensure the app user has permissions to
26 # open the graphics device
27 cat > /etc/udev/rules.d/99-dri.rules <<EOF
28 SUBSYSTEM=="drm", MODE="0666"
29 EOF