Brave is a free and open-source web browser developed by Brave Software, Inc. based on the Chromium web browser. Brave is a privacy-focused browser, which automatically blocks some advertisements and website trackers in its default settings. Users can turn on optional ads that reward them for their attention in the form of Basic Attention Tokens (BAT), which can be used as a cryptocurrency or to make payments to registered websites and content creators.
wikipedia.org/wiki/Brave_(web_browser)
Attention: The following scripts assume that you have already configured AppJail to run with trusted users. If you have not already done so, read Trusted Users. You should at least have keepenv
in your doas.conf(5)
to run the following scripts correctly.
appjail makejail -j brave -f gh+AppJail-makejails/brave \
-o x11 \
-o template=/usr/local/share/examples/appjail/templates/linux.conf \
-o alias \
-o virtualnet=":appjail0 default" \
-o nat
Tip: Read Alias & Virtual Networks to see how to create the appjail0
interface.
You can run Brave using brave-appjail
which is already installed.
brave-appjail
The other way is to run Brave from the application launcher.
Read #notes to get more information about this Makejail.
brave_tag
(default: latest
): see #tags.brave_display
(default: :0
): Which X server to connect it to. It can be changed at run time through the DISPLAY
environment variable, but must be set each time brave-appjail
is run.brave_enable_3d
(default: 1
): Add the brave
user to the video
group and enable the following devices: dri
, dri/*
, drm
, drm/*
, pci
.brave_enable_webcamd
(default: 1
): Create a group named webcamd
(GID: 145
) and add the brave
user to it. This option also enable the following devices: usb
, usb/*
, cuse*
, video*
.brave_tz
(default: auto
): Default time zone used by Brave. You can change this at run time through the TZ
environment variable, but must be set each time brave-appjail
is run. If set to auto
the time zone is obtained using /var/db/zoneinfo
.Tag | Arch | Version |
---|---|---|
latest |
amd64 |
jammy |
audio/pulseaudio
will be installed on the host.brave-appjail
to create a UNIX socket (${HOME}/.brave-pulse/pulse-native
).multimedia/webcamd
installed on the host.brave-appjail
, brave-appjail.desktop
and Brave's icons.sudo(8)
is used in the jail to execute commands as the brave
user. Note that sudo(8)
relies on the hostname, so any change must be reflected in the /etc/hosts
of the jail. This Makejail already correctly sets a hostname.Attention: At least in FreeBSD 14.0 the audio works fine.
Audio and microphone do not work:
The following error appears every time we try to play audio or use the microphone:
*** stack smashing detected ***: terminated
[1101/112318.703716:ERROR:ptracer.cc(43)] ptrace: Invalid argument (22)
[1101/112318.703893:WARNING:process_reader_linux.cc(400)] Couldn't initialize main thread.
[1101/112318.704123:ERROR:proc_task_reader.cc(46)] format error
[1101/112318.704247:WARNING:exception_snapshot_linux.cc(391)] thread ID 101288 not found in process
[1101/112318.704503:ERROR:process_snapshot_linux.cc(129)] thread not found 101288
[1101/112318.705686:ERROR:proc_task_reader.cc(46)] format error