xpra icon
Bug tracker and wiki

Opened 4 weeks ago

Closed 12 days ago

#2558 closed defect (invalid)

Issue with XDG menu In Ubuntu

Reported by: mattsciamanna Owned by: mattsciamanna
Priority: major Milestone: 4.0
Component: html5 Version: 3.0.x
Keywords: menu ubuntu Cc:

Description (last modified by Antoine Martin)

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=0.0.0.0:9876 --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!

Attachments (1)

systemlog.pdf (43.6 KB) - added by mattsciamanna 4 weeks ago.

Download all attachments as: .zip

Change History (5)

Changed 4 weeks ago by mattsciamanna

Attachment: systemlog.pdf added

comment:1 Changed 4 weeks ago by Antoine Martin

Description: modified (diff)
Owner: changed from Antoine Martin to mattsciamanna

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)

Last edited 4 weeks ago by Antoine Martin (previous) (diff)

comment:2 Changed 4 weeks ago by 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

comment:3 Changed 4 weeks ago by 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.

comment:4 Changed 12 days ago by Antoine Martin

Resolution: invalid
Status: newclosed

Not heard back, closing.

Note: See TracTickets for help on using tickets.