run_scaled icon indicating copy to clipboard operation
run_scaled copied to clipboard

Program won't run Ubuntu 18.04

Open 13xps opened this issue 5 years ago • 9 comments

I get the following errors.

run_scaled opensnitch-ui Warning: cannot use the system proxy for 'start' 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/:73876243.log 2018-08-29 17:22:09,997 Xpra gtk2 client version 2.1.3-r17247M 64-bit 2018-08-29 17:22:09,997 running on Linux Ubuntu 18.04 bionic 2018-08-29 17:22:09,998 Warning: failed to import opencv: 2018-08-29 17:22:09,998 No module named cv2 2018-08-29 17:22:09,998 webcam forwarding is disabled 2018-08-29 17:22:10,686 GStreamer version 1.14.1 for Python 2.7.15 64-bit 2018-08-29 17:22:11,057 PyOpenGL warning: missing accelerate module 2018-08-29 17:22:11,074 OpenGL enabled with Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) 2018-08-29 17:22:11,090 keyboard settings: rules=evdev, model=pc105, layout=us,us 2018-08-29 17:22:11,091 desktop size is 3200x1800 with 1 screen: 2018-08-29 17:22:11,091 :0.0 (847x476 mm - DPI: 95x96) workarea: 3200x1704 2018-08-29 17:22:11,091 monitor 1 (294x165 mm - DPI: 276x277) 2018-08-29 17:22:11,091 upscaled by 200%, virtual screen size: 1600x900 2018-08-29 17:22:11,092 :0.0 (847x476 mm - DPI: 47x48) workarea: 1600x852 2018-08-29 17:22:11,092 monitor 1 (294x165 mm - DPI: 138x138) 2018-08-29 17:22:11,131 keyboard layouts: us,us,us 2018-08-29 17:22:11,165 enabled fast mmap transfers using 256MB shared memory area 2018-08-29 17:22:11,165 Xpra X11 server version 2.1.3-r17247 64-bit 2018-08-29 17:22:11,165 running on Linux Ubuntu 18.04 bionic 2018-08-29 17:22:11,165 enabled remote logging 2018-08-29 17:22:11,167 Attached to :73876243 (press Control-C to detach)

^C got signal SIGINT, exiting 2018-08-29 17:22:14,592 Error: printing disabled: 2018-08-29 17:22:14,593 No module named cups server requested disconnect: server shutdown xpra at :73876243 has exited.

13xps avatar Aug 29 '18 09:08 13xps

I successfully started moneyplex (a banking application, which until now has no own scaling option) with 18.04:

$ ./run_scaled ~/opt/moneyplex/moneyplex 
Warning: cannot use the system proxy for 'start' 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/:88371248.log
2018-09-06 09:01:32,199 Xpra gtk2 client version 2.1.3-r17247M 64-bit
2018-09-06 09:01:32,199  running on Linux Ubuntu 18.04 bionic
2018-09-06 09:01:32,200 Warning: failed to import opencv:
2018-09-06 09:01:32,200  No module named cv2
2018-09-06 09:01:32,201  webcam forwarding is disabled
Warning: failed to import GStreamer 1.x:
 Namespace Gst not available
2018-09-06 09:01:33,349 Error: failed to query sound subsystem:
2018-09-06 09:01:33,349  query did not return any data
2018-09-06 09:01:33,360 Warning: csc_swscale failed its self test
2018-09-06 09:01:33,360  No module named numpy
/usr/lib/python2.7/dist-packages/xpra/client/gl/gl_check.py:553: GtkWarning: Im Modulpfad »adwaita« konnte keine Themen-Engine gefunden werden,
  w = gtk.Window()
2018-09-06 09:01:34,069 PyOpenGL warning: missing accelerate module
2018-09-06 09:01:34,127 OpenGL enabled with Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2)
2018-09-06 09:01:34,162  keyboard settings: rules=evdev, model=pc105, layout=de
2018-09-06 09:01:34,164  desktop size is 3840x2160 with 1 screen:
2018-09-06 09:01:34,164   :0.0 (563x317 mm - DPI: 173x173) workarea: 3840x2088
2018-09-06 09:01:34,165     monitor 1 (345x194 mm - DPI: 282x282)
2018-09-06 09:01:34,165  upscaled by 200%, virtual screen size: 1920x1080
2018-09-06 09:01:34,166   :0.0 (563x317 mm - DPI: 86x86) workarea: 1920x1044
2018-09-06 09:01:34,166     monitor 1 (345x194 mm - DPI: 141x141)
2018-09-06 09:01:35,008 enabled fast mmap transfers using 256MB shared memory area
2018-09-06 09:01:35,009 Xpra X11 server version 2.1.3-r17247 64-bit
2018-09-06 09:01:35,009  running on Linux Ubuntu 18.04 bionic
2018-09-06 09:01:35,010 enabled remote logging
2018-09-06 09:01:35,015 Attached to :88371248 (press Control-C to detach)

