xpra icon
Bug tracker and wiki

Opened 2 weeks ago

Closed 2 weeks ago

#2353 closed defect (fixed)

Character encoding problem when connecting to server

Reported by: psycho_zs Owned by: Antoine Martin
Priority: major Milestone: 3.0
Component: core Version: 2.5.x
Keywords: Cc:

Description

Using xpra 2.5.2+dfsg1-2 (currently in Debian unstable), also tested 2.5.2-r22875-1.

Connection to server is impossible, server reports:

Error: processing new connection from Protocol(unix-domain socket:/run/xpra/hostname-100):
 'latin-1' codec can't encode characters in position 0-6: ordinal not in range(256)
Disconnecting client Protocol(unix-domain socket:/run/xpra/hostname-100):

2.4.3 works fine

custom configuration, aside from key shortcuts and vars:

pulseaudio = no
dpi = 96
desktop-scaling = on
xsettings = no
start-new-commands = yes

Attachments (1)

xpra.log (561.2 KB) - added by psycho_zs 2 weeks ago.
server log

Download all attachments as: .zip

Change History (14)

comment:1 Changed 2 weeks ago by Antoine Martin

Owner: changed from Antoine Martin to psycho_zs

Please post the server's -d server debug log output.

Changed 2 weeks ago by psycho_zs

Attachment: xpra.log added

server log

comment:2 Changed 2 weeks ago by Antoine Martin

Owner: changed from psycho_zs to Antoine Martin
Status: newassigned

Thanks, this comes from:

b'desktop.names': (b'\xd1\x80\xd0\xb0\xd0\xb1\xd0\xbe\xd1\x87\xd0\xb8\xd0\xb9 \xd1\x81\xd1\x82\xd0\xbe\xd0\xbb 1', b'\xd1\x80\xd0\xb0\xd0\xb1\xd0\xbe\xd1\x87\xd0\xb8\xd0\xb9 \xd1\x81\xd1\x82\xd0\xbe\xd0\xbb 2', b'\xd1\x80\xd0\xb0\xd0\xb1\xd0\xbe\xd1\x87\xd0\xb8\xd0\xb9 \xd1\x81\xd1\x82\xd0\xbe\xd0\xbb 3', b'\xd1\x80\xd0\xb0\xd0\xb1\xd0\xbe\xd1\x87\xd0\xb8\xd0\xb9 \xd1\x81\xd1\x82\xd0\xbe\xd0\xbb 4', b'\xd1\x80\xd0\xb0\xd0\xb1\xd0\xbe\xd1\x87\xd0\xb8\xd0\xb9 \xd1\x81\xd1\x82\xd0\xbe\xd0\xbb 5'

And this line:

v = strtobytes(dn).decode("utf8")

That's odd because this code has not changed?
Maybe you've switched to python3?

Those strings look wrong, not sure how to interpret them.

comment:3 Changed 2 weeks ago by Antoine Martin

Oh, I think I get it, it's the stricter exception checking: we need to catch UnicodeEncodeError.

comment:4 Changed 2 weeks ago by psycho_zs

These are just default localized names of desktops in Openbox: "рабочий стол #"

comment:5 Changed 2 weeks ago by Antoine Martin

Can you paste the output of:

./xpra/platform/gui.py  | grep -i desktop

comment:6 Changed 2 weeks ago by psycho_zs

def get_number_of_desktops():
def get_desktop_names():
def show_desktop(show):
            "desktops"                      : get_number_of_desktops(),
            "desktop_names"                 : get_desktop_names(),
                "show_desktop", "set_fullscreen_monitors", "set_shaded",
                "get_number_of_desktops", "get_desktop_names",

comment:7 Changed 2 weeks ago by Antoine Martin

You have to run the exact command, not grep the source.

comment:8 Changed 2 weeks ago by psycho_zs

Oh.
this file is not executable and can not find xpra.platform module if run in python.

comment:9 Changed 2 weeks ago by Antoine Martin

this file is not executable

This should work:

python2 /path/to/xpra/platform/gui.py  | grep -i desktop

and / or:

python3 /path/to/xpra/platform/gui.py  | grep -i desktop
Last edited 2 weeks ago by Antoine Martin (previous) (diff)

comment:10 Changed 2 weeks ago by psycho_zs

Right, python3, missed that in the path.

$ python3 /usr/lib/python3/dist-packages/xpra/platform/gui.py | grep -i desktop
* desktop_names                   : рабочий стол 1, рабочий стол 2, рабочий стол 3, рабочий стол 4, рабочий стол 5
* desktops                        : 5

comment:11 Changed 2 weeks ago by Antoine Martin

Thanks, I should be able to come up with a proper fix now.

In the meantime, r23099 should workaround the problem, you can apply it by hand.

comment:12 Changed 2 weeks ago by psycho_zs

The workaround works, thanks!

comment:13 Changed 2 weeks ago by Antoine Martin

Resolution: fixed
Status: assignedclosed

More correct fix in r23100. (will backport)

Note: See TracTickets for help on using tickets.