Fix for Vivaldi 2.9 no media support in firejail [solved]



  • When 2.9.1705.31 is run in firejail, as I do by default, proprietary media support is absent.

    $> sudo ./update-ffmpeg
    Proprietary media codecs (77.0.3865.90) was already present
    $> sudo ./update-widevine
    Widevine (4.10.1440.18) is already installed and does not need to be updated
    $> firejail vivaldi
    ...
    'Proprietary media' support is not installed. Fix this by running:
        /opt/vivaldi/update-ffmpeg
    The Widevine CDM is not installed. Fix this by running:
        /opt/vivaldi/update-widevine
    /usr/bin/vivaldi: line 60: /dev/fd/62: No such file or directory
    /usr/bin/vivaldi: line 61: /dev/fd/62: No such file or directory
    [8:8:1101/111404.827255:ERROR:chrome_content_client.cc(343)] Failed to locate and load the component updated flash plugin.
    ...
    [browser finishes loading and runs normally but w/o media support] 
    

    Media support is present when run without firejail. Media worked with 2.8 running in firejail.

    Suggestions will be appreciated.

    Vivaldi 2.9.1705.31
    MX-Linux 18.3
    firejail 0.9.60

    P.S. Back in March, Steffie wrote
    In my experience since i discovered FJ a few years ago, most of the time it works swimmingly, but every now & then... especially with a rapidly-changing target like browsers generally & V specifically... what worked fine "last week" might abruptly stop working with "this week's" new version of the target app.


  • Moderator

    Thank you for reaching and sorry for the trouble.

    May be this issue is a bug.

    Please read

    carefully and report the bug to Vivaldi bugtracker.

    Again thank you for using Vivaldi.



  • Thanks for the reply, Gwen-Dragon. It seems to me that this is a problem of firejail, not Vivaldi, and I was hoping another firejail user (Steffie) had found a solution. Nevertheless, I'll file a bug report as you suggest.

    EDIT: I have filed a bug with firejail, will report any progress.



  • So the best way to fix Vivaldi in firejail is to not use the default profile. I found it breaks more than media playback. I made a local profile and script here -> /usr/local/bin/vivaldi (for XUbuntu 18.04) so everything runs it both firejailed, without default profile and with my local profile.

    It looks similar to the default but skips some things (due to custom cache locations for myself) but tweak, play and see what works for you.
    Add the below to /etc/firejail/vivaldi.local. You can make a second one for vivaldi-stable but that should just be a redirect back to vivaldi. A last note is altering this stuff may not give you the full protection you'd expect. I mean maybe the firejail authors are blocking the vivaldi built ffmpg for a reason. You could try to link your system to vivaldi (I know it will look for it in your ~/.cache/vivaldi dir) Either way there are two include that break vivaldi with firejail /etc/firejail/disable-common.inc & /etc/firejail/disable-programs.inc

    #put in /etc/firejail/vivaldi.local /etc/firejail/vivaldi-stable.local
    #script /usr/local/bin/vivaldi contents: #!/bin/bash firejail --profile=/etc/firejail/vivaldi.local /usr/bin/vivaldi

    include /etc/firejail/globals.local
    include /etc/firejail/disable-devel.inc
    include /etc/firejail/whitelist-common.inc
    include /etc/firejail/whitelist-var-common.inc
    noblacklist ${HOME}/.cache/vivaldi
    noblacklist ${HOME}/.config/vivaldi
    whitelist /var/opt/vivaldi
    whitelist ${DOWNLOADS}
    whitelist ${HOME}/.cache/vivaldi
    whitelist ${HOME}/.config/vivaldi
    caps.keep sys_chroot,sys_admin
    netfilter
    nodvd
    nogroups
    notv
    shell none
    disable-mnt
    private-dev
    noexec ${HOME}
    noexec /tmp


  • Moderator

    @wognath I hope nPHYN1T3's solution can help you.



  • rusty-snake at firejail bug forum has modified the vivaldi.profile for firejail, and html5 and widevine both work using it. He gives a diff printout. Below is the result.
    Thank you ruario and nPHYN1T3 for the suggestions also.
    By the way, the page https://help.vivaldi.com/article/html5-proprietary-media-on-linux/ seems to have disappeared.

    # Firejail profile for vivaldi 
    # This file is overwritten after every install/update
    # Persistent local customizations
    include vivaldi.local
    # Persistent global definitions
    include globals.local
    
    ignore apparmor
    ignore noexec /var
    
    noblacklist ${HOME}/.cache/vivaldi
    noblacklist ${HOME}/.config/vivaldi
    noblacklist ${HOME}/.local/lib/vivaldi
    noblacklist /var/opt
    
    mkdir ${HOME}/.cache/vivaldi
    mkdir ${HOME}/.config/vivaldi
    mkdir ${HOME}/.local/lib/vivaldi
    whitelist ${HOME}/.cache/vivaldi
    whitelist ${HOME}/.config/vivaldi
    whitelist ${HOME}/.local/lib/vivaldi
    whitelist /var/opt/vivaldi
    
    # nodbus breaks vivaldi sync
    # ignore nodbus
    writable-var
    
    # Redirect
    include chromium-common.profile
    
    

  • Moderator

    @wognath Thanks a lot for the link to firejail issue report! 🙂

    🐧 And our Linux users can be happy now running Vivaldi in a firejail 👍


Log in to reply
 

Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.