Forums - [SOLVED] Running a Web Browser on Weston

5 posts / 0 new
Last post
[SOLVED] Running a Web Browser on Weston
jhwill
Join Date: 30 Apr 21
Posts: 12
Posted: Tue, 2021-06-01 19:04

In an earlier post, we came to learn that X11 isn't supported on the RB5.

Now, I'm trying to find an alternate solution to run a web browser from Weston.

I have installed firefox via:

apt install firefox

I try to run it like so:

export XDG_RUNTIME_DIR=/run/weston
export GDK_BACKEND=wayland
export MOZ_ENABLE_WAYLAND=1
export DISPLAY=wayland-0
export LD_LIBRARY_PATH=/usr/lib:/usr/lib/aarch64-linux-gnu/
export WAYLAND_DEBUG=1
export WAYLAND_DISPLAY=wayland-0

firefox \
    --g-fatal-warnings \
    --kiosk \
    --private-window \
    https://bing.com

This doesn't work. Firefox does not display. A number of errors are reported to the console (I use ... to denote an abridge part of the output):

...
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: eglBindAPI returned an error (t=0.548409) [GFX1-]: glxtest: eglBindAPI returned an error
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: eglBindAPI returned an error (t=0.548409) |[1][GFX1-]: glxtest: EGL test failed (t=0.548476) [GFX1-]: glxtest: EGL test failed
Crash Annotation GraphicsCriticalError: |[0][GFX1-]: glxtest: eglBindAPI returned an error (t=0.548409) |[1][GFX1-]: glxtest: EGL test failed (t=0.548476) |[2][GFX1-]: No GPUs detected via PCI (t=0.548504) [GFX1-]: No GPUs detected via PCI
...
(firefox:3158): Gdk-WARNING **: 01:25:43.244: ../../../../../gdk/x11/gdkwindow-x11.c:5579 drawable is not a native X11 window
Exiting due to channel error.
./launch-firefox: line 16: 3158 Trace/breakpoint trap (core dumped) firefox --g-fatal-warnings --kiosk --private-window https://bing.com/

How can I run a web browser on the RB5?

  • Up0
  • Down0
kevin.dai
Join Date: 21 Oct 20
Posts: 137
Posted: Wed, 2021-06-02 14:08

1.Save below lines to a file which is in /data folder and name ir to weston.sh
 
#! /bin/bash
mkdir -p /usr/bin/weston_socket
export XDG_RUNTIME_DIR=/usr/bin/weston_socket
export LD_LIBRARY_PATH=/usr/lib:/usr/lib/aarch64-linux-gnu/
weston --tty=1 --connector=29

 

2. start weston

$ source /data/weston.sh

$ export XDG_RUNTIME_DIR=/usr/bin/weston_socket

3. then run your commands to start firefox

 

 

  • Up0
  • Down0
jhwill
Join Date: 30 Apr 21
Posts: 12
Posted: Wed, 2021-06-02 15:22

Hi Kevin,

Thanks for the reply. The commands you suggest are almost identical to the ones that I did run yesterday.

However, for completeness, I have just now tried to exactly follow the steps you suggested, without any change. However, the result is the same:

(firefox:2852): Gdk-WARNING **: 22:17:21.626: ../../../../../gdk/x11/gdkwindow-x11.c:5579 drawable is not a native X11 window

Exiting due to channel error.

Trace/breakpoint trap (core dumped)

 

Were you able to get the Firefox window to display by running those sames steps? If so, did how did you install Firefox? What version of the firmware are you using? I am running the latest (May) release from Thundercomm's SDK Manager.

Thanks,
Jameson

  • Up0
  • Down0
mita.rathod
Join Date: 17 Sep 18
Posts: 59
Posted: Wed, 2021-06-09 09:48

Hi Customer,
At the moment , running web browser on weston is not supported. Checking with PdM, will get back for any update

Thanks,
Mita

  • Up0
  • Down0
jhwill
Join Date: 30 Apr 21
Posts: 12
Posted: Thu, 2021-06-10 12:28

I was able to get chromium-browser running through XWayland.

First, I install chromium-browser and XWayland:

apt install chromium-browser xwayland

Now, I create a Weston configuration file in /root/.config/weston.ini :

[core]
xwayland=true

[xwayland]
path=/usr/bin/Xwayland

I also create a symlink for the xwayland library:

ln -s /usr/lib/aarch64-linux-gnu/libweston-3/xwayland.so /usr/lib/libweston-3

Next, I start Weston:

export XDG_RUNTIME_DIR=/run/weston
rm -r -f $XDG_RUNTIME_DIR
mkdir -p $XDG_RUNTIME_DIR
chmod 700 $XDG_RUNTIME_DIR

export LD_LIBRARY_PATH=/usr/lib:/usr/lib/aarch64-linux-gnu

weston --tty 1 --connector=29 --config=/root/.config/weston.ini

After that, I'm able to start chromium like this:

DISPLAY=:0 chromium-browser --no-sandbox --kiosk yahoo.com
  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.