From f0f01e82e6adcd6b71fdecbd26e0bb66cde57445 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Mon, 14 Oct 2019 15:45:45 +0200 Subject: [PATCH] Centralise startup code in this repository Have it start through the session file that the display manager should be starting. --- CMakeLists.txt | 6 ----- bin/CMakeLists.txt | 7 ++++++ bin/kwinwrapper | 30 +++++++++++++++++++++++ bin/plasma-mobile.desktop.cmake | 7 ++++++ plasma-mobile.desktop.cmake | 42 --------------------------------- 5 files changed, 44 insertions(+), 48 deletions(-) create mode 100755 bin/kwinwrapper create mode 100644 bin/plasma-mobile.desktop.cmake delete mode 100644 plasma-mobile.desktop.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index a2788230..fa0dfb74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,12 +49,6 @@ install( FILES kwinmultitasking/metadata.desktop DESTINATION ${SERVICES_INSTALL_ install( DIRECTORY qtvirtualkeyboardplugin/ DESTINATION ${KDE_INSTALL_QMLDIR}/QtQuick/VirtualKeyboard/Styles/Plasma ) -configure_file(plasma-mobile.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/plasma-mobile.desktop) -install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/plasma-mobile.desktop - DESTINATION ${KDE_INSTALL_DATADIR}/wayland-sessions -) - add_subdirectory(bin) add_subdirectory(applets) add_subdirectory(containments) diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt index 9977660b..7d8eea41 100644 --- a/bin/CMakeLists.txt +++ b/bin/CMakeLists.txt @@ -2,3 +2,10 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/plasma-phone.cmake ${CMAKE_CURRENT_BI install(FILES ${CMAKE_CURRENT_BINARY_DIR}/plasma-phone PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ WORLD_EXECUTE WORLD_READ GROUP_EXECUTE GROUP_READ DESTINATION ${BIN_INSTALL_DIR}) +install(PROGRAMS kwinwrapper DESTINATION ${BIN_INSTALL_DIR}) + +configure_file(plasma-mobile.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/plasma-mobile.desktop) +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/plasma-mobile.desktop + DESTINATION ${KDE_INSTALL_DATADIR}/wayland-sessions +) diff --git a/bin/kwinwrapper b/bin/kwinwrapper new file mode 100755 index 00000000..44a6857a --- /dev/null +++ b/bin/kwinwrapper @@ -0,0 +1,30 @@ +#!/bin/sh + +[ -f /etc/profile ] && . /etc/profile + +export $(dbus-launch) +export QT_QPA_PLATFORM=wayland +export QT_QPA_PLATFORMTHEME=KDE +export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 +export XDG_CURRENT_DESKTOP=KDE +export KSCREEN_BACKEND=QScreen +export EGL_PLATFORM=wayland + +export KDE_FULL_SESSION=1 +export KDE_SESSION_VERSION=5 +export PLASMA_PLATFORM=phone +export QT_QUICK_CONTROLS_STYLE=Plasma +export QT_ENABLE_GLYPH_CACHE_WORKAROUND=1 +export QT_QUICK_CONTROLS_MOBILE=true + +# work around to fix : https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1507584 +export LD_LIBRARY_PATH=/usr/lib/arm-linux-gnueabihf/libhybris-egl:$LD_LIBRARY_PATH + +if [ "`cat /sys/devices/virtual/dmi/id/board_name`" = "EXOPG06411" ]; then + # The ExoPC Slate from Akademy in Berlin only supports OpenGL 1.4, to get it to + # work with KWin (which requires 2.0), fake 2.0 support. + export MESA_GL_VERSION_OVERRIDE=2.0 +fi + +touch /tmp/simplelogin_starting +kwin_wayland --xwayland --libinput --inputmethod maliit-server plasma-phone diff --git a/bin/plasma-mobile.desktop.cmake b/bin/plasma-mobile.desktop.cmake new file mode 100644 index 00000000..65c8e94e --- /dev/null +++ b/bin/plasma-mobile.desktop.cmake @@ -0,0 +1,7 @@ +[Desktop Entry] +Exec=dbus-run-session ${CMAKE_INSTALL_FULL_BINDIR}/kwinwrapper +TryExec=${CMAKE_INSTALL_FULL_BINDIR}/kwinwrapper +DesktopNames=KDE +Name=Plasma Mobile +Comment=Plasma Mobile by KDE +X-KDE-PluginInfo-Version=${PROJECT_VERSION} diff --git a/plasma-mobile.desktop.cmake b/plasma-mobile.desktop.cmake deleted file mode 100644 index 74960c0b..00000000 --- a/plasma-mobile.desktop.cmake +++ /dev/null @@ -1,42 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Exec=dbus-launch --exit-with-session ${CMAKE_INSTALL_FULL_BINDIR}/startplasmacompositor -TryExec=${CMAKE_INSTALL_FULL_BINDIR}/startplasmacompositor -DesktopNames=KDE -Name=Plasma Mobile -Name[ca]=Plasma Mòbil -Name[ca@valencia]=Plasma Mòbil -Name[de]=Plasma Mobile -Name[en_GB]=Plasma Mobile -Name[es]=Plasma Mobile -Name[fr]=Plasma Mobile -Name[gl]=Plasma Mobile -Name[it]=Plasma Mobile -Name[ko]=Plasma 모바일 -Name[nl]=Plasma-mobiel -Name[nn]=Plasma Mobile -Name[pl]=Plazma Mobile -Name[pt]=Plasma Mobile -Name[pt_BR]=Plasma Mobile -Name[sv]=Plasma mobil -Name[uk]=Мобільна Плазма -Name[x-test]=xxPlasma Mobilexx -Name[zh_TW]=Plasma 行動 -Comment=Plasma Mobile by KDE -Comment[ca]=Plasma Mòbil, creat per la comunitat KDE -Comment[ca@valencia]=Plasma Mòbil, creat per la comunitat KDE -Comment[de]=Plasma Mobile von KDE -Comment[en_GB]=Plasma Mobile by KDE -Comment[es]=Plasma Mobile creado por KDE -Comment[fr]=Plasma Mobile par KDE -Comment[gl]=Plasma Mobile de KDE -Comment[it]=Plasma Mobile creato da KDE -Comment[ko]=KDE의 Plasma 모바일 -Comment[nl]=Plasma-mobiel door KDE -Comment[nn]=Plasma Mobile frå KDE -Comment[pl]=Plazma Mobile stworzona przez KDE -Comment[pt]=Plasma Mobile do KDE -Comment[sv]=Plasma mobil av KDE -Comment[uk]=Мобільна Плазма від KDE -Comment[x-test]=xxPlasma Mobile by KDExx -Comment[zh_TW]=來自 KDE 的 Plasma 行動作業系統