Brave browser doesn't launch on Kali Linux "cannot open display"

Hi everyone!

After a trial and error process I thought I had successfully installed brave on my Kali vm, but I am now encountering a problem that seems to be more common for Debian users, namely that the browser won’t open. When I click the launch icon, my cursor will show it’s processing for a few seconds, but then goes back to normal. Nothing else happens. If I try launching it from the terminal, I get this error message: (brave-browser:5728): Gtk-WARNING **: 12:05:15.154: cannot open display:

I followed the following steps to install:

In addition, I enabled user namespaces using: sudo sysctl kernel.unprivileged_userns_clone=1
I also switched to a regular user (not root, which is standard on kali) to avoid the --no-sandbox issue (at least I think that’s what it did).

I have already tried removing brave, purging it, cleaning the apt and reinstalling, but to no avail.

While browsing for a fix, I noticed that other Debian users have had similar issues but unfortunately I haven’t been able to find a solution that works for me.

Does anyone know what the issue may be?
Pls let me know if you need more info, I’m quite new to Linux so I don’t know how to provide a more detailed error report atm.

Thanks in advance!

It should work fine. As you can see I just enabled namespaces with the command

echo 'kernel.unprivileged_userns_clone=1' > /etc/sysctl.d/00-local-userns.conf
service procps restart

Also I think Kali Linux is on Disco release so I would suggest to update the source list file and you should be good to go

Currently typing this using Brave on Kali. Apparently my issue had to do with user xhost permissions. If I switch to a regular user using the --login flag, brave will not start. However, if I switch from root to a regular user without that flag, brave works just fine. See images below:

I’ll try to see if I can get it to work in both cases, but for now the issue is solved. Thanks for the help!

This topic was automatically closed after 30 days. New replies are no longer allowed.