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

xpra: fixes for xorg.conf and use xf86videodummy from xorg #83853

Merged
merged 2 commits into from Apr 2, 2020

Conversation

offlinehacker
Copy link
Contributor

Motivation for this change

This pull request fixes default xorg.conf file, so xorg does not crash when starting and finds required modules. It also removes unnecessary xf86videodummy package and uses one from xorg.

Fixes #81425

Currently there is still another issue when starting xpra, so when starting you need to use: xpra start --daemon=no --fake-xinerama=no.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@jtojnar
Copy link
Contributor

jtojnar commented Mar 31, 2020

Sorry, no idea about any of this X.org stuff, only touched the wrapGAppsHook parts.

@jtojnar jtojnar removed their request for review March 31, 2020 08:55
@mjlbach
Copy link
Contributor

mjlbach commented Apr 1, 2020

Tried this out:

❯ xpra start --daemon=no --fake-xinerama=no :10
2020-04-01 12:45:38,573 cannot use uinput for virtual devices:
2020-04-01 12:45:38,574  [Errno 19] Failed to open the uinput device: No such device

X.Org X Server 1.20.7
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.19.69 x86_64 
Current Operating System: Linux nixos 4.19.113 #1-NixOS SMP Wed Mar 25 07:06:15 UTC 2020 x86_64
Kernel command line: BOOT_IMAGE=(hd2,gpt5)//kernels/jg9gfc84svh76nkj2am2jxq977bqd2k8-linux-4.19.113-bzImage systemConfig=/nix/store/hfcfvla3hnyvph4a2skv0qy5c2d06xd0-nixos-system-nixos-19.09.2343.856dbd1a5c7 init=/nix/store/hfcfvla3hnyvph4a2skv0qy5c2d06xd0-nixos-system-nixos-19.09.2343.856dbd1a5c7/init loglevel=4
Build Date: 13 January 2020  10:57:44PM
 
Current version of pixman: 0.38.4
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/run/user/1000/xpra/Xorg.:10.log", Time: Wed Apr  1 12:45:38 2020
(++) Using config file: "/nix/store/bfwh15sm53jis9jq24l7j940pqalw8zz-xpra-3.0.7/etc/xpra/xorg.conf"
(==) Using system config directory "/nix/store/s5mji17miyfq819i5qmdb79dpp0qlcvm-xorg-server-1.20.7/share/X11/xorg.conf.d"

2020-04-01 12:45:41,028 Warning: failed to create socket directory '/run/xpra'
2020-04-01 12:45:41,028  [Errno 13] Permission denied: '/run/xpra'
2020-04-01 12:45:41,028 created unix domain socket '/run/user/1000/xpra/nixos-10'
2020-04-01 12:45:41,028 cannot create group socket '/run/xpra/nixos-10'
2020-04-01 12:45:41,028  [Errno 2] No such file or directory
2020-04-01 12:45:41,028  /run/xpra does not exist
2020-04-01 12:45:41,084 pointer device emulation using XTest
2020-04-01 12:45:41,117 serving html content from '/nix/store/bfwh15sm53jis9jq24l7j940pqalw8zz-xpra-3.0.7/share/xpra/www'
2020-04-01 12:45:41,451 OpenGL is supported on display ':10'
2020-04-01 12:45:41,471 Warning: failed to load the mdns publisher
2020-04-01 12:45:41,471  No module named 'avahi'
2020-04-01 12:45:41,471  either install the 'python-avahi' module
2020-04-01 12:45:41,471  or use the 'mdns=no' option
2020-04-01 12:45:41,485 D-Bus notification forwarding is available
2020-04-01 12:45:41,493 pulseaudio server started with pid 22339
2020-04-01 12:45:41,493  private server socket path:
2020-04-01 12:45:41,493  '/run/user/1000/xpra/pulse-10/pulse/native'
E: [pulseaudio] ltdl-bind-now.c: Failed to open module module-x11-publish.so: module-x11-publish.so: cannot open shared object file: No such file or directory
E: [pulseaudio] module.c: Failed to open module "module-x11-publish".

** (gst-plugin-scanner:22346): CRITICAL **: 12:45:41.837: Couldn't g_module_open libpython. Reason: /nix/store/xb1mp0f16lv23rwhfdc1665v5r20jfmm-python3-3.7.6/lib/python3.7/config-3.7m-x86_64-linux-gnu/libpython3.7m.so: cannot open shared object file: No such file or directory

** (gst-plugin-scanner:22346): CRITICAL **: 12:45:41.852: Couldn't g_module_open libpython. Reason: /nix/store/xb1mp0f16lv23rwhfdc1665v5r20jfmm-python3-3.7.6/lib/python3.7/config-3.7m-x86_64-linux-gnu/libpython3.7m.so: cannot open shared object file: No such file or directory
2020-04-01 12:45:41,986 GStreamer version 1.16.2 for Python 3.7.6 64-bit

