Enable client app to run web browser
I installed Blender SFS to the main filesystem. Blender runs as user "blender", with home folder /home/blender.
I clicked the menu entry to view the Blender User Manual in the web browser, but nothing happened.
The problem is that Blender is running as user "blender", so cannot execute the default web browser, which is Chromium. Chromium is another client app, running as user "chromium" (with home folder /home/chromium).
The way for a non-root client app to run another non-root client app, is to bootstrap up to the root user, then run Chromium. Many apps, including Flatpaks and Appimages, use the 'xdg-open' utility to run the web browser. If you look at /usr/bin/xdg-open, which is a script, you will see that if it is called as a non-root user, it requests, via 'sudo-sh' to bump up to root. This is a little gui window that asks for the root password. More explanation of sudo-sh here:
https://bkhome.org/news/202306/light-weight-replacement-for-sudo.html
However, Blender does not call 'xdg-open'. Instead, it queries xdg-settings, like this:
# xdg-settings get default-web-browser
chromium.desktop
Blender will then try to run /usr/bin/chromium, which will fail. Only the root user can run /usr/bin/chromium, so that it can drop down to user "chromium" then run Chromium.
This is now fixed, see github commit:
https://github.com/bkauler/woofq/commit/8bff75c49d20559d1f80317a5ab78d733f57b967
This is good, as it will also fix many other non-root client apps
that try to launch the browser, or run any other client
app.
Tags: easy