Root and Wayland

Miika Turkia miika.turkia at gmail.com
Tue Oct 31 03:56:05 PDT 2017


On Tue, Oct 31, 2017 at 12:31 PM, Martin Měřinský <mermar at centrum.cz> wrote:
> Hello.
> These days more and more distributions are using Wayland. Last Ubuntu
> e.g. AFAIK Wayland design feature is that UI applications are not
> allowed to run as root.
>
> From Subsurface manual: "If you are not root, you may not be a member
> of that group and won’t be able to use the USB port." Well, if you are
> root, you cannot run Subsurface under Wayland at all(?) Fortunately
> it's not necessary, but output doesn't look good.

We do not recommend running Subsurface as root and try to get users to
configure their system so that root is not needed (i.e. adding
themselves to the dialout group). That is the whole purpose of the
specific chapter in user manual. But this sentence should be reworded
to make it clear that user should set the groups properly and not run
Subsurface as root.

> I would humbly suggest to detect Wayland and root privileges, show
> better command line message and quit.
> Or fix it somehow like GParted 0.30.0 did?
> Maybe we should mention it in the manual.

There should not be any reason to run Subsurface as root, no matter
whether Wayland or not. So any attempt to run with root privileges
should result in an error message. But in Wayland's case it might be
better not to mention the allow_run_as_root option at all (or tell the
xhost cmdline).

> Also --allow_run_as_root option is not mentioned in subsurface --help
> output nor in the manual.

I am not sure if this should be documented or not. Running software as
root is generally a bad idea, so documenting how to do that sounds a
bit contradictory to me.

miika


More information about the subsurface mailing list