Open ptgolden opened 1 year ago
This code in .init.lua
fails with the same message:
unix = require 'unix'
unix.execve('/snap/bin/firefox', {'/snap/bin/firefox', '--version'}, {})
unix.exit(1)
$ ./redbean.com
need to run as root or suid
However, calling a non-snap version of Firefox works fine:
unix = require 'unix'
unix.execve('/home/ptgolden/Code/tools/firefox/firefox', {'/home/ptgolden/Code/tools/firefox/firefox', '--version'}, {})
unix.exit(1)
$ ./redbean.com
Mozilla Firefox 97.0.1
This is certainly an issue with snaps, not with redbean. Unfortunately, the default method of installing Firefox and Chromium on Ubuntu is now snaps.
I am trying to open a Web browser upon launching redbean with the command
LaunchBrowser("/")
. The server starts up fine, but the browser fails to open with the error messageneed to run as root or suid
.This is Ubuntu 22.04. My default browser is Firefox Beta installed via snap. Below is the output of
./redbean.com -vvv
It may be worth noting that running the command
"/usr/bin/xdg-open" http://127.0.0.1:8080/
does work if I run it in my shell.