2018-09-06 09:08:25,305 server requested disconnect: server shutdown
2018-09-06 09:08:25,310 Error: printing disabled:
2018-09-06 09:08:25,311  No module named cups

Your script is a life-saver for me ;)

Uatschitchun avatar Sep 06 '18 13:09 Uatschitchun

Sorry for the long hiatus; Does this issue persist? In case yes, please run the script via bash -x run_scaled opensnitch-ui and record the output.

kaueraal avatar Dec 09 '18 00:12 kaueraal

Running bash -x run_scaled ... for me helped identify the problem.

I discovered that the xpra was exiting. Looking at its log:

$ more /home/joant/.xpra/:24349340.log
2019-01-05 02:19:23,641 Error starting Xvfb:
2019-01-05 02:19:23,641  [Errno 2] No such file or directory

On my (Debian stretch) system, sudo apt install xvfb fixed everything.

wohali avatar Jan 05 '19 07:01 wohali

Hello, I am not able to get it to work on Ubuntu 18.04 as well. This is the error I get. As far as I know I have all required dependencies.

/usr/local/bin$ bash -x run_scaled --scale=2 Unity
+ SCALING_FACTOR=2
+ USE_OPENGL=auto
+ SLEEPTIME=1
+ PERFORMANCE_OPTIONS='--encoding=rgb --mmap=yes --compress=0'
+ '[' 2 = 0 ']'
+ true
+ '[' 2 -gt 0 ']'
+ case $1 in
+ SCALING_FACTOR=2
+ shift
+ true
+ '[' 1 -gt 0 ']'
+ case $1 in
+ break
+ declare -i UNSCALED_RESOLUTION_X
+ declare -i UNSCALED_RESOLUTION_Y
++ xrandr
++ sed -n -e 's/Screen 0:.*current \([0-9]\+\) x \([0-9]\+\).*/\1/p'
+ UNSCALED_RESOLUTION_X=2736
++ xrandr
++ sed -n -e 's/Screen 0:.*current \([0-9]\+\) x \([0-9]\+\).*/\2/p'
+ UNSCALED_RESOLUTION_Y=1824
++ bc
++ bc
+ UNSCALED_RESOLUTION=1368x912
++ shuf -i 10000-99999999 -n 1
+ DISPLAYNUM=:25450358
++ printf '%q ' Unity
+ ESCAPED_PARAMS='Unity '
+ xpra start :25450358 '--xvfb=Xvfb +extension Composite -screen 0 1368x912x24+32 -nolisten tcp -noreset  -auth $XAUTHORITY' --env=GDK_SCALE=1 --env=GDK_DPI_SCALE=1 '--start-child=Unity ' --exit-with-children
Warning: cannot use the system proxy for 'start' subcommand,
 failed to connect to '/run/xpra/system':
 [Errno 2] No such file or directory
+ sleep 1
Entering daemon mode; any further errors will be reported to:
  /run/user/1000/xpra/:25450358.log
+ xpra attach :25450358 --desktop-scaling=2 --opengl=auto --encoding=rgb --mmap=yes --compress=0
2019-01-05 18:23:44,903 Xpra gtk2 client version 2.1.3-r17247M 64-bit
2019-01-05 18:23:44,903  running on Linux Ubuntu 18.04 bionic
2019-01-05 18:23:44,904 Warning: failed to import opencv:
2019-01-05 18:23:44,904  No module named cv2
2019-01-05 18:23:44,905  webcam forwarding is disabled
2019-01-05 18:23:45,878 GStreamer version 1.14.1 for Python 2.7.15 64-bit
2019-01-05 18:23:45,887 Warning: csc_swscale failed its self test
2019-01-05 18:23:45,887  No module named numpy
2019-01-05 18:23:46,352 Warning: vendor 'Intel Open Source Technology Center' is greylisted,
2019-01-05 18:23:46,353  you may want to turn off OpenGL if you encounter bugs
2019-01-05 18:23:46,362 PyOpenGL warning: missing accelerate module
2019-01-05 18:23:46,392 OpenGL enabled with Mesa DRI Intel(R) HD Graphics 615 (Kaby Lake GT2)
2019-01-05 18:23:46,442 Error: printing disabled:
2019-01-05 18:23:46,442  No module named cups
InitException: cannot find any live servers to connect to
xpra initialization error:
 cannot find any live servers to connect to
