Working with multiple displays and SimpleSwitch™#
If you are running with multiple displays at a time, e.g. LVDS
and HDMI
, you can select the
screen a graphical SimpleSwitch™ package runs on.
For that create a file at /apps/desktop-config/screens
$ mkdir -p /apps/desktop-config/
$ touch /apps/desktop-config/screens
within this file you can, per SimpleSwitch™ package, configure the screen
DISPLAY_<simpleswitch package>=<display name>
e.g.
DISPLAY_simpleswitch_test=LVDS-1
Important note
You will need to replace -
characters in the SimpleSwitch™ package by _
, e.g.
the setting for simpleswitch-flutter-tractor
becomes
DISPLAY_simpleswitch_flutter_tractor=LVDS-1
The names of the supported display can be found with
$ cat /run/simplecore-weston.ini | grep -C 2 "output" | grep "name" | cut -d'=' -f2
HDMI-A-1
LVDS-1
Specified displays that are not present will be ignored, letting the SimpleSwitch™ package start up on the primary display.
Qt applications
For Qt based application also a software patch is required.
Before the mainWindow->showFullScreen();
call in your application, you will need to add the following
code snippet
bool ok;
int screen_number = qgetenv("QT_SCREEN").toInt(&ok, 10);
if (!ok || (screen_number - 1) > app.screens().count()) screen_number = 0;
mainWindow->setScreen(app.screens()[screen_number]);
// Start of your original application
mainWindow->showFullScreen();
Mapping the touchscreen#
In addition if your display does support a touchscreen, you will need to let the system know which display the touch support belongs to.
Please see the guide at How to map a touchscreen,
but you can configure through the file /apps/desktop-config/touchscreens.json