PlasmaMobile.rst 8.2 KB
Newer Older
1 2
.. _plamo:

3 4 5
Plasma Mobile on armhf
======================

6
For this exercise, the i.MX6 dev board is used, starting from imx6.img built from the `d0349a9 <https://source.puri.sm/Librem5/image-builder/commit/d0349a93ea43c5497efae69e611aa0d9f4fd8b9d>`_ commit (image-builder repo). All packages were built on this board to get .debs for the native armhf architecture. 
7 8 9 10 11 12


**********************************
Setting up Development Environment
**********************************

13
On the i.MX6 system, install some initial plasma mobile build dependencies::
14 15 16

   purism@pureos:~$ sudo apt-get install plasma-workspace-wayland git dpkg-dev cmake debhelper extra-cmake-modules kwayland-dev libkf5declarative-dev libkf5notifications-dev libkf5people-dev libkf5service-dev libsystemd-dev libtelepathy-qt5-dev pkg-kde-tools plasma-framework-dev qt5-default qtdeclarative5-dev fakeroot

17
Additionally you will need to install plasma-phone-components and plasma-settings and some of their dependencies that are not available in Debian testing repos. I have built these and `here is a tarball <https://developer.puri.sm/plamo-dependencies.tar.gz>`_ containing these armhf built packages. However if you would like to build them yourself, here are some steps to do that.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

***********************
plasma-phone-components
***********************

Get the plasma-phone-components repos::

   purism@pureos:~$ git clone https://github.com/KDE/plasma-phone-components.git
   purism@pureos:~$ git clone https://github.com/debian-pm/plasma-phone-components-packaging.git

Build plasma-phone-components::

   purism@pureos:~$ cd plasma-phone-components
   purism@pureos:~/plasma-phone-components$ tar czvf plasma-phone-components_0.7+git20180223.orig.tar.gz .*
   purism@pureos:~/plasma-phone-components$ mv plasma-phone-components_0.7+git20180223.orig.tar.gz ..
   purism@pureos:~/plasma-phone-components$ cp -r ../plasma-phone-components-packaging/debian .
34
   purism@pureos:~/plasma-phone-components$ dpkg-buildpackage -sa -us -uc
35 36 37 38 39 40 41

The build results in ~/plasma-phone-components_0.7+git20180223-1_armhf.deb but before we can install it, we need to build and install a few dependencies::

   purism@pureos:~$ sudo apt-get install powerdevil qml-module-org-kde-kio qml-module-qtquick-localstorage fonts-oxygen kde-telepathy-kpeople libkf5contacts-dev

**kpeople-vcard**

Benedikt Wildenhain's avatar
Benedikt Wildenhain committed
42
This is the only dependency for plasma-phone-components that we cannot just install from apt.
43 44 45 46 47 48

Get the kpeople-vcard repos::

   purism@pureos:~$ git clone https://cgit.kde.org/kpeoplevcard.git
   purism@pureos:~/tmp$ git clone https://github.com/plasma-phone-packaging/kpeoplevcard.git

Benedikt Wildenhain's avatar
Benedikt Wildenhain committed
49
Note that the second link is the needed Debian dir and a small change is needed::
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92

   diff --git a/debian/changelog b/debian/changelog
   index c2c864f..b2875ee 100644
   --- a/debian/changelog
   +++ b/debian/changelog
   @@ -1,4 +1,4 @@
   -kpeoplevcard (0.0+git20150716) vivid; urgency=medium
   +kpeoplevcard (0.0+git20150716-1) vivid; urgency=medium

Make the tarball and then just as with the plasma-phone-components, put the debian dir in the kpeoplevcard dir and build::

   purism@pureos:~/kpeoplevcard$ tar czvf kpeoplevcard_0.0+git20150716.orig.tar.gz .*
   purism@pureos:~/kpeoplevcard$ mv kpeoplevcard_0.0+git20150716.orig.tar.gz ..
   purism@pureos:~/kpeoplevcard$ cp -r ~/tmp/kpeoplevcard/debian .
   purism@pureos:~/kpeoplevcard$ dpkg-buildpackage -sa -us -uc

The build results in ~/kpeople-vcard_0.0+git20150716-1_armhf.deb

Install both kpeople-vcard and plasma-phone-components::

   purism@pureos:~$ sudo dpkg -i kpeople-vcard_0.0+git20150716-1_armhf.deb
   purism@pureos:~$ sudo dpkg -i plasma-phone-components_0.7+git20180223-1_armhf.deb

***************
plasma-settings
***************

Get the plasma-settings repos::

   purism@pureos:~$ git clone https://anongit.kde.org/plasma-settings.git
   purism@pureos:~$ git clone https://github.com/debian-pm/plasma-settings-packaging.git

Make the tarball and put the debian dir in the plasma-settings dir::

   purism@pureos:~$ cd plasma-settings
   purism@pureos:~/plasma-settings$ tar czvf plasma-settings_0.0.1+git20180223.orig.tar.gz .*
   purism@pureos:~/plasma-settings$ mv plasma-settings_0.0.1+git20180223.orig.tar.gz ..
   purism@pureos:~/plasma-settings$ cp -r ~/plasma-settings-packaging/debian .