+ xpra stop :25450358
InitException: cannot find any live servers to connect to
xpra initialization error:
 cannot find any live servers to connect to

tlf30 avatar Jan 06 '19 00:01 tlf30

@wohali Thank you! That helped me resolve a ton of dependencies that were missing. That said, it still does not open a window. Any idea why this is still failing?

radagan@Pheonix:~/WebCTRL7.0$ bash -x ./run_scaled --sleep=10 ./SiteBuilder
+ SCALING_FACTOR=2
+ USE_OPENGL=auto
+ SLEEPTIME=1
+ PERFORMANCE_OPTIONS='--encoding=rgb --mmap=yes --compress=0'
+ '[' 2 = 0 ']'
+ true
+ '[' 2 -gt 0 ']'
+ case $1 in
+ SLEEPTIME=10
+ shift
+ true
+ '[' 1 -gt 0 ']'
+ case $1 in
+ break
+ declare -i UNSCALED_RESOLUTION_X
+ declare -i UNSCALED_RESOLUTION_Y
++ xrandr
++ sed -n -e 's/Screen 0:.*current \([0-9]\+\) x \([0-9]\+\).*/\1/p'
+ UNSCALED_RESOLUTION_X=2880
++ xrandr
++ sed -n -e 's/Screen 0:.*current \([0-9]\+\) x \([0-9]\+\).*/\2/p'
+ UNSCALED_RESOLUTION_Y=1800
++ bc
++ bc
+ UNSCALED_RESOLUTION=1440x900
++ shuf -i 10000-99999999 -n 1
+ DISPLAYNUM=:14014639
++ printf '%q ' ./SiteBuilder
+ ESCAPED_PARAMS='./SiteBuilder '
+ xpra start :14014639 '--xvfb=Xvfb +extension Composite -screen 0 1440x900x24+32 -nolisten tcp -noreset  -auth $XAUTHORITY' --env=GDK_SCALE=1 --env=GDK_DPI_SCALE=1 '--start-child=./SiteBuilder ' --exit-with-children
Warning: cannot use the system proxy for 'start' subcommand,
 failed to connect to '/run/xpra/system':
 [Errno 2] No such file or directory
+ sleep 10
Entering daemon mode; any further errors will be reported to:
  /run/user/1000/xpra/:14014639.log
+ xpra attach :14014639 --desktop-scaling=2 --opengl=auto --encoding=rgb --mmap=yes --compress=0
2019-02-13 07:06:34,751 Xpra gtk2 client version 2.1.3-r17247M 64-bit
2019-02-13 07:06:34,752  running on Linux Ubuntu 18.04 bionic
2019-02-13 07:06:35,434 GStreamer version 1.14.1 for Python 2.7.15 64-bit
2019-02-13 07:06:35,838 OpenGL_accelerate module loaded
2019-02-13 07:06:35,854 OpenGL enabled with GeForce GT 750M/PCIe/SSE2
InitException: cannot find any live servers to connect to
xpra initialization error:
 cannot find any live servers to connect to
+ xpra stop :14014639
InitException: cannot find any live servers to connect to
xpra initialization error:
 cannot find any live servers to connect to

Radagan avatar Feb 12 '19 21:02 Radagan

I noticed the log file in the output, and using that I was able to resolve a few more dependencies. But is there a way to pass flags to xpra? Here is my current log:

2019-02-13 09:35:02,417 Warning: xpra start from an existing 'ubuntu' deskto
p session
2019-02-13 09:35:02,417  pulseaudio forwarding may not work
2019-02-13 09:35:02,417  try using a clean environment, a dedicated user,
2019-02-13 09:35:02,417  or disable xpra's "pulseaudio" option
2019-02-13 09:35:02,655 Warning: failed to set 'xpra' group ownership
2019-02-13 09:35:02,655  on socket '/run/user/1000/xpra/Pheonix-45105895':

2019-02-13 09:35:02,655  [Errno 1] Operation not permitted: '/run/user/1000/
xpra/Pheonix-45105895'
2019-02-13 09:35:02,656 created unix domain socket: /run/user/1000/xpra/Pheonix-
45105895
2019-02-13 09:35:02,656 Warning: failed to set 'xpra' group ownership
2019-02-13 09:35:02,656  on socket '/home/radagan/.xpra/Pheonix-45105895':

