2

I try to start xpra server on a remote Lubuntu and connect to it by the following command. But I can't access the remote's speaker, microphone and webcam, and they are greyed out in the local's system tray (also see https://xpra.org/trac/wiki/Sound). How can I access them? Thanks.

$ xpra shadow ssh:olive:0
2019-10-30 18:28:18,266 Xpra gtk2 client version 2.1.3-r17247M 64-bit
2019-10-30 18:28:18,266  running on Linux Ubuntu 18.04 bionic
2019-10-30 18:28:18,268 Warning: failed to import opencv:
2019-10-30 18:28:18,268  No module named cv2
2019-10-30 18:28:18,268  webcam forwarding is disabled
Warning: failed to import GStreamer 1.x:
 Namespace Gst not available
2019-10-30 18:28:20,088 Error: failed to query sound subsystem:
2019-10-30 18:28:20,088  query did not return any data
2019-10-30 18:28:21,492 Warning: vendor 'Intel Open Source Technology Center' is greylisted,
2019-10-30 18:28:21,493  you may want to turn off OpenGL if you encounter bugs
2019-10-30 18:28:21,517 PyOpenGL warning: missing accelerate module
2019-10-30 18:28:21,607 OpenGL enabled with Mesa DRI Mobile Intel® GM45 Express Chipset
2019-10-30 18:28:21,685  keyboard settings: rules=evdev, model=pc105, layout=us
2019-10-30 18:28:21,689  desktop size is 1440x900 with 1 screen:
2019-10-30 18:28:21,691   :0.0 (381x238 mm - DPI: 96x96) workarea: 1440x876
2019-10-30 18:28:21,692     monitor 1 (303x190 mm - DPI: 120x120)
Warning: cannot use the system proxy for 'shadow' subcommand,
 failed to connect to '/run/xpra/system':
 [Errno 2] No such file or directory
Entering daemon mode; any further errors will be reported to:
  /run/user/1000/xpra/:0.log
2019-10-30 18:28:39,528 Xpra shadow server version 2.1.3-r17247 64-bit
2019-10-30 18:28:39,529  running on Linux Ubuntu 18.04 bionic
2019-10-30 18:28:39,530 enabled remote logging
2019-10-30 18:31:16,089 server is not responding, drawing spinners over the windows
2019-10-30 18:31:16,842 server is OK again
Warning: failed to import GStreamer 1.x:
 Namespace Gst not available


I tried to follow Stephen's comment, but can't install the two python packages in either Python 2 or 3. Why?

$ sudo pip install python-gst-1.0 python-opencv
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
WARNING: The directory '/home/t/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/home/t/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
ERROR: Could not find a version that satisfies the requirement python-gst-1.0 (from versions: none)
ERROR: No matching distribution found for python-gst-1.0

$ sudo pip3 install python-gst-1.0 python-opencv
The directory '/home/t/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/t/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting python-gst-1.0
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 342, in run
    requirement_set.prepare_files(finder)
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
    require_hashes
  File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 278, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 465, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 423, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "/usr/lib/python3/dist-packages/pip/index.py", line 568, in _get_pages
    page = self._get_page(location)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 683, in _get_page
    return HTMLPage.get_page(link, session=self.session)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 795, in get_page
    resp.raise_for_status()
  File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py", line 935, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/python-gst-1-0/
5
  • 1
    I’m not sure this is sufficient, but it looks like you need to install two packages (which are suggested by xpra): python-gst-1.0 and python-opencv. You probably need them on both ends of the connection. Commented Oct 31, 2019 at 17:08
  • Thanks. I can't install the two python packages in either Python 2 or 3. See my update.
    – Tim
    Commented Nov 2, 2019 at 23:32
  • Install them with apt, not pip3. Commented Nov 3, 2019 at 6:09
  • The GStreamer warning also looks like some necessary part is not working.
    – dirkt
    Commented Nov 3, 2019 at 7:31
  • @StephenKitt Thank. That helps installing the two python packages. (1) How do you know whether a python package/module is installed by pip or by apt? (2) Still the sound is not played out of the local machine.
    – Tim
    Commented Nov 3, 2019 at 14:19

1 Answer 1

1

This error is happening when installing the wrong version of python-opencv. There is a version for Python 2 and a version for Python 3. Use the version for Python 3:

sudo apt-get install python3-opencv
sudo apt-get install python3-gst-1.0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .