Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions initial-setup.spec
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ Summary: Run the initial-setup GUI in Wayland
Requires: %{name}-gui = %{version}-%{release}
Requires: weston
Requires: xorg-x11-server-Xwayland
Requires: kbd

Provides: firstboot(gui-backend)
Conflicts: firstboot(gui-backend)
Expand Down
18 changes: 17 additions & 1 deletion scripts/run-gui-backend.guiweston
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,24 @@ EOF

chmod +x ${RUN_SCRIPT}

weston --config=${CONFIG_FILE} --socket=wl-firstboot-0
original_vt=
if [ -n "$XDG_VTNR" ]; then
original_vt=$(fgconsole)
# change to VT on which we run to get access to devices
chvt "${XDG_VTNR}"
fi

cards=$(ls -d /sys/class/drm/card*| grep -v -- -| cut -d / -f 5)
primary_card=$(echo "$cards" | head -1 )
secondary_cards=$(echo "$cards"|
tail -n +2|
xargs printf "%s,")

weston --config=${CONFIG_FILE} --socket=wl-firstboot-0 --drm-device="$primary_card" --additional-devices="$secondary_cards"
exit_code=$(< ${EXIT_CODE_SAVE})

rm ${CONFIG_FILE} ${RUN_SCRIPT} ${EXIT_CODE_SAVE}
if [ -n "$original_vt" ]; then
chvt "$original_vt"
fi
exit $exit_code