(Xpra:22321): Gtk-CRITICAL **: 12:45:42.001: gtk_widget_realize: assertion 'widget->priv->anchored || GTK_IS_INVISIBLE (widget)' failed
2020-04-01 12:45:42,018 xpra is ready.
2020-04-01 12:45:42,019 xpra GTK3 X11 version 3.0.7-r25629 64-bit
2020-04-01 12:45:42,042  uid=1000 (mjlbach), gid=100 (users)
2020-04-01 12:45:42,042  running with pid 22321 on Linux
2020-04-01 12:45:42,043  connected to X11 display :10 with 24 bit colors
2020-04-01 12:45:42,070 Warning: webcam forwarding is disabled
2020-04-01 12:45:42,070  the virtual video directory '/sys/devices/virtual/video4linux' was not found
2020-04-01 12:45:42,070  make sure that the 'v4l2loopback' kernel module is installed and loaded
2020-04-01 12:45:42,070 found 0 virtual video devices for webcam forwarding
2020-04-01 12:45:42,078 Error: lpinfo command failed to run
2020-04-01 12:45:42,078  [Errno 2] No such file or directory: '/usr/sbin/lpinfo': '/usr/sbin/lpinfo'
2020-04-01 12:45:42,078  command used: '/usr/sbin/lpinfo --make-and-model Generic PDF Printer -m'
2020-04-01 12:45:42,082 printer forwarding enabled using postscript
2020-04-01 12:45:42,082 Warning: cannot watch for application menu changes without pyinotify:
2020-04-01 12:45:42,082  No module named 'pyinotify'
2020-04-01 12:45:43,253 Warning: icon is quite large (3408 KB):
2020-04-01 12:45:43,253  '/home/mjlbach/.nix-profile/share/icons/hicolor/scalable/apps/fr.handbrake.ghb.svg'

2020-04-01 12:45:45,528 15.5GB of system memory

2020-04-01 12:45:49,923 New unix-domain connection received
2020-04-01 12:45:49,923  on '/run/user/1000/xpra/nixos-10'
^C
2020-04-01 12:45:53,139 got signal SIGINT
2020-04-01 12:45:53,139 exiting
2020-04-01 12:45:53,140 removing private directory '/run/user/1000/xpra/pulse-10'
2020-04-01 12:45:53,141 killing xvfb with pid 22324
2020-04-01 12:45:53,141 removing socket '/run/user/1000/xpra/nixos-10'
(II) Server terminated successfully (0). Closing log file.

Seems like it starts now at least! Having some issues combining with vglrun which may be separate.

@offlinehacker offlinehacker merged commit 783da8c into NixOS:master Apr 2, 2020
@mjlbach
Copy link
Contributor

mjlbach commented Apr 2, 2020

@offlinehacker Having some issues with attaching remotely:

❯ xpra start --daemon=no --fake-xinerama=no :100

❯ DISPLAY=:100 xterm
/run/current-system/sw/bin/xterm: cannot load font "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1"

❯ xpra attach --ssh=ssh ssh/nix/100
Warning: vendor 'Intel Inc.' is greylisted,
 you may want to turn off OpenGL if you encounter bugs
/Applications/Xpra.app/Contents/Resources/lib/python/xpra/platform/darwin/gui.py:110: Warning: invalid cast from 'GtkMenuBar' to 'GtkWindow'
  osxapp.set_menu_bar(mh.rebuild())

(Xpra:65556): Gtk-CRITICAL **: 02:25:34.702: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed
2020-04-02 02:25:34,873 Xpra GTK3 client version 3.0.8-r25889 64-bit
2020-04-02 02:25:34,894  running on Mac OS X 10.15.4
2020-04-02 02:25:36,208 GStreamer version 1.16.2 for Python 3.8.2 64-bit
2020-04-02 02:25:36,409 OpenGL_accelerate module loaded
2020-04-02 02:25:36,438 Using accelerated ArrayDatatype
2020-04-02 02:25:37,114 Warning: vendor 'Intel Inc.' is greylisted,
2020-04-02 02:25:37,114  you may want to turn off OpenGL if you encounter bugs
/Applications/Xpra.app/Contents/Resources/lib/python/numpy/ma/core.py:4466: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if self.shape is ():
/Applications/Xpra.app/Contents/Resources/lib/python/xpra/client/gl/gtk3/nativegl_client_window.py:13: Warning: g_object_get_qdata: assertion 'G_IS_OBJECT (object)' failed
  return GLContext().check_support(force_enable)  #pylint: disable=not-callable
