Creating Default Application Settings for Your Users
Follow these steps to create default application settings for your users.
Contents
Step 1: Install Linux Applications on the Image Builder
In this step, you connect a Linux image builder and install your applications on the image builder.
To install applications on the image builder
-
Connect to the image builder by doing either of the following:
-
Use the AppStream 2.0 console (for web connections only)
-
Create a streaming URL (for web or AppStream 2.0 client connections)
Note
You will be logged in as an ImageBuilderAdmin user to the Amazon Linux GNOME desktop and have root admin privileges.
-
-
Install the applications that you need. For example, to install a Chromium browser from a public yum repo, first open the Terminal application, then run the following command:
[ImageBuilderAdmin]$ sudo yum update && sudo yum install chromium.x86_64
Step 2: Create a TemplateUser Account
In this step, you create a TemplateUser account, which creates default application settings for your streaming users.
To create a TemplateUser Account
-
Create a TemplateUser account that has no root permissions. For example, in a Terminal window, run the following commands to create TemplateUser on the image builder:
[ImageBuilderAdmin]$ sudo useradd -m TemplateUser
[ImageBuilderAdmin]$ echo -e '<
password
>\n<password
>\n' | sudo passwd TemplateUser -
Switch to the TemplateUser account:
[ImageBuilderAdmin]$ su - TemplateUser
Step 3: Create Default Application Settings
In this step, you create default application settings for your AppStream 2.0 users. Doing this enables your users to get started with applications quickly during their AppStream 2.0 streaming sessions, without the need to create or configure these settings themselves.
To create default application settings for your users
-
Launch the application that you want to create the default settings for. For example, in a Terminal window, run following command to launch Chromium browser:
[TemplateUser]$ chromium-browser
-
Configure the settings of the application. For example, set the home page of the Chromium browser as
https://aws.amazon.com
. -
Close the applications.
-
Log out:
[TemplateUser]$ logout
Step 4: Save Default Application Settings
In this step, you copy the default application settings you added to the /etc/skel/ directory, and make them available to your streaming users.
To save default application settings
-
Run the following command in a Terminal window to copy the default application settings for your streaming users:
[ImageBuilderAdmin]$ sudo cp -r -f /home/TemplateUser/. /etc/skel
Step 5: Test Default Application Settings (optional)
In this step, verify that the applications you've added run correctly, and the default application settings work as expected.
To test your applications and default settings on an image builder
-
Create a test user that has no root permissions. For example, in a Terminal window, run the following commands to create test-user on the image builder:
[ImageBuilderAdmin]$ sudo useradd -m test-user
[ImageBuilderAdmin]$ echo -e '
password
>\n<password
>\n' | sudo passwd test-user -
Switch to the test user:
[ImageBuilderAdmin]$ su - test-user
-
Launch the application (e.g., Chromium) as the test user:
[test-user]$ /usr/bin/chromium-browser
-
Verify that the default settings are available for the test user (e.g., the Chromium home page is https://aws.amazon.com/).
-
Log out:
[test-user]$ logout
Step 6: Clean Up
Finally, your last step is to clean up.
To clean up
-
Delete TemplateUser:
[ImageBuilderAdmin]$ sudo killall -u TemplateUser
[ImageBuilderAdmin]$ sudo userdel -r TemplateUser
-
Delete test-user (not required if you skipped step 5):
[ImageBuilderAdmin]$ sudo killall -u test-user
ImageBuilderAdmin]$ sudo userdel -r test-user