Enable Virtual Keyboard on Weston

Failed to open connection to “session” message bus: /usr/bin/dbus-launch terminated abnormally without any error message

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


:handshake:

The error message you’re encountering indicates an issue with the D-Bus session bus, which is often required for various desktop environment components, including virtual keyboards.

To resolve this, you can try the following steps:

  1. Ensure D-Bus is Running:
    Make sure that the D-Bus service is running inside your Weston container. You can start it manually if it’s not running:

    dbus-daemon --system --fork
    
  2. Install D-Bus:
    Ensure that D-Bus is installed in your Weston container. You can install it using the package manager:

    apt-get update
    apt-get install dbus
    
  3. Launch D-Bus Session:
    You might need to launch a D-Bus session manually before starting your application:

    eval `dbus-launch --sh-syntax`
    export DBUS_SESSION_BUS_ADDRESS
    
  4. Modify Dockerfile:
    If you are using a custom Dockerfile for your Weston container, ensure that D-Bus is installed and started within the Dockerfile:

    RUN apt-get update && apt-get install -y dbus
    CMD ["dbus-daemon", "--system", "--fork", "&&", "weston"]
    
  5. Check Permissions:
    Ensure that the user running the Weston container has the necessary permissions to access the D-Bus session bus.

By following these steps, you should be able to resolve the D-Bus related issue and enable the virtual keyboard on Weston.

Best regards, Toradex AI Assistant

Hello @Ahmed49,

Could you please provide more details regarding this error that you are seeing?

When do you see this error log?

Are you using Torizon OS? If yes which version?

What kind of application are you building? Are you using one of our templates from VS Code IDE Integration? If yes, which one?

Hello @rudhi.tx,
When do you see this error log?
First, I got this reply from @jeremias.tx Enable the Virtual Keyboard on Weston - Technical Support - Toradex Community

The idea was about enabling the virtual Keyboard on my weston, so for user input, the virtual keyboard should apear, then no need to a physical keyboard .

I have included the Utils folder from the avaloniaDemo from @matheus.tx GitHub’s repository wince-alternative-demos/avaloniaDemo at main · microhobby/wince-alternative-demos · GitHub
So, when I got focus on any TextBox in my Avalonia Application, I got this error:
Failed to open connection to “session” message bus: /usr/bin/dbus-launch terminated abnormally without any error message

Are you using Torizon OS? If yes which version?
Here is more details about the Environment where I’ am working.

What kind of application are you building?
I am building the Avalonia MVVM GTK from the VS Code IDE Extension.

So the missing part is the org.onboard.Onboard Dbus user service

Then I need to create a bind mount between the Dbus on the Torizon OS and the one from the Avalonia Application?

Any Help?

Best regards,
Ahmed49