Discussion:
[winswitch] [xpra] HTML5 client bugs
Matteo Ipri via shifter-users
2018-07-04 22:32:23 UTC
Permalink
Hi all,
I wrote a couple of Dockerfiles to test the latest stable (xpra X11 version
2.3.2-r19729 64-bit as of this writing) and the latest beta version (xpra
X11 version 2.4-r19803 64-bit as of this writing) and I found some bugs
when comparing the HTML5 client to the Xpra desktop client I use on my Arch
Linux running PC.

The Docker images are based on Ubuntu 17.10 artful and I attach the
Dockerfiles so that my experiments can be reproduced.

To build the images, I run the following commands:

sudo docker build -t xpra -f path/to/xpra/Dockerfile path/to/xpra/

sudo docker build -t xpra:beta -f path/to/xpra/Dockerfile-beta
path/to/xpra/

To run the containers, I enter the following:

sudo docker run --interactive --tty --rm -p 8080:8080 xpra

sudo docker run --interactive --tty --rm -p 8080:8080 xpra:beta

Once a container is running, I open my web browser (Firefox or Chormium)
and navigate to http://localhost:8080.
Once xpra is loaded I have an xterm window in my browser.
So far, so good.

Once I am in xterm I run the command "xdg-open https://xpra.org".

With the stable version of xpra I only get a message in my local terminal
(the one in which I launched the docker container) that says (as expected):
"2018-07-04 21:04:57,471 New unix-domain connection received on
/home/matteo/.xpra/62b2edcf1139-0
2018-07-04 21:04:57,473 Warning: remote end does not accept URLs"
If I connect to the container with the desktop client, I get the pop-up
asking me where to open the link.

With the beta version, using the HTML5 client, Firefox in the container is
launched.
It seems like the xdg-open-forwarding for URLs is broken in the current
beta.
If I connect to xpra beta with the desktop client, I get the pop-up as with
the stable version of xpra.

I can add that xdg-open-forwarding for URLs was working in version
v2.4-r19581 I installed as beta in a container some week ago.

There are two more bugs, that are present in both version of xpra and only
in HTML5 client.

If I run "firefox https://xpra.org" in the remote xterm terminal window,
Firefox launches regularly and the web page loads fine.
If I ctrl+click on a link, for example on About, the link is opened in the
same tab instead of a new one.
If I use the desktop client, the ctrl+click opens the link in a new tab as
expected.

The second bug I found is about some keyboard keys.
If I try to type the "less than" character (<) pressing "shift+," when
using the HTML5 client, I get the "greater than" character (>).
This happens on both stable and beta HTML5 clients, but not with the
desktop client. My keyboard has the US layout and has 104 keys. In the logs
I see that the "us" layout is chosen by xpra and that the ctrl key press is
recognized by xpra.
Other keys with issues are the 4 in the top right corner of the keyboard
(top right corner of the numpad): /, *, - and +. These four are mapped to
the similar keys in the main part of the keyboard, thus when I press "*" I
get "8" and I have to press "shift+*" to get the "*".

Please, let me know if I can help any further in debugging these issues.

Thank you very for your attention,

