#!/bin/sh echo "#################### tv-users.post ##################" # create guest user /usr/sbin/useradd -m -G audio,video -c ',,,,guest' guest # set user type /usr/sbin/usermod -c ',,,,normal' owner # enable TLM (Tizen Login Manager) and generate tlm.conf if [ -e /usr/lib/systemd/system/tlm.service ]; then mkdir -p /usr/lib/systemd/system/multi-user.target.wants ln -s ../tlm.service /usr/lib/systemd/system/multi-user.target.wants/tlm.service cat > /etc/tlm.conf << EOF # This file is generated by post script in .ks file. # # This group contains top-level settings. # [General] # # Name of the account plugin to use to manage(add/remove) guest user accounts ACCOUNTS_PLUGIN=gumd # # Number of seats # Default: obtain from systemd NSEATS=1 # # Auto-login default user # Default: off # AUTO_LOGIN=1 # # Prepare default/guest users before auto-login # Default: off # PREPARE_DEFAULT=1 # # PAM service file to use # PAM_SERVICE=tlm-login # # PAM service file for default user # DEFAULT_PAM_SERVICE=tlm-default-login # # Default (guest) username or template to use # %S - seat number # %I - seat id string # Default: "guest" # DEFAULT_USER=guest_%S # # Session command : The command run after successfull login # Default: $SHELL # In case shell is not defined in /etc/passwd fallback is "systemd --user" #SESSION_CMD=systemd --user # # Session termination timeout in seconds # Default: 10 #TERMINATE_TIMEOUT=10 # # Setup terminal for session # Default: off #SETUP_TERMINAL=1 # # Use X11 style sessions # Default: off #X11_SESSION=1 # # Do not launch anything, let systemd handle it through PAM # Default: off #PAUSE_SESSION=1 # # Specify session type, needs to be specified for # XDG_SESSION_CLASS and XDG_SESSION_TYPE to be set # Default: unspecified #SESSION_TYPE=wayland # # # Seat specific settings where the group name is seat id [seat0] DEFAULT_USER=owner #DEFAULT_USER=tizen SETUP_TERMINAL=1 VTNR=7 #SESSION_CMD=weston-launch #DEFAULT_PAM_SERVICE=tlm-system-login #SETUP_RUNTIME_DIR=1 #RUNTIME_MODE=0700 # #[seat1] #ACTIVE=0 #DEFAULT_USER=guest_%S #DEFAULT_USER=app # # # plugin specific settings. # #[pluginname] # EOF fi