MycroftOS: GUI: Launch mycroft-gui onto a weston wayland compositor

This commit is contained in:
j1nx 2020-06-01 15:41:14 +02:00
parent 79e24e02a9
commit 3b85e873c1
6 changed files with 58 additions and 4 deletions

View File

@ -3,15 +3,19 @@ Description=Mycroft GUI
PartOf=mycroft.service
After=mycroft.service
After=mycroft-messagebus.service
Wants=weston.service
After=weston.service
[Service]
User=mycroft
WorkingDirectory=/home/mycroft
Environment=QT_QPA_PLATFORM=wayland
Environment=XDG_RUNTIME_DIR=/tmp/weston
Environment=LD_LIBRARY_PATH=/usr/lib
Environment=QML2_IMPORT_PATH=/usr/lib/qml
ExecStartPre=-/usr/bin/sudo /bin/psplash-write QUIT
ExecStart=mycroft-gui-app --hideTextInput --maximize
StandardOutput=null
StandardOutput=journal
Restart=on-failure
[Install]

View File

@ -23,8 +23,14 @@ define MYCROFT_SERVICE_INSTALL_TARGET_CMDS
$(TARGET_DIR)/usr/lib/systemd/system/mycroft-enclosure.service
$(INSTALL) -D -m 644 $(@D)/mycroft-skills.service \
$(TARGET_DIR)/usr/lib/systemd/system/mycroft-skills.service
$(INSTALL) -D -m 644 $(@D)/mycroft-gui.service \
$(INSTALL) -D -m 644 $(@D)/mycroft-gui.service \
$(TARGET_DIR)/usr/lib/systemd/system/mycroft-gui.service
$(INSTALL) -D -m 644 $(@D)/weston.service \
$(TARGET_DIR)/usr/lib/systemd/system/weston.service
mkdir -p $(TARGET_DIR)/etc/xdg/weston
$(INSTALL) -D -m 644 $(@D)/weston.ini \
$(TARGET_DIR)/etc/xdg/weston/weston.ini
endef
$(eval $(generic-package))

View File

@ -0,0 +1,10 @@
[core]
idle-time=0
require-input=false
[shell]
locking=false
panel-location=""
panel-position=""
background-color=0xff000000
panel-color=0xff000000

View File

@ -0,0 +1,34 @@
[Unit]
Description=Weston, a Wayland compositor, as a system service
Documentation=man:weston(1) man:weston.ini(5)
Documentation=http://wayland.freedesktop.org/
Wants=dbus.socket
After=dbus.socket
PartOf=mycroft.service
After=mycroft.service
ConditionPathExists=/dev/tty0
[Service]
Environment=XDG_RUNTIME_DIR=/tmp/weston
Environment=XDG_CONFIG_HOME=/etc/xdg/weston
ExecStartPre=-/usr/bin/mkdir /tmp/weston
ExecStart=/usr/bin/weston-launch
# A virtual terminal is needed.
TTYPath=/dev/tty7
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
UtmpIdentifier=tty7
UtmpMode=user
User=mycroft
# Fail to start if not controlling the tty.
StandardInput=tty-fail
[Install]
WantedBy=multiuser.target

View File

@ -1,2 +1,2 @@
[Service]
ExecStartPre=-/bin/psplash-write "PROGRESS 80"
ExecStartPre=-/usr/bin/sudo /bin/psplash-write "PROGRESS 80"

View File

@ -1,2 +1,2 @@
mycroft -1 mycroft -1 =mycroft /home/mycroft /bin/sh input,i2c,spi,gpio,audio,video,pulse,pulse-access,lp Mycroft user
mycroft -1 mycroft -1 =mycroft /home/mycroft /bin/sh input,i2c,spi,gpio,audio,video,pulse,pulse-access,lp,weston-launch Mycroft user