Matteo Ipri
Antoine Martin via shifter-users
2018-07-05 04:31:25 UTC
Permalink
Post by Matteo Ipri via shifter-users
Hi all,
I wrote a couple of Dockerfiles to test the latest stable (xpra X11 version
2.3.2-r19729 64-bit as of this writing) and the latest beta version (xpra
X11 version 2.4-r19803 64-bit as of this writing) and I found some bugs
when comparing the HTML5 client to the Xpra desktop client I use on my Arch
Linux running PC.
The Docker images are based on Ubuntu 17.10 artful and I attach the
Dockerfiles so that my experiments can be reproduced.
Without the docker files, this cannot be reproduced by others.
Can you share them?
Post by Matteo Ipri via shifter-users
sudo docker build -t xpra -f path/to/xpra/Dockerfile path/to/xpra/
sudo docker build -t xpra:beta -f path/to/xpra/Dockerfile-beta
path/to/xpra/
sudo docker run --interactive --tty --rm -p 8080:8080 xpra
sudo docker run --interactive --tty --rm -p 8080:8080 xpra:beta
Once a container is running, I open my web browser (Firefox or Chormium)
and navigate to http://localhost:8080.
Once xpra is loaded I have an xterm window in my browser.
So far, so good.
Once I am in xterm I run the command "xdg-open https://xpra.org".
With the stable version of xpra I only get a message in my local terminal
"2018-07-04 21:04:57,471 New unix-domain connection received on
/home/matteo/.xpra/62b2edcf1139-0
2018-07-04 21:04:57,473 Warning: remote end does not accept URLs"
If I connect to the container with the desktop client, I get the pop-up
asking me where to open the link.
With the beta version, using the HTML5 client, Firefox in the container is
launched.
It seems like the xdg-open-forwarding for URLs is broken in the current
beta.
If I connect to xpra beta with the desktop client, I get the pop-up as with
the stable version of xpra.
The current beta version should forward "xdg-open" to the html5 client,
which will display the link in the top bar, as per:
https://xpra.org/trac/ticket/1862
I've just tried it again and it worked fine here.
Post by Matteo Ipri via shifter-users
I can add that xdg-open-forwarding for URLs was working in version
v2.4-r19581 I installed as beta in a container some week ago.
There are two more bugs, that are present in both version of xpra and only
in HTML5 client.
If I run "firefox https://xpra.org" in the remote xterm terminal window,
Firefox launches regularly and the web page loads fine.
If I ctrl+click on a link, for example on About, the link is opened in the
same tab instead of a new one.
If I use the desktop client, the ctrl+click opens the link in a new tab as
expected.
Looks like a bug with keyboard modifiers (control, shift, etc) not being
synchronized correctly during pointer events.
Post by Matteo Ipri via shifter-users
The second bug I found is about some keyboard keys.
If I try to type the "less than" character (<) pressing "shift+," when
using the HTML5 client, I get the "greater than" character (>).
This happens on both stable and beta HTML5 clients, but not with the
desktop client. My keyboard has the US layout and has 104 keys. In the logs
I see that the "us" layout is chosen by xpra and that the ctrl key press is
recognized by xpra.
Other keys with issues are the 4 in the top right corner of the keyboard
(top right corner of the numpad): /, *, - and +. These four are mapped to
the similar keys in the main part of the keyboard, thus when I press "*" I
get "8" and I have to press "shift+*" to get the "*".
Keyboard event support in Javascript is challenging: it isn't always
possible to distinguish the numpad keys from other keys with the same label.
At least not with all the different combinations of browsers, OS and
input language settings.
Post by Matteo Ipri via shifter-users
Please, let me know if I can help any further in debugging these issues.
Please file tickets here:
https://xpra.org/trac/newticket

Cheers,
Antoine
Post by Matteo Ipri via shifter-users
Thank you very for your attention,
Matteo Ipri
Matteo Ipri via shifter-users
2018-07-09 08:15:22 UTC
Permalink
Hi,
I attached the Dockerfiles, but something went wrong, maybe
attachments are stripped from the emails to the mailing list.
I copy and paste the Dockerfile for the beta version here and I will
open tickets for the individual bugs.
The Dockerfile for the stable version is the same file without the
line which adds the beta repository.
Thanks

Dockerfile-beta

FROM ubuntu:artful-20180524

ENV DEBIAN_FRONTEND noninteractive

# Set up locales
RUN apt-get update \
&& apt-get -y install \
locales \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias
en_US.UTF-8 \
&& locale-gen \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8

# install various dependencies
RUN apt-get update \
&& apt-get -y install \
software-properties-common \
&& add-apt-repository universe \
&& apt-get update \
&& apt-get -y dist-upgrade \
&& apt-get -y install \
bash \
bzip2 \
ca-certificates \
curl \
dbus-x11 \
dirmngr \
fonts-liberation \
language-pack-en-base \
lsb \
software-properties-common \
websockify \
wget \
x11-xserver-utils \
xdg-utils \
xterm \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# install additional software
RUN apt-get update \
&& apt-get -y install \
firefox \
gedit \
kate \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# install xpra
RUN curl https://xpra.org/gpg.asc | apt-key add - \
&& curl -o /etc/apt/sources.list.d/xpra.list
"https://xpra.org/repos/artful/xpra.list" \
&& curl -o /etc/apt/sources.list.d/xpra-beta.list
"https://xpra.org/repos/artful/xpra-beta.list" \
&& apt-get update \
&& apt-get -y install \
xpra \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# set up non-root user
ENV MY_USER=matteo
ENV MY_UID=1988
ENV MY_GID=1988

RUN useradd --create-home --shell /bin/bash --user-group --groups
lpadmin,xpra --uid $MY_UID $MY_USER

USER $MY_UID

ENV HOME=/home/matteo
ENV XDG_RUNTIME_DIR=/home/matteo
ENV XPRA_DEFAULT_VFB_RESOLUTION=1600x900

EXPOSE 8080

WORKDIR $HOME

CMD xpra start \
--daemon=no \
--bind-tcp=0.0.0.0:8080 \
--html=on \
--ssl=off \
--bell=no \
--pulseaudio=no \
--webcam=no \
--mdns=no \
--system-tray=no \
--clipboard-direction=both \
--file-transfer=yes \
--forward-xdg-open=yes \
--start=xterm