Install needed dependencies::

   purism@pureos:~/plasma-settings$ sudo apt-get install libaccounts-glib-dev libaccounts-qt5-dev libgettextpo-dev libkaccounts-dev libkf5archive-dev libkpimgapi-dev libsignon-qt5-dev qtbase5-private-dev kaccounts-providers qml-module-org-kde-kaccounts qml-module-org-kde-activities

Benedikt Wildenhain's avatar
Benedikt Wildenhain committed
93
But to successfully build plasma-settings, this dependency had to be removed from the control file.
94 95 96 97 98

Build plasma-settings::

   purism@pureos:~/plasma-settings$ dpkg-buildpackage -sa -us -uc

Heather Ellsworth's avatar
Heather Ellsworth committed
99
The build results in ~/plasma-settings_0.0.1+git20180223-1_armhf.deb that can be installed::
100 101 102 103 104 105 106

   purism@pureos:~$ sudo dpkg -i plasma-settings_0.0.1+git20180223-1_armhf.deb

*********************
Running Plasma Mobile
*********************

Heather Ellsworth's avatar
Heather Ellsworth committed
107
First, stop weston and open up another tty on the board::
108 109 110

   purism@pureos:~$ sudo systemctl stop weston

Heather Ellsworth's avatar
Heather Ellsworth committed
111
Now there are two ways to run Plasma Phone shell, using QPainter backend or OpenGL based platform. However since kwin_wayland have `zwp_linux_dmabuf support <https://phabricator.kde.org/T8067>`_ work in progress (under review), you can not use wayland clients and it produces the dead pixels instead of Plasma interface. To workaround this issue, edit `/usr/bin/plasma-phone` script to remove `export QT_QPA_PLATFORM=wayland`.
112

113 114 115 116 117 118
Run kwin_wayland from another tty::

   purism@pureos:~$ /usr/bin/kwin_wayland --xwayland --drm plasma-phone 

Note that to capture the plasma-phone boot logs, you can always add "2> kwin.log" to the end of the kwin_wayland command. Additional plasma logs can be found in /tmp/plasmashell_logs.

119
At this point plasma mobile should be running on your i.MX6 board!
120

Heather Ellsworth's avatar
Heather Ellsworth committed
121
Note that there is a `known issue <https://bugs.kde.org/show_bug.cgi?id=391412>`_ where the mouse functions but is invisible.
122

123 124 125 126
.. image:: images/plamo.jpg
   :width: 400px
   :height: 550px
   :align: center
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153


*****************
Onscreen Keyboard
*****************

To run the onscreen keyboard in Plasma Mobile, you'll first need to install qtvirtualkeyboard-plugin. This application `is in Debian <https://packages.debian.org/sid/qtvirtualkeyboard-plugin>`_  but not available for armhf so get the package soure from Debian, build and install it::

   purism@pureos:~$ wget http://http.debian.net/debian/pool/main/q/qtvirtualkeyboard-opensource-src/qtvirtualkeyboard-opensource-src_5.9.2+dfsg.orig.tar.xz
   purism@pureos:~$ wget http://http.debian.net/debian/pool/main/q/qtvirtualkeyboard-opensource-src/qtvirtualkeyboard-opensource-src_5.9.2+dfsg-1.debian.tar.xz
   purism@pureos:~$ tar xf qtvirtualkeyboard-opensource-src_5.9.2+dfsg.orig.tar.xz
   purism@pureos:~$ tar xf qtvirtualkeyboard-opensource-src_5.9.2+dfsg-1.debian.tar.xz'
   purism@pureos:~$ cd qtvirtualkeyboard-opensource-src-5.9.2 && sudo mv ../debian .
   purism@pureos:~/qtvirtualkeyboard-opensource-src-5.9.2$ dpkg-buildpackage -sa -us -uc

This will build qtvirtualkeyboard-plugin and it's dependent qml-module-qtquick-virtualkeyboard and install them and start Plasma Mobile::

   purism@pureos:~$ sudo dpkg -i qml-module-qtquick-virtualkeyboard_5.9.2+dfsg-1_armhf.deb qtvirtualkeyboard-plugin_5.9.2+dfsg-1_armhf.deb

Once you have a Plasma Mobile desktop, check the keyboard status and enable it::

   purism@pureos:~$ qdbus org.kde.KWin /VirtualKeyboard org.kde.kwin.VirtualKeyboard.isEnabled
   false
   purism@pureos:~$ qdbus org.kde.KWin /VirtualKeyboard org.kde.kwin.VirtualKeyboard.isenable
   purism@pureos:~$ qdbus org.kde.KWin /VirtualKeyboard org.kde.kwin.VirtualKeyboard.isEnabled
   true

Benedikt Wildenhain's avatar
Benedikt Wildenhain committed
154
Now, your onscreen keyboard should work. To test this, open kwrite and click in the text field. You should see that the keyboard is initialized and functioning!
155 156 157 158 159 160

.. image:: images/osk.jpg
   :width: 400px
   :height: 550px
   :align: center

161 162 163 164 165 166 167 168 169 170
Note that before you launch kwin_wayland, you will get a nicer keyboard if you first set QT_VIRTUALKEYBOARD_STYLE::

   purism@pureos:~$ export QT_VIRTUALKEYBOARD_STYLE=Plasma
   purism@pureos:~$ kwin_wayland --drm plasma-phone

.. image:: images/plasma_osk.jpg
   :width: 400px
   :height: 550px
   :align: center