Brave autorun not working - .brave-wrapped: line 46: exec: cat: not found

I’m using awesome with NixOS 23.05. I have brave in a firejail wrapper like this:

  security.chromiumSuidSandbox.enable = true;
  programs.firejail.wrappedBinaries = {
    brave = {
      executable = "${pkgs.lib.getBin pkgs.brave}/bin/brave";
      profile = pkgs.writeText "brave.local" ''
        noblacklist ''${DOWNLOADS}
        whitelist ''${DOWNLOADS}
        include brave.profile
      '';
    };
};

My other firejail programs like librewolf and telegram-desktop work fine as autorun programs e.g. with awful.spawn("telegram-desktop") but brave doesn’t launch and posts to the system log

If i run brave in the terminal it launches without error though.

How can i solve this problem?

@uskudnik @rht @JeffLabonte Could you please take a look at this?

I have a similar issue with brave - same error but when using xdg-open with portal.

I rplaced the brave package with this:

pkgs-unstable.brave.overrideAttrs (oldAttrs: {
  buildInputs = oldAttrs.buildInputs or [] ++ [ pkgs.makeWrapper ];
  postInstall = oldAttrs.postInstall or "" + ''
    wrapProgram $out/bin/brave \
      --suffix-each PATH : ${pkgs.lib.makeBinPath [
      pkgs.coreutils
    ]}
  '';
});
1 Like

Thank you for your help!

Hello, brave is missing coreutils from https://github.com/NixOS/nixpkgs/blob/d0efa70d8114756ca5aeb875b7f3cf6d61543d62/pkgs/applications/networking/browsers/brave/default.nix#L174 Could one of you make a PR and ping me in it.

Please include launch script uses coreutils tools in the commit msg

done: brave: launch script uses coreutils tools by scm2342 · Pull Request #258463 · NixOS/nixpkgs · GitHub

2 Likes