Matteo Ipri - Information Technologies
ARPM - Advanced Risk and Portfolio Management (R)
https://www.arpm.co
https://www.linkedin.com/company-beta/10452441/
https://www.facebook.com/ARPM.co/
https://twitter.com/ARPM_co


On Thu, Jul 5, 2018 at 6:31 AM, Antoine Martin via shifter-users <
Post by Matteo Ipri via shifter-users
Post by Matteo Ipri via shifter-users
Hi all,
I wrote a couple of Dockerfiles to test the latest stable (xpra X11
version
Post by Matteo Ipri via shifter-users
2.3.2-r19729 64-bit as of this writing) and the latest beta version (xpra
X11 version 2.4-r19803 64-bit as of this writing) and I found some bugs
when comparing the HTML5 client to the Xpra desktop client I use on my
Arch
Post by Matteo Ipri via shifter-users
Linux running PC.
The Docker images are based on Ubuntu 17.10 artful and I attach the
Dockerfiles so that my experiments can be reproduced.
Without the docker files, this cannot be reproduced by others.
Can you share them?
Post by Matteo Ipri via shifter-users
sudo docker build -t xpra -f path/to/xpra/Dockerfile path/to/xpra/
sudo docker build -t xpra:beta -f path/to/xpra/Dockerfile-beta
path/to/xpra/
sudo docker run --interactive --tty --rm -p 8080:8080 xpra
sudo docker run --interactive --tty --rm -p 8080:8080 xpra:beta
Once a container is running, I open my web browser (Firefox or Chormium)
and navigate to http://localhost:8080.
Once xpra is loaded I have an xterm window in my browser.
So far, so good.
Once I am in xterm I run the command "xdg-open https://xpra.org".
With the stable version of xpra I only get a message in my local terminal
(the one in which I launched the docker container) that says (as
"2018-07-04 21:04:57,471 New unix-domain connection received on
/home/matteo/.xpra/62b2edcf1139-0
2018-07-04 21:04:57,473 Warning: remote end does not accept URLs"
If I connect to the container with the desktop client, I get the pop-up
asking me where to open the link.
With the beta version, using the HTML5 client, Firefox in the container
is
Post by Matteo Ipri via shifter-users
launched.
It seems like the xdg-open-forwarding for URLs is broken in the current
beta.
If I connect to xpra beta with the desktop client, I get the pop-up as
with
Post by Matteo Ipri via shifter-users
the stable version of xpra.
The current beta version should forward "xdg-open" to the html5 client,
https://xpra.org/trac/ticket/1862
I've just tried it again and it worked fine here.
Post by Matteo Ipri via shifter-users
I can add that xdg-open-forwarding for URLs was working in version
v2.4-r19581 I installed as beta in a container some week ago.
There are two more bugs, that are present in both version of xpra and
only
Post by Matteo Ipri via shifter-users
in HTML5 client.
If I run "firefox https://xpra.org" in the remote xterm terminal window,
Firefox launches regularly and the web page loads fine.
If I ctrl+click on a link, for example on About, the link is opened in
the
Post by Matteo Ipri via shifter-users
same tab instead of a new one.
If I use the desktop client, the ctrl+click opens the link in a new tab
as
Post by Matteo Ipri via shifter-users
expected.
Looks like a bug with keyboard modifiers (control, shift, etc) not being
synchronized correctly during pointer events.
Post by Matteo Ipri via shifter-users
The second bug I found is about some keyboard keys.
If I try to type the "less than" character (<) pressing "shift+," when
using the HTML5 client, I get the "greater than" character (>).
This happens on both stable and beta HTML5 clients, but not with the
desktop client. My keyboard has the US layout and has 104 keys. In the
logs
Post by Matteo Ipri via shifter-users
I see that the "us" layout is chosen by xpra and that the ctrl key press
is
Post by Matteo Ipri via shifter-users
recognized by xpra.
Other keys with issues are the 4 in the top right corner of the keyboard
(top right corner of the numpad): /, *, - and +. These four are mapped to
the similar keys in the main part of the keyboard, thus when I press "*"
I
Post by Matteo Ipri via shifter-users
get "8" and I have to press "shift+*" to get the "*".
Keyboard event support in Javascript is challenging: it isn't always
possible to distinguish the numpad keys from other keys with the same label.
At least not with all the different combinations of browsers, OS and
input language settings.
Post by Matteo Ipri via shifter-users
Please, let me know if I can help any further in debugging these issues.
https://xpra.org/trac/newticket
Cheers,
Antoine
Post by Matteo Ipri via shifter-users
Thank you very for your attention,
Matteo Ipri
_______________________________________________
shifter-users mailing list
http://lists.devloop.org.uk/mailman/listinfo/shifter-users
Loading...