jlesage / docker-firefox

Docker container for Firefox
MIT License
1.61k stars 287 forks source link

audio on the host instead of the client #10

Open janh-pdx opened 5 years ago

janh-pdx commented 5 years ago

Hi Thank you for your hard work in creating this docker. I have been trying to use the your docker to open up a remote firefox session in my home network, but have been running into an issue where sound is not coming across to the remote machine even though sound is enabled on the host computer. On the remote computer I will connect to the host in a browser using the URL http://192.168.1.222:5800. The inner firefox browser will come up. In the inner firefox browser I then will type the URL youtube.com. I will then select a link on youtube to play a video. The video plays correctly, however the audio plays on my host computer instead of the remote computer. Is there anything missing from my configuration? Here is my configuration

Host computer linux laptop with the latest updates to ubuntu 18.04, docker, pulseaudio, paprefs, pavucontrol installed IP address: 192.168.1.222 docker run command: docker run -p 5800:5800 --shm-size 2g --device /dev/snd -v /tmp/.X11-unix:/tmp/.X11-unix jlesage/firefox

Remote computer Macbook pro with macos mojave safari url to invoke the remote container: http://192.168.1.222:5800

docker output on the host [s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 00-app-niceness.sh: executing... [cont-init.d] 00-app-niceness.sh: exited 0. [cont-init.d] 00-app-script.sh: executing... [cont-init.d] 00-app-script.sh: exited 0. [cont-init.d] 00-app-user-map.sh: executing... [cont-init.d] 00-app-user-map.sh: exited 0. [cont-init.d] 00-clean-logmonitor-states.sh: executing... [cont-init.d] 00-clean-logmonitor-states.sh: exited 0. [cont-init.d] 00-clean-tmp-dir.sh: executing... [cont-init.d] 00-clean-tmp-dir.sh: exited 0. [cont-init.d] 00-set-app-deps.sh: executing... [cont-init.d] 00-set-app-deps.sh: exited 0. [cont-init.d] 00-set-home.sh: executing... [cont-init.d] 00-set-home.sh: exited 0. [cont-init.d] 00-take-config-ownership.sh: executing... [cont-init.d] 00-take-config-ownership.sh: exited 0. [cont-init.d] 00-xdg-runtime-dir.sh: executing... [cont-init.d] 00-xdg-runtime-dir.sh: exited 0. [cont-init.d] 10-certs.sh: executing... [cont-init.d] 10-certs.sh: exited 0. [cont-init.d] 10-cjk-font.sh: executing... [cont-init.d] 10-cjk-font.sh: exited 0. [cont-init.d] 10-nginx.sh: executing... [cont-init.d] 10-nginx.sh: exited 0. [cont-init.d] 10-vnc-password.sh: executing... [cont-init.d] 10-vnc-password.sh: exited 0. [cont-init.d] 10-web-index.sh: executing... [cont-init.d] 10-web-index.sh: exited 0. [cont-init.d] check-snd.sh: executing... [cont-init.d] check-snd.sh: sound device group 29. [cont-init.d] check-snd.sh: exited 0. [cont-init.d] firefox.sh: executing... [cont-init.d] firefox.sh: generating machine-id... [cont-init.d] firefox.sh: exited 0. [cont-init.d] done. [services.d] starting services [services.d] starting s6-fdholderd... [services.d] starting nginx... [services.d] starting certsmonitor... [nginx] starting... [services.d] starting xvfb... [xvfb] starting... [certsmonitor] disabling service: secure connection not enabled. [services.d] starting statusmonitor... [services.d] starting openbox... [statusmonitor] starting... [openbox] starting... [services.d] starting logmonitor... [services.d] starting x11vnc... [logmonitor] starting... [services.d] starting app... [x11vnc] starting... 09/12/2018 19:31:01 passing arg to libvncserver: -rfbport 09/12/2018 19:31:01 passing arg to libvncserver: 5900 09/12/2018 19:31:01 passing arg to libvncserver: -rfbportv6 09/12/2018 19:31:01 passing arg to libvncserver: -1 09/12/2018 19:31:01 passing arg to libvncserver: -httpportv6 09/12/2018 19:31:01 passing arg to libvncserver: -1 09/12/2018 19:31:01 passing arg to libvncserver: -desktop 09/12/2018 19:31:01 passing arg to libvncserver: Firefox 09/12/2018 19:31:01 x11vnc version: 0.9.14 lastmod: 2015-11-14 pid: 889 09/12/2018 19:31:01 Using X display :0 09/12/2018 19:31:01 rootwin: 0x43 reswin: 0x400001 dpy: 0xa4f49a00 09/12/2018 19:31:01 09/12/2018 19:31:01 ------------------ USEFUL INFORMATION ------------------ [app] starting Firefox... [services.d] done. 09/12/2018 19:31:01 X DAMAGE available on display, using it for polling hints. 09/12/2018 19:31:01 To disable this behavior use: '-noxdamage' 09/12/2018 19:31:01 09/12/2018 19:31:01 Most compositing window managers like 'compiz' or 'beryl' 09/12/2018 19:31:01 cause X DAMAGE to fail, and so you may not see any screen 09/12/2018 19:31:01 updates via VNC. Either disable 'compiz' (recommended) or 09/12/2018 19:31:01 supply the x11vnc '-noxdamage' command line option. 09/12/2018 19:31:01 X COMPOSITE available on display, using it for window polling. 09/12/2018 19:31:01 To disable this behavior use: '-noxcomposite' 09/12/2018 19:31:01 09/12/2018 19:31:01 Wireframing: -wireframe mode is in effect for window moves. 09/12/2018 19:31:01 If this yields undesired behavior (poor response, painting 09/12/2018 19:31:01 errors, etc) it may be disabled: 09/12/2018 19:31:01 - use '-nowf' to disable wireframing completely. 09/12/2018 19:31:01 - use '-nowcr' to disable the Copy Rectangle after the 09/12/2018 19:31:01 moved window is released in the new position. 09/12/2018 19:31:01 Also see the -help entry for tuning parameters. 09/12/2018 19:31:01 You can press 3 Alt_L's (Left "Alt" key) in a row to 09/12/2018 19:31:01 repaint the screen, also see the -fixscreen option for 09/12/2018 19:31:01 periodic repaints. 09/12/2018 19:31:01 GrabServer control via XTEST. 09/12/2018 19:31:01 09/12/2018 19:31:01 Scroll Detection: -scrollcopyrect mode is in effect to 09/12/2018 19:31:01 use RECORD extension to try to detect scrolling windows 09/12/2018 19:31:01 (induced by either user keystroke or mouse input). 09/12/2018 19:31:01 If this yields undesired behavior (poor response, painting 09/12/2018 19:31:01 errors, etc) it may be disabled via: '-noscr' 09/12/2018 19:31:01 Also see the -help entry for tuning parameters. 09/12/2018 19:31:01 You can press 3 Alt_L's (Left "Alt" key) in a row to 09/12/2018 19:31:01 repaint the screen, also see the -fixscreen option for 09/12/2018 19:31:01 periodic repaints. 09/12/2018 19:31:01 09/12/2018 19:31:01 XKEYBOARD: number of keysyms per keycode 7 is greater 09/12/2018 19:31:01 than 4 and 51 keysyms are mapped above 4. 09/12/2018 19:31:01 Automatically switching to -xkb mode. 09/12/2018 19:31:01 If this makes the key mapping worse you can 09/12/2018 19:31:01 disable it with the "-noxkb" option. 09/12/2018 19:31:01 Also, remember "-remap DEAD" for accenting characters. 09/12/2018 19:31:01 09/12/2018 19:31:01 X FBPM extension not supported. 09/12/2018 19:31:01 X display is not capable of DPMS. 09/12/2018 19:31:01 -------------------------------------------------------- 09/12/2018 19:31:01 09/12/2018 19:31:01 Default visual ID: 0x21 09/12/2018 19:31:01 Read initial data from X display into framebuffer. 09/12/2018 19:31:01 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5120 09/12/2018 19:31:01 09/12/2018 19:31:01 X display :0 is 32bpp depth=24 true color 9/12/2018 19:31:01 09/12/2018 19:31:01 Listening for VNC connections on TCP port 5900 09/12/2018 19:31:01 09/12/2018 19:31:01 Xinerama is present and active (e.g. multi-head). 09/12/2018 19:31:01 Xinerama: number of sub-screens: 1 09/12/2018 19:31:01 Xinerama: no blackouts needed (only one sub-screen) 09/12/2018 19:31:01 09/12/2018 19:31:01 fb read rate: 1438 MB/sec 09/12/2018 19:31:01 fast read: reset -wait ms to: 10 09/12/2018 19:31:01 fast read: reset -defer ms to: 10 09/12/2018 19:31:01 The X server says there are 10 mouse buttons. 09/12/2018 19:31:01 screen setup finished. 09/12/2018 19:31:01

The VNC desktop is: e726fed66d86:0 PORT=5900

09/12/2018 19:31:46 Got connection from client 127.0.0.1 09/12/2018 19:31:46 other clients: 09/12/2018 19:31:46 Got 'ws' WebSockets handshake 09/12/2018 19:31:46 Got protocol: binary 09/12/2018 19:31:46 - webSocketsHandshake: using binary/raw encoding 09/12/2018 19:31:46 - WebSockets client version hybi-13 09/12/2018 19:31:46 Disabled X server key autorepeat. 09/12/2018 19:31:46 to force back on run: 'xset r on' (3 times) 09/12/2018 19:31:46 incr accepted_client=1 for 127.0.0.1:49258 sock=10 09/12/2018 19:31:47 created xdamage object: 0x40002c 09/12/2018 19:31:47 Client Protocol Version 3.8 09/12/2018 19:31:47 Protocol version sent 3.8, using 3.8 09/12/2018 19:31:47 rfbProcessClientSecurityType: executing handler for type 1 09/12/2018 19:31:47 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 3.8 09/12/2018 19:31:47 client_set_net: 127.0.0.1 0.0001 09/12/2018 19:31:47 Pixel format for client 127.0.0.1: 09/12/2018 19:31:47 32 bpp, depth 24, little endian 09/12/2018 19:31:47 true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0 09/12/2018 19:31:47 no translation needed 09/12/2018 19:31:47 Enabling NewFBSize protocol extension for client 127.0.0.1 09/12/2018 19:31:47 Enabling full-color cursor updates for client 127.0.0.1 09/12/2018 19:31:47 Using image quality level 6 for client 127.0.0.1 09/12/2018 19:31:47 Using JPEG subsampling 0, Q79 for client 127.0.0.1 09/12/2018 19:31:47 Using compression level 9 for client 127.0.0.1 09/12/2018 19:31:47 Enabling LastRect protocol extension for client 127.0.0.1 09/12/2018 19:31:47 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFECC) 09/12/2018 19:31:47 Using tight encoding for client 127.0.0.1 09/12/2018 19:31:52 client 1 network rate 16.1 KB/sec (1378.7 eff KB/sec) 09/12/2018 19:31:52 client 1 latency: 41.7 ms 09/12/2018 19:31:52 dt1: 0.0190, dt2: 2.8554 dt3: 0.0417 bytes: 45930 09/12/2018 19:31:52 link_rate: LR_DIALUP - 41 ms, 16 KB/s 09/12/2018 19:31:53 copy_tiles: allocating first_line at size 41 09/12/2018 19:31:56 created selwin: 0x40002d 09/12/2018 19:31:56 called initialize_xfixes() 09/12/2018 19:34:49 increased wireframe timeouts for slow network connection. 09/12/2018 19:34:49 netrate: 16 KB/sec, latency: 41 ms 09/12/2018 19:38:18 client_count: 0 09/12/2018 19:38:18 Restored X server key autorepeat to: 1 09/12/2018 19:38:18 Client 127.0.0.1 gone 09/12/2018 19:38:18 Statistics events Transmit/ RawEquiv ( saved) 09/12/2018 19:38:18 ServerCutText : 2 | 70/ 70 ( 0.0%) 09/12/2018 19:38:18 FramebufferUpdate : 606 | 0/ 0 ( 0.0%) 09/12/2018 19:38:18 LastRect : 92 | 1104/ 1104 ( 0.0%) 09/12/2018 19:38:18 tight : 2006 | 1105848/ 46409736 ( 97.6%) 09/12/2018 19:38:18 RichCursor : 1 | 1374/ 1374 ( 0.0%) 09/12/2018 19:38:18 TOTALS : 2707 | 1108396/ 46412284 ( 97.6%) 09/12/2018 19:38:18 Statistics events Received/ RawEquiv ( saved) 09/12/2018 19:38:18 KeyEvent : 58 | 464/ 464 ( 0.0%) 09/12/2018 19:38:18 PointerEvent : 2164 | 12984/ 12984 ( 0.0%) 09/12/2018 19:38:18 FramebufferUpdate : 606 | 6060/ 6060 ( 0.0%) 09/12/2018 19:38:18 SetEncodings : 1 | 56/ 56 ( 0.0%) 09/12/2018 19:38:18 SetPixelFormat : 1 | 20/ 20 ( 0.0%) 09/12/2018 19:38:18 TOTALS : 2830 | 19584/ 19584 ( 0.0%) 09/12/2018 19:38:18 destroyed xdamage object: 0x40002c 09/12/2018 19:41:56 Got connection from client 127.0.0.1 09/12/2018 19:41:56 other clients: 09/12/2018 19:41:56 Got 'ws' WebSockets handshake 09/12/2018 19:41:56 Got protocol: binary 09/12/2018 19:41:56 - webSocketsHandshake: using binary/raw encoding 09/12/2018 19:41:56 - WebSockets client version hybi-13 09/12/2018 19:41:56 Disabled X server key autorepeat. 09/12/2018 19:41:56 to force back on run: 'xset r on' (3 times) 09/12/2018 19:41:56 incr accepted_client=2 for 127.0.0.1:49468 sock=10 09/12/2018 19:41:57 created xdamage object: 0x40002e 09/12/2018 19:41:58 Client Protocol Version 3.8 09/12/2018 19:42:01 Pixel format for client 127.0.0.1: 09/12/2018 19:42:01 32 bpp, depth 24, little endian 09/12/2018 19:42:01 true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0 09/12/2018 19:42:01 no translation needed 09/12/2018 19:42:01 Enabling NewFBSize protocol extension for client 127.0.0.1 09/12/2018 19:42:01 Enabling full-color cursor updates for client 127.0.0.1 09/12/2018 19:42:01 Using image quality level 6 for client 127.0.0.1 09/12/2018 19:42:01 Using JPEG subsampling 0, Q79 for client 127.0.0.1 09/12/2018 19:42:01 Using compression level 9 for client 127.0.0.1 09/12/2018 19:42:01 Enabling LastRect protocol extension for client 127.0.0.1 09/12/2018 19:42:01 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFECC) 09/12/2018 19:42:01 Using tight encoding for client 127.0.0.1 09/12/2018 19:42:01 client_set_net: 127.0.0.1 0.0001 09/12/2018 19:42:36 got closure, reason 1001 09/12/2018 19:42:36 rfbProcessClientNormalMessage: read: Connection reset by peer 09/12/2018 19:42:36 client_count: 0 09/12/2018 19:42:36 Restored X server key autorepeat to: 1 09/12/2018 19:42:36 Client 127.0.0.1 gone 09/12/2018 19:42:36 Statistics events Transmit/ RawEquiv ( saved) 09/12/2018 19:42:36 FramebufferUpdate : 32 | 0/ 0 ( 0.0%) 09/12/2018 19:42:36 LastRect : 2 | 24/ 24 ( 0.0%) 09/12/2018 19:42:36 tight : 60 | 11283/ 4089936 ( 99.7%) 09/12/2018 19:42:36 RichCursor : 1 | 1374/ 1374 ( 0.0%) 09/12/2018 19:42:36 TOTALS : 95 | 12681/ 4091334 ( 99.7%) 09/12/2018 19:42:36 Statistics events Received/ RawEquiv ( saved) 09/12/2018 19:42:36 PointerEvent : 112 | 672/ 672 ( 0.0%) 09/12/2018 19:42:36 FramebufferUpdate : 32 | 320/ 320 ( 0.0%) 09/12/2018 19:42:36 SetEncodings : 1 | 56/ 56 ( 0.0%) 09/12/2018 19:42:36 SetPixelFormat : 1 | 20/ 20 ( 0.0%) 09/12/2018 19:42:36 TOTALS : 146 | 1068/ 1068 ( 0.0%) 09/12/2018 19:42:36 destroyed xdamage object: 0x40002e 09/12/2018 19:42:36 Got connection from client 127.0.0.1 09/12/2018 19:42:36 other clients: 09/12/2018 19:42:36 Got 'ws' WebSockets handshake 09/12/2018 19:42:36 Got protocol: binary 09/12/2018 19:42:36 - webSocketsHandshake: using binary/raw encoding 09/12/2018 19:42:36 - WebSockets client version hybi-13 09/12/2018 19:42:36 Disabled X server key autorepeat. 09/12/2018 19:42:36 to force back on run: 'xset r on' (3 times) 09/12/2018 19:42:36 incr accepted_client=3 for 127.0.0.1:49474 sock=10 09/12/2018 19:42:36 Client Protocol Version 3.8 09/12/2018 19:42:36 Protocol version sent 3.8, using 3.8 09/12/2018 19:42:36 rfbProcessClientSecurityType: executing handler for type 1 09/12/2018 19:42:36 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 3.8

jlesage commented 5 years ago

Having the sound on the host is the expected behavior. The VNC protocol is used to get the access to the application's UI via a web browser and VNC doesn't support transporting the sound.