2019-02-13 09:35:02,656  [Errno 1] Operation not permitted: '/home/radagan/.
xpra/Pheonix-45105895'
2019-02-13 09:35:02,656 created unix domain socket: /home/radagan/.xpra/Pheonix-
45105895
2019-02-13 09:35:02,656 Warning: failed to set 'xpra' group ownership
2019-02-13 09:35:02,656  on socket '/run/xpra/Pheonix-45105895':
2019-02-13 09:35:02,656  [Errno 1] Operation not permitted: '/run/xpra/Pheon
ix-45105895'
2019-02-13 09:35:02,656 created unix domain socket: /run/xpra/Pheonix-45105895

2019-02-13 09:35:02,809 Warning: no X11 RandR support on :45105895
2019-02-13 09:35:03,607 Warning: webcam forwarding is disabled
2019-02-13 09:35:03,607  the virtual video directory '/sys/devices/virtual/v
ideo4linux' was not found
2019-02-13 09:35:03,608  make sure that the 'v4l2loopback' kernel module is 
installed and loaded
2019-02-13 09:35:03,608 found 0 virtual video devices for webcam forwarding
2019-02-13 09:35:03,614 pulseaudio server started with pid 7713
E: [pulseaudio] pid.c: Daemon already running.
2019-02-13 09:35:04,185 GStreamer version 1.14.1 for Python 2.7.15 64-bit
2019-02-13 09:35:04,197 Warning: cannot forward notifications, the interface
 is already claimed
2019-02-13 09:35:04,197  if you do not have a dedicated dbus session for thi
s xpra instance,
2019-02-13 09:35:04,197  use the 'notifications=no' option
2019-02-13 09:35:04,208 started command './SiteBuilder ' with pid 7751
2019-02-13 09:35:04,208 xpra X11 version 2.1.3-r17247M 64-bit
2019-02-13 09:35:04,208  uid=1000 (radagan), gid=1000 (radagan)
2019-02-13 09:35:04,208  running with pid 7623 on Linux Ubuntu 18.04 bionic
2019-02-13 09:35:04,209  connected to X11 display :45105895 with 24 bit colors

2019-02-13 09:35:04,229 xpra is ready.
2019-02-13 09:35:04,722 child './SiteBuilder ' with pid 7751 has terminated
2019-02-13 09:35:04,722 all children have exited and --exit-with-children was sp
ecified, exiting
2019-02-13 09:35:05,195 Warning: pulseaudio has terminated shortly after sta
rtup.
2019-02-13 09:35:05,195  pulseaudio is limited to a single instance per user
 account,
2019-02-13 09:35:05,195  and one may be running already for user 'radagan'

2019-02-13 09:35:05,195  to avoid this warning, either fix the pulseaudio co
mmand line
2019-02-13 09:35:05,195  or use the 'pulseaudio=no' option
2019-02-13 09:35:05,224 xpra is terminating.
2019-02-13 09:35:05,225 killing xvfb with pid 7626
2019-02-13 09:35:05,225 removing socket /run/user/1000/xpra/Pheonix-45105895
2019-02-13 09:35:05,225 removing socket /home/radagan/.xpra/Pheonix-45105895
2019-02-13 09:35:05,225 removing socket /run/xpra/Pheonix-45105895

Radagan avatar Feb 12 '19 23:02 Radagan

@tlf30 @Radagan @kaueraal By use apt install cups ,
I can use it on Debian 10 KDE.
Try it if No module named cups

mhtvsSFrpHdE avatar Oct 14 '19 03:10 mhtvsSFrpHdE

@mhtvsSFrpHdE I was able to get it working. I already had cups installed. It started working after a ubuntu update. Not sure what changed, but it is working great now.

EDIT: I have noticed that I cannot run WINE apps with it though.

tlf30 avatar Oct 28 '19 14:10 tlf30

xpra X11 version 2.1.3-r17247M 64-bit

The version of xpra in the Debian and Ubuntu repositories is generally buggy as hell, see downstream packages

This will cause all sorts of problems, warnings and dependency issues. For example:

Error starting Xvfb

xvfb should always be installed as a hard dependency.

No module named cups

Optional, only for printer forwarding.

Warning: failed to import opencv:

Optional, only for webcam forwarding.

EDIT: I have noticed that I cannot run WINE apps with it though.

Running wine apps works fine with all supported versions, though some apps may require opengl acceleration via virtualgl, see xpra opengl

totaam avatar Oct 30 '19 13:10 totaam

Xpra directly includes an equivalent tool since version 4.1. It is also called run_scaled and is part of the default Xpra installation.

Hence, this script here is deprecated and no longer maintained. I'm sorry that it took me quite long to officially announce it here. Thank you for your support and please continue your HiDPI journey with Xpra's tool!

kaueraal avatar Jul 22 '23 20:07 kaueraal