3.6.9. Weston
The supported Wayland/Weston version brings in the multiple display support in extended desktop mode and the ability to drag-and-drop windows from one display to the other.
3.6.9.1. Starting Weston with Systemd
Starting with Weston 10, the preferred way to start Weston is with the
weston
user using the systemd service. If you need to interact with this
instance using any other user then make sure that user is in the wayland
or
root
group and direct them to interact with that instance using the global
socket at /run/wayland-0
.
This global socket is special in that it will automatically launch Weston when
a GUI application attempts to connect to it. A profile script in
/etc/profile.d
will automatically set the WAYLAND_DISPLAY
environment
variable if the user has sufficient permission to interact with the socket.
To start the systemd service manually, do the following:
# systemctl start weston
To inspect the systemd service and socket status, do the following:
# systemctl status weston.service weston.socket
3.6.9.2. Starting Weston Manually
To launch Weston manually, do the following:
On the target console:
# unset WAYLAND_DISPLAY
On the default display:
# weston --display=<default connector-id>
On the secondary display:
# weston --display=<secondary connector-id>
On all connected displays (LCD and HDMI):
# weston
By default, the screensaver timeout is configured to 300 seconds. The user can change the screensaver timeout using a command line option:
--idle-time=<number of seconds>
For example, to set timeout of 10 minutes and Weston configured to display on all connectors, use the below command:
# weston --idle-time=600
To disable the screen timeout and to configure Weston to display on all connectors, use the below command:
# weston --idle-time=0
If you face any issues with the above procedure, please refer to the upstream weston documentation for troubleshooting tips.
The filesystem comes with a preconfigured weston.ini
file which will
be located at /etc/xdg/weston/weston.ini
3.6.9.3. Stopping Weston
Terminate all Weston clients before exiting Weston. If you have invoked Weston from the serial console, exit Weston by pressing Ctrl-C.
If Weston was started automatically by the init system then it can be stopped with:
# systemctl stop weston
It is also possible to invoke Weston from the native console, exit Weston by pressing Ctrl-Alt-Backspace.
3.6.9.4. Running Weston clients
Weston client examples can run from the command line on a serial port console or an SSH console. After launching Weston, the user should be able to use the keyboard and the mouse for various controls.
# /usr/bin/weston-flower
# /usr/bin/weston-clickdot
# /usr/bin/weston-cliptest
# /usr/bin/weston-dnd
# /usr/bin/weston-editor
# /usr/bin/weston-eventdemo
# /usr/bin/weston-image /usr/share/weston/terminal.png
# /usr/bin/weston-resizor
# /usr/bin/weston-simple-egl
# /usr/bin/weston-simple-shm
# /usr/bin/weston-simple-touch
# /usr/bin/weston-smoke
# /usr/bin/weston-info
# /usr/bin/weston-terminal
3.6.9.5. Running multimedia with Wayland sink
The GStreamer video sink for Wayland is the waylandsink. To use this video-sink for video playback:
# gst-launch-1.0 playbin uri=file://<path-to-file-name> video-sink=waylandsink
3.6.9.6. Using IVI shell feature
The SDK also has support for configuring Weston ivi-shell. The default shell that is configured in the SDK is the desktop-shell.
To change the shell to ivi-shell, the user will have to add the following lines
into the /etc/xdg/weston/weston.ini
.
To switch back to the desktop-shell can be done by commenting these lines in the
/etc/xdg/weston/weston.ini
(comments begin with a ‘#’ at the start of
line).
[core]
shell=ivi-shell.so
After the above configuration is completed, we can restart Weston by running the following command
# systemctl restart weston
Note
When Weston starts with ivi-shell, the default background is black, this is different from the desktop-shell that brings up a window with background.
With ivi-shell configured for Weston, Wayland client applications use ivi-application protocol to be managed by a central HMI window management.
Applications must support the ivi_application
Wayland protocol to be managed by
the HMI central controller with an unique numeric ID.
Some important references to Weston IVI-shell can be found at the following link: