Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with XDG menu In Ubuntu #2558

Closed
totaam opened this issue Jan 21, 2020 · 4 comments
Closed

Issue with XDG menu In Ubuntu #2558

totaam opened this issue Jan 21, 2020 · 4 comments
Labels

Comments

@totaam
Copy link
Collaborator

totaam commented Jan 21, 2020

Issue migrated from trac ticket # 2558

component: html5 | priority: major | resolution: invalid | keywords: menu ubuntu

2020-01-21 00:37:46: mattsciamanna created the issue


'''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!

@totaam
Copy link
Collaborator Author

totaam commented Jan 21, 2020

2020-01-21 00:39:23: mattsciamanna uploaded file systemlog.pdf (43.6 KiB)

@totaam
Copy link
Collaborator Author

totaam commented Jan 21, 2020

2020-01-21 05:46:40: antoine commented


Which version and package do you have installed?

You can try to run the menu code by hand, see #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)

@totaam
Copy link
Collaborator Author

totaam commented Jan 23, 2020

2020-01-23 03:17:22: mattsciamanna commented


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-24939-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

@totaam
Copy link
Collaborator Author

totaam commented Jan 23, 2020

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.

@totaam totaam closed this as completed Feb 6, 2020
@totaam totaam added the v3.0.x label Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant