octopi icon indicating copy to clipboard operation
octopi copied to clipboard

Option to run octopi-sudo as another user

Open eandersons opened this issue 7 months ago • 0 comments

Would it be possible to add a (possibly collapsible) field to octopi-sudo dialog to specify other user to run as when needed?

Ideally this could be configurable in Octopi options to always execute octopi-sudo as the specified user that could optionally be changed also in octopi-sudo dialog.

Background

I am using accounts with user that does not have any privileges. For administrative tasks a dedicated user is used that I switch to in terminal when needed. Because of this setup I cannot use Octopi with my everyday accounts.

There are a few workarounds that come to my mind:

  • kdesu - use a custom desktop entry with /usr/bin/kdesu -u <admin user> -c /usr/bin/octopi as Exec value; when it works, this works quite neatly, and the only downside is that the update window from the Octopi update notification is run with non-privileged user, and Octopi must be launched, updates must be manually checked for and upgraded instead; also update notification does not disappear after system upgrade in Octopi;

    the problem for me is that this approach works only for one user, I cannot get it to work neither for another user on the same machine nor for users on another computer, and I cannot recall if I did something additional for the one user that this approach is working for;

  • run Octopi with unprivileged user, switch to the terminal tab, switch user to a privileged one, and then in confirmation dialog press the button "Run in terminal"; as with the kdesu approach, this is not working in the update window opened by Octopi update notification;

  • use Octopi only for update notifications (although some distributions provide system update notifications on their own (for example, EndeavourOS)) and perform updates in terminal with a privileged user;

  • add my everyday users to sudoers which I would prefer not to do.

eandersons avatar Dec 24 '23 12:12 eandersons