How (on earth) do I run Chromium as the nobody user? Selected failures (in Openbox):
su nobody chromium This account is currently not available
sudo -u nobody chromium [0316/203558.490760:FATAL:chrome_main_delegate.cc(442)] Check failed: process_type.empty(). Unable to get the user data directory for process type: zygote ...
sudo -u nobody chromium --user-data-dir=/root No protocol specified
[595:595:0316/203827.174040:ERROR:browser_main_loop.cc(279)] Gtk: cannot open display: :0
sudo -u nobody chromium --user-data-dir=/home No protocol specified
[615:615:0316/203909.792019:ERROR:browser_main_loop.cc(279)] Gtk: cannot open display: :0
My specs:
Linux arch 4.10.1-1-ARCH #1 SMP PREEMPT Sun Feb 26 21:08:53 UTC 2017 x86_64 GNU/Linux Chromium 57.0.2987.98
cat /etc/passwd: ... nobody:x:99:99:nobody:/:/usr/bin/nologin ... I prefer nobody because running Chromium as root is strongly discouraged and it seems to stupid to create a user just for running Chromium
UPDATE:
xhost local:root; su -pc 'env -i DISPLAY="${DISPLAY}" chromium' nobody run by root in an X session works (if you want to make local connections to X server as root, local:root is much safer than +). Still, there were two errors:
Home directory not accessible: Permission denied [629:629:0323/170000.968320:ERROR:child_thread_impl.cc(762)] Request for unknown Channel-associated interface: ui::mojom::GpuMain
Get rid of the first one w/
mkdir /home/nobody; chown -R nobody:nobody /home/nobody; su -pc 'env -i DISPLAY="${DISPLAY}" HOME=/home/nobody chromium' nobody