Skip to content
Snippets Groups Projects
Commit 03320c1d authored by Tobias Kahlki's avatar Tobias Kahlki
Browse files

qt:compositor: Run the qt-compositor as qt user

Changed the qt-multi-screen-compositor to run under the qt username.
Fixed the file names of the systemd service units and
added the creation of the qt user to the recipe.
parent 5fc7107b
No related branches found
No related tags found
2 merge requests!418Integrate gitlab-ci/fix-gitlab-ci-integration and 6 more,!410qt:compositor: Fixed qt-compositor to run under Yocto Kirkstone
...@@ -5,9 +5,11 @@ Conflicts=plymouth-quit.service ...@@ -5,9 +5,11 @@ Conflicts=plymouth-quit.service
After=systemd-user-sessions.service plymouth-quit-wait.service systemd-logind.service After=systemd-user-sessions.service plymouth-quit-wait.service systemd-logind.service
[Service] [Service]
User=%i User=qt
PAMName=login Group=qt
Environment=XDG_RUNTIME_DIR=/var/run/user/0 WorkingDirectory=/home/qt
PAMName=qt-autologin
#Environment=XDG_RUNTIME_DIR=/var/run/user/0
Environment=QT_QPA_FONTDIR=/usr/share/fonts/truetype Environment=QT_QPA_FONTDIR=/usr/share/fonts/truetype
Environment=QT_QPA_PLATFORM=linuxfb Environment=QT_QPA_PLATFORM=linuxfb
Environment=QT_QUICK_BACKEND=software Environment=QT_QUICK_BACKEND=software
...@@ -20,8 +22,6 @@ StandardError=journal ...@@ -20,8 +22,6 @@ StandardError=journal
PermissionsStartOnly=true PermissionsStartOnly=true
IgnoreSIGPIPE=no IgnoreSIGPIPE=no
#Type=notify Type=notify
#NotifyAccess=all
Type=simple
ExecStart=/usr/bin/multiscreen-compositor ExecStart=/usr/bin/multiscreen-compositor
...@@ -5,9 +5,11 @@ Conflicts=plymouth-quit.service ...@@ -5,9 +5,11 @@ Conflicts=plymouth-quit.service
After=systemd-user-sessions.service plymouth-quit-wait.service systemd-logind.service After=systemd-user-sessions.service plymouth-quit-wait.service systemd-logind.service
[Service] [Service]
User=%i User=qt
PAMName=login Group=qt
Environment=XDG_RUNTIME_DIR=/var/run/user/0 WorkingDirectory=/home/qt
PAMName=qt-autologin
#Environment=XDG_RUNTIME_DIR=/var/run/user/0
Environment=QT_QPA_FONTDIR=/usr/share/fonts/truetype Environment=QT_QPA_FONTDIR=/usr/share/fonts/truetype
Environment=QT_QPA_PLATFORM=eglfs Environment=QT_QPA_PLATFORM=eglfs
...@@ -23,8 +25,6 @@ StandardError=journal ...@@ -23,8 +25,6 @@ StandardError=journal
PermissionsStartOnly=true PermissionsStartOnly=true
IgnoreSIGPIPE=no IgnoreSIGPIPE=no
#Type=notify Type=notify
#NotifyAccess=all
Type=simple
ExecStart=/usr/bin/multiscreen-compositor ExecStart=/usr/bin/multiscreen-compositor
...@@ -5,9 +5,11 @@ Conflicts=plymouth-quit.service ...@@ -5,9 +5,11 @@ Conflicts=plymouth-quit.service
After=systemd-user-sessions.service plymouth-quit-wait.service systemd-logind.service After=systemd-user-sessions.service plymouth-quit-wait.service systemd-logind.service
[Service] [Service]
User=%i User=qt
PAMName=login Group=qt
Environment=XDG_RUNTIME_DIR=/var/run/user/0 WorkingDirectory=/home/qt
PAMName=qt-autologin
#Environment=XDG_RUNTIME_DIR=/var/run/user/0
Environment=QT_QPA_FONTDIR=/usr/share/fonts/truetype Environment=QT_QPA_FONTDIR=/usr/share/fonts/truetype
Environment=QT_QPA_PLATFORM=eglfs Environment=QT_QPA_PLATFORM=eglfs
...@@ -22,8 +24,6 @@ StandardError=journal ...@@ -22,8 +24,6 @@ StandardError=journal
PermissionsStartOnly=true PermissionsStartOnly=true
IgnoreSIGPIPE=no IgnoreSIGPIPE=no
#Type=notify Type=notify
#NotifyAccess=all
Type=simple
ExecStart=/usr/bin/multiscreen-compositor ExecStart=/usr/bin/multiscreen-compositor
SUMMARY = "Modified Qt multi-screen compositor example" SUMMARY = "Qt multi-screen Compositor"
HOMEPAGE = "https://git.seco.com/seco-ne/tools/qt-multi-screen-compositor" HOMEPAGE = "https://git.seco.com/seco-ne/tools/qt-multi-screen-compositor"
LICENSE = "BSD-3-Clause" LICENSE = "BSD-3-Clause"
...@@ -8,11 +8,12 @@ DEPENDS = "qtbase qtquickcontrols" ...@@ -8,11 +8,12 @@ DEPENDS = "qtbase qtquickcontrols"
RDEPENDS:${PN} += "qtwayland" RDEPENDS:${PN} += "qtwayland"
SRCREV = "${AUTOREV}" SRCREV = "${AUTOREV}"
SRC_URI = "git://git.seco.com/seco-ne/tools/qt-multi-screen-compositor.git;protocol=https;branch=master;nobranch=1 \
file://qt-multi-screen-compositor@.service \
"
# Create a <tag>-<number of commits since tag>-<hash> Version string SRC_URI = " \
git://git.seco.com/seco-ne/tools/qt-multi-screen-compositor.git;protocol=https;branch=master;nobranch=1 \
file://qt-multi-screen-compositor.service \
"
inherit gitpkgv inherit gitpkgv
PKGV = "${GITPKGVTAG}" PKGV = "${GITPKGVTAG}"
...@@ -25,36 +26,39 @@ require recipes-qt/qt5/qt5.inc ...@@ -25,36 +26,39 @@ require recipes-qt/qt5/qt5.inc
FILESEXTRAPATHS:prepend := "${THISDIR}:" FILESEXTRAPATHS:prepend := "${THISDIR}:"
# ${PN}-tools added by qt5.inc, but we do not need it
PACKAGES:remove = "${PN}-tools" PACKAGES:remove = "${PN}-tools"
QMAKE_PROFILES = "${S}/compositor.pro" QMAKE_PROFILES = "${S}/compositor.pro"
do_install () { do_install () {
#Application # Application
install -d ${D}${bindir} install -d ${D}${bindir}
install -m 0755 multiscreen-compositor/multiscreen-compositor ${D}${bindir} install -m 0755 multiscreen-compositor/multiscreen-compositor ${D}${bindir}
install -m 0755 compositor-message/compositor-message ${D}${bindir} install -m 0755 compositor-message/compositor-message ${D}${bindir}
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
#Systemd unit # Systemd Unit
install -d ${D}${systemd_system_unitdir}/ install -d ${D}${systemd_system_unitdir}/
install -D -p -m 0644 ${WORKDIR}/qt-multi-screen-compositor@.service ${D}${systemd_system_unitdir}/qt-multi-screen-compositor@.service install -D -p -m 0644 ${WORKDIR}/qt-multi-screen-compositor@.service ${D}${systemd_system_unitdir}/qt-multi-screen-compositor.service
fi fi
} }
SRC_URI:append:mx8m-generic-bsp = " \ SRC_URI:append:mx8m = " \
file://kms.conf \ file://kms.conf \
" "
do_install:append:mx8m-generic-bsp () { do_install:append:mx8m () {
install -d ${D}${sysconfdir}/ install -d ${D}${sysconfdir}/
install -m 0664 ${WORKDIR}/kms.conf ${D}${sysconfdir}/kms.conf install -m 0664 ${WORKDIR}/kms.conf ${D}${sysconfdir}/kms.conf
} }
FILES:${PN} += " \ FILES:${PN} += " \
${systemd_system_unitdir}/qt-multi-screen-compositor@.service \ ${systemd_system_unitdir}/qt-multi-screen-compositor.service \
" "
SYSTEMD_SERVICE:${PN} = "qt-multi-screen-compositor.service"
SYSTEMD_SERVICE:${PN} = "qt-multi-screen-compositor@%i.service" inherit useradd
USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "--home /home/qt --shell /bin/sh --user-group -G video,input qt"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment