On Fri, Apr 05, 2019 at 10:10:52AM -0400, Bruno Dantas wrote:
There are a handful of GUI applications (file manager, text editor,
terminal emulator) that I go back and forth between running as regular
user and running with doas root.

[…]

Running GUI applications as root is a bad idea in general.  OpenBSD is
an OS that emphasizes privilege separation for programs that actually
need root access.  I think its users should also try to minimize the
amount of code they run with administrative privileges.

Particularly, why would you want to run a terminal emulator as root?
Just launch it without admin privileges and use doas in the shell.
This way the terminal and the shell run with your user's privileges.

Also, if you need to edit files in /etc, do it with a minimal editor
from the base system, like vi, not with a full-blown GUI application.
I personally prefer neovim for editing my files, but I trust vi more
when I edit system files.

As for file management, there shouldn't be a need to manage files
outside your home.  Just mount (with doas) your USB stick to a sub-dir
in your home, and your user should be granted access to its files.  If
there is need to move around system files, say in /etc, use doas with
the CLI tools from base: cp, mv, rm etc.  This is the Unix way.

I realize right-clicking a program and choosing "Run as admin" might
be second nature to Windows users, but it's a nasty habit.

Reply via email to