/Applications/Xpra.app/Contents/Resources/lib/python/xpra/client/gl/gtk3/nativegl_client_window.py:13: Warning: g_object_set_qdata_full: assertion 'G_IS_OBJECT (object)' failed
  return GLContext().check_support(force_enable)  #pylint: disable=not-callable
/Applications/Xpra.app/Contents/Resources/lib/python/xpra/client/gl/gtk3/nativegl_client_window.py:13: Warning: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
  return GLContext().check_support(force_enable)  #pylint: disable=not-callable
2020-04-02 02:25:37,639 OpenGL enabled with Intel Iris OpenGL Engine
2020-04-02 02:25:37,719  keyboard settings: layout=us
2020-04-02 02:25:37,721 Warning: invalid screen size 5719x6349mm
2020-04-02 02:25:37,722  using 286x179 mm
2020-04-02 02:25:37,728  desktop size is 1280x800 with 1 screen:
2020-04-02 02:25:37,728   mjlbach-macbook-pro.local (286x179 mm - DPI: 113x113) workarea: 1280x709 at 0x23
2020-04-02 02:25:37,728     monitor 2
/Applications/Xpra.app/Contents/Resources/lib/python/xpra/platform/darwin/osx_tray.py:91: Warning: invalid cast from 'GtkMenuBar' to 'GtkWindow'
  self.macapp.set_menu_bar(self.menu)

(Xpra:65556): Gtk-CRITICAL **: 02:25:37.796: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed
sh: xpra: command not found
  File "/nix/store/bfwh15sm53jis9jq24l7j940pqalw8zz-xpra-3.0.7/bin/.xpra-wrapped", line 2
    export PATH='/nix/store/xb1mp0f16lv23rwhfdc1665v5r20jfmm-python3-3.7.6/bin:/nix/store/bfwh15sm53jis9jq24l7j940pqalw8zz-xpra-3.0.7/bin:/nix/store/v6rdicqjk67y15s7pskn0clm4wy87asb-python3.7-numpy-1.18.1/bin:/nix/store/lp12b7x75m7r2jlar6ldvj3n9wjy6ybc-cairo-1.16.0-dev/bin:/nix/store/wn7j6ssmqsz56vcz7c6y4m1w0dx1p521-freetype-2.10.1-dev/bin:/nix/store/xqjvicyyrhvlzdp3mxhajqnvcchrp867-bzip2-1.0.6.0.1-bin/bin:/nix/store/jdwp5nclvvazsw6bmdacqgx87yyw2g0b-libpng-apng-1.6.37-dev/bin:/nix/store/j3iynil6msj8dw4bx9jmpfrd78scqcqk-fontconfig-2.12.6-bin/bin:/nix/store/zw05fsy0x24nwfs60nrql59srzqzh9x6-expat-2.2.8-dev/bin:/nix/store/5mj5kkymfnkfdw6956n8nwxbxharcv8d-glib-2.62.5-dev/bin:/nix/store/dsg776wmas4jvrclmv29dy96ylidq7wz-gettext-0.20.1/bin:/nix/store/lqbkc0f64scaf45qkhpi93p4v1ywif6x-glib-2.62.5-bin/bin:/nix/store/56rgn6k5vc151lhxwl8ghnbbk80yghj3-glib-2.62.5/bin:/nix/store/mlsb5k999p9lr9z0hbaw3lmaja5qvcvm-gstreamer-1.16.2-dev/bin:/nix/store/4vwgrzqpnycgxpbnzpr6rnmckpgh8k2m-gst-plugins-base-1.16.2/bin:/nix/store/2zsgfrkp0hn878rnrp0azpmy76ljm2b0-linux-pam-1.3.1/bin:/nix/store/0kxg5pmiv49j3y2hbz3n69pricgpcvf5-opencv-4.1.2/bin'${PATH:+':'}$PATH
              ^
SyntaxError: invalid syntax
2020-04-02 02:25:37,901 Error: failed to receive anything, not an xpra server?
2020-04-02 02:25:37,901   could also be the wrong protocol, username, password or port
2020-04-02 02:25:37,902   or the session was not found
2020-04-02 02:25:37,902 Connection lost

@offlinehacker
Copy link
Contributor Author

@mjlbach do you have xpra in path on remote machine? I never tried it over ssh, only using locally over socket.

@mjlbach
Copy link
Contributor

mjlbach commented Apr 3, 2020

Yes, it should be on the path of both, I can attach xpra from the client (my mac) to a remote ubuntu server, but not nix for some reason (see above error). Maybe should make a tracking issue for xpra problems...

@offlinehacker
Copy link
Contributor Author

Maybe issue would be good, so we someone can solve some other time when playing with xpra again.

@mjlbach mjlbach mentioned this pull request Apr 28, 2020
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Xpra 3.0.6 failing to start xdummy server
3 participants