Xpra: Ticket #2558: Issue with XDG menu In Ubuntu

Remote OS: Ubuntu 16.04 Local OS: Mac OSX High Sierra 10.13.6

I am starting an HTML5 xpra server with this command:

xpra start --bind-tcp= --html=on --start-child=xterm --mdns=no

Everything works and I can access it locally on firefox, chrome, and safari browsers. Unfortunately, the "start" menu in the system tray doesnt show any items to select and the system log is showing that it cannot find the application menu.

^ Warning: cannot use application menu data:^[[0m
^  no python-xdg module^

I know this is very similar to #2174, but I looked and the version I am using includes the fix made at changeset r21880. So I am not certain what would be causing it. "xpra attach -d tray" results in the following:

__init__.py:57: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
xpra initialization error:
 cannot access the default display ''

Thank you!

Tue, 21 Jan 2020 00:39:22 GMT - mattsciamanna: attachment set

Tue, 21 Jan 2020 05:46:39 GMT - Antoine Martin: owner, description changed

Which version and package do you have installed?

You can try to run the menu code by hand, see ticket:2174#comment:10. (you may need to run locate xdg_helper.py to find it first)

xpra initialization error:
 cannot access the default display ''

This has nothing to do with the problems above. The terminal you are starting from does not have a $DISPLAY value set, for whatever reason. (maybe you unset it, logged in via ssh, etc) Xpra needs a display to show its windows! It's not at all clear what you're trying to do. xpra attach is for running the client locally, but you said you were using the html5 client.

BTW: do NOT use PDF for text files. Use test files. (system log)

Thu, 23 Jan 2020 03:17:22 GMT - mattsciamanna:

Ok Sorry I read about the "xpra attach -d tray" method from another comment but you're right that makes no sense since I'm logging in via ssh.

I'm using version 3.0.5-r24939-1 which I found in the winswitch instructions linked to on the downloads page.

I foundboth a python 2.7 and 3 version of xdg_helper. I ran the xdg_helper.py file in python2 and received:

Warning: cannot use application menu data:
2020-01-23 03:09:27,189  no python-xdg module
no menu data found

then i ran the python3 version and got:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 312, in <module>
    r = main()
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 304, in main
    menu = load_xdg_menu_data()
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 237, in load_xdg_menu_data
    xdg_menu_data = do_load_xdg_menu_data()
  File "/usr/lib/python3/dist-packages/xpra/platform/xposix/xdg_helper.py", line 242, in do_load_xdg_menu_data
    from xdg.Menu import parse, Menu, ParsingError
  File "/usr/local/lib/python3.5/dist-packages/xdg/__init__.py", line 120
    XDG_RUNTIME_DIR: Optional[Path] = Path(os.environ["XDG_RUNTIME_DIR"])
SyntaxError: invalid syntax

Thu, 23 Jan 2020 03:25:38 GMT - Antoine Martin:

python2 and received: no python-xdg module

Install python2-xdg

python3: File "/usr/local/lib/python3.5/dist-packages/xdg/__init__.py", line 120

That's not a system file from a package, you must have installed that yourself.

XDG_RUNTIME_DIR: Optional[Path] = Path(os.environ["XDG_RUNTIME_DIR"]) SyntaxError: invalid syntax

And there's the problem. Remove this stuff you've installed and use the system provided python3-xdg package instead.

Thu, 06 Feb 2020 08:54:07 GMT - Antoine Martin: status changed; resolution set

Not heard back, closing.

Sat, 23 Jan 2021 05:54:32 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2558