<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Launching Libertine Application from an other QML C++ application]]></title><description><![CDATA[<p dir="auto">Hello, I'm currently working on the ‘Launcher modular’ application.<br />
Among other things, it's an application launcher that also lets you quickly view information such as the latest messages or calls received, or upcoming events.<br />
It also allows users to briefly view RSS feeds or their photo album.<br />
Among its features, I'm having trouble launching ‘Libertine’ applications, which currently don't work on the OpenStore version.</p>
<p dir="auto">I'm in the process of fixing it, but I'm wondering if the solution I've found is the right one?<br />
The way I proceed is as follows:</p>
<p dir="auto">I've created a serviceWorker in C++ which launches an Xwayland server and the ‘Libertine’ application in a separate thread from the main application using<br />
QProcess libertineProcess.start(‘libertine-launch’, arguments);`````<br />
This solution works</p>
<p dir="auto">The problems I'm having are as follows:</p>
<ul>
<li>I don't know If the way I've done it is correct ?</li>
<li>I have to configure Launcher Modular so that it doesn't hang or else the Libertine application stops responding after a few seconds.</li>
<li>Stopping the Libertine application works, but the Xwayland application remains in the background and if I stop it, Launcher Modular also stops.</li>
</ul>
<p dir="auto">If you want to see the implementation you can have a look there<br />
<a href="https://github.com/lutin11/launcher-modular/tree/feature/libertine/plugins/LibertineLauncher" rel="nofollow ugc">https://github.com/lutin11/launcher-modular/tree/feature/libertine/plugins/LibertineLauncher</a></p>
]]></description><link>https://forums.ubports.com/topic/10573/launching-libertine-application-from-an-other-qml-c-application</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Mar 2026 22:52:26 GMT</lastBuildDate><atom:link href="https://forums.ubports.com/topic/10573.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 07 Nov 2024 19:06:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Launching Libertine Application from an other QML C++ application on Wed, 13 Nov 2024 23:08:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kazord" aria-label="Profile: kazord">@<bdi>kazord</bdi></a> the worker is probably not any more useful, anyway it is not launch in a separate thread anymore.<br />
If I remove <code>libertineProcess.waitForFinished(-1);</code><br />
the process is immediacy killed</p>
<pre><code>Nov 14 00:03:23 ubuntu-phablet aa-exec[11123]: Application  "firefox"  starting into containers  "libert1"
Nov 14 00:03:23 ubuntu-phablet aa-exec[11123]: QProcess: Destroyed while process ("lomiri-app-launch") is still running.
Nov 14 00:04:24 ubuntu-phablet aa-exec[11123]: QObject::startTimer: Timers cannot be started from another thread
</code></pre>
<p dir="auto">The code does what I want, but it remains me some stuff before publishing the fix.</p>
]]></description><link>https://forums.ubports.com/post/83409</link><guid isPermaLink="true">https://forums.ubports.com/post/83409</guid><dc:creator><![CDATA[saveurlinux]]></dc:creator><pubDate>Wed, 13 Nov 2024 23:08:57 GMT</pubDate></item><item><title><![CDATA[Reply to Launching Libertine Application from an other QML C++ application on Wed, 13 Nov 2024 22:59:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/saveurlinux" aria-label="Profile: saveurlinux">@<bdi>saveurlinux</bdi></a>, i dont have any device to test lomiri-app-launch,<br />
it's an async start command, isn't it ?<br />
In that case you don't need to keep the worker (and waitForFinish /finished is not the end of the app but the start call only)</p>
<p dir="auto">Does the code do what you want ? or is there anything not working as expected</p>
]]></description><link>https://forums.ubports.com/post/83408</link><guid isPermaLink="true">https://forums.ubports.com/post/83408</guid><dc:creator><![CDATA[kazord]]></dc:creator><pubDate>Wed, 13 Nov 2024 22:59:55 GMT</pubDate></item><item><title><![CDATA[Reply to Launching Libertine Application from an other QML C++ application on Wed, 13 Nov 2024 22:34:36 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for your answers,<br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/kazord" aria-label="Profile: kazord">@<bdi>kazord</bdi></a> your solution is the one I'm using to launch the apps that are not libertine ones, unfortunately it didn't work for libertine ones.<br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/kugiigi" aria-label="Profile: kugiigi">@<bdi>kugiigi</bdi></a> regarding <code>libertine-launch</code> the <code>lomiri-app-launch</code> commands add some benefits:</p>
<ul>
<li>I no more have to use a dedicated thread</li>
<li>I do not have to require 'Launcher Modular' to be always on.</li>
</ul>
<p dir="auto">After some investigation, I realized that I do not have to launch myself Xwayland so I could remove this code.</p>
<p dir="auto">This is the current code:</p>
<pre><code>LibertineWorker::LibertineWorker(const QString &amp;containerName, const QString &amp;appName, QObject *parent)
    : QObject(parent), m_containerName(containerName), m_appName(appName) {}

void LibertineWorker::run() {
        QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
        QString displayValue = env.value("DISPLAY", ":0");  // TODO set environement at launcher modular startup
        env.insert("DISPLAY", displayValue);

        QProcess libertineProcess;
        libertineProcess.setProcessEnvironment(env);

        libertineProcess.start("lomiri-app-launch", QStringList() &lt;&lt; m_containerName + "_" + m_appName);

        if (!libertineProcess.waitForStarted()) {
            qDebug() &lt;&lt; "Erreur : Failed to start application" &lt;&lt; m_appName;
        } else {
            qDebug() &lt;&lt; "Application " &lt;&lt; m_appName &lt;&lt; " starting into containers " &lt;&lt; m_containerName;
        }

        // Wait for the app to finish, then stop XWayland
        libertineProcess.waitForFinished(-1);// avoid the 30-second timeout

        emit finished();
}
</code></pre>
]]></description><link>https://forums.ubports.com/post/83407</link><guid isPermaLink="true">https://forums.ubports.com/post/83407</guid><dc:creator><![CDATA[saveurlinux]]></dc:creator><pubDate>Wed, 13 Nov 2024 22:34:36 GMT</pubDate></item><item><title><![CDATA[Reply to Launching Libertine Application from an other QML C++ application on Wed, 13 Nov 2024 17:45:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/saveurlinux" aria-label="Profile: saveurlinux">@<bdi>saveurlinux</bdi></a> it used to be a link click from the "Action" value of appinfo plugin.</p>
<p dir="auto">was something like this back in 16.10 before lomiri<br />
"application:///"+packagename+".desktop"</p>
<p dir="auto">You should be able to edit this line with the new system url that start container</p>
]]></description><link>https://forums.ubports.com/post/83399</link><guid isPermaLink="true">https://forums.ubports.com/post/83399</guid><dc:creator><![CDATA[kazord]]></dc:creator><pubDate>Wed, 13 Nov 2024 17:45:54 GMT</pubDate></item><item><title><![CDATA[Reply to Launching Libertine Application from an other QML C++ application on Mon, 11 Nov 2024 19:45:02 GMT]]></title><description><![CDATA[<p dir="auto">You can probably use <code>lomiri-app-launch</code>. That's the one used to launch all apps in Lomiri as far as I know. You can list appids with <code>lomiri-app-launch-appids</code>. Libertine appids start with their container id.</p>
]]></description><link>https://forums.ubports.com/post/83356</link><guid isPermaLink="true">https://forums.ubports.com/post/83356</guid><dc:creator><![CDATA[kugiigi]]></dc:creator><pubDate>Mon, 11 Nov 2024 19:45:02 GMT</pubDate></item><item><title><![CDATA[Reply to Launching Libertine Application from an other QML C++ application on Thu, 07 Nov 2024 21:00:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ikoz" aria-label="Profile: ikoz">@<bdi>ikoz</bdi></a> Yes It does work but not perfectly</p>
]]></description><link>https://forums.ubports.com/post/83261</link><guid isPermaLink="true">https://forums.ubports.com/post/83261</guid><dc:creator><![CDATA[saveurlinux]]></dc:creator><pubDate>Thu, 07 Nov 2024 21:00:48 GMT</pubDate></item><item><title><![CDATA[Reply to Launching Libertine Application from an other QML C++ application on Thu, 07 Nov 2024 20:39:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/saveurlinux" aria-label="Profile: saveurlinux">@<bdi>saveurlinux</bdi></a> Does it work if it is launched on an async thread (from STL, or POSIX threads)? It shouldn't hang.<br />
I've had some problems with qprocess unable to run certain commands too.</p>
<p dir="auto">Unfortunately every app has its own different plugin to run commands e.g. UTT, snapz0r, uadblock and my icon changer app.</p>
]]></description><link>https://forums.ubports.com/post/83260</link><guid isPermaLink="true">https://forums.ubports.com/post/83260</guid><dc:creator><![CDATA[ikoz]]></dc:creator><pubDate>Thu, 07 Nov 2024 20:39:06 GMT</pubDate></item></channel></rss>