How to automatically run desktop app in Weston?

Hi! I want to automatically start a desktop app in Weston after boot. I’ve read the Toradex article and tried both the systemctl and graphical approaches, but without success.

This is the service file I’ve used:

Description=Startup script

ExecStart=/usr/bin/python3 /home/root/magusdl/


I’ve also tried placing a .desktop file in /etc/xdg/autostart/. This is the .desktop file I’ve used:

[Desktop Entry]
Name=My App
Exec=/usr/bin/python3 /home/root/magusdl/

I confirm that when I execute the line /usr/bin/python3 /home/root/magusdl/ from the terminal, it opens the app.

Does anybody know how to make the app launch automatically?

Hello @CristianM ,

It has recently come to our view that the Weston cannot start the Desktop python. And we have come up a workaround like in this example below:

Your app.service may look like this:

    Description=Start a wayland application

And your can look something like this:

if test -z "$XDG_RUNTIME_DIR"; then
    export XDG_RUNTIME_DIR=/run/user/`id -u`
    if ! test -d "$XDG_RUNTIME_DIR"; then
        mkdir --parents $XDG_RUNTIME_DIR
        chmod 0700 $XDG_RUNTIME_DIR
# wait for weston
while [ ! -e  $XDG_RUNTIME_DIR/wayland-0 ] ; do sleep 0.1; done
sleep 1
/path/to/the/application &

We are working on updating the article as well. Meanwhile, I hope this helps!

Best Regards,

Thank you. Unfortunately, as you know from this post, I was forced to move to X11 because the Weston virtual keyboard is not compatible with the Gtk framework that I am using for the Python app. Specifically, it is not displayed when accessing a text input box.

1 Like

Hello @CristianM ,

Ah, I see! So this is not relevant to you anymore.
But, still, this is the solution when other customers need! Thank you.

Best regards,

I’ve tried your solution and it works. If only the weston-keyboard worked…

Thanks. I see that’s been discussed in a separate thread. One of us will pick it up there.

Best Regards,

hello, @CristianM can you teach me to show the weston virtual keyboard… i use pyqt5 and too qt5



Hi. You can see the answers above. There may be some changes due to the fact that you are using qt, but I am not sure.

Dear @AlanM,

Welcome to the Toradex Community. Could you please open a new post about it so that other users could also profit from the possible outcomes? In the meantime you could have a look on topics like this: QtVirtualKeyboard not shown - #7 by DarKMooN

Best regards,