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