vopono icon indicating copy to clipboard operation
vopono copied to clipboard

Sudo with grahical password prompt?

Open fosspill opened this issue 4 years ago • 3 comments

Is there any way to use gksu, for instance, instead of sudo to prompt for the password?

The use case would be creating a shortcut in a start menu which starts Firefox through vopono

fosspill avatar May 24 '21 17:05 fosspill

This is a good idea, in theory there's only a few places it needs to change:

exec.rs
384:                std::process::Command::new("sudo")

netns.rs
115:            handle.args(&["sudo", "-Eu", user.as_ref().unwrap()]);
427:                    std::process::Command::new("sudo")

util/mod.rs
286:        let _status = Command::new("sudo")

The tricky part is that we would want to set it in the config file and then it needs to "globally" available.

jamesmcm avatar May 31 '21 18:05 jamesmcm

That's a tricky decision to make, to be honest. Would it be for power users to be able to make their own customization or would it be to make it easier for users?

If it's the first one I think a simple env variable should cut it. A self defined sudo command (and arguments, presumably).

fosspill avatar May 31 '21 19:05 fosspill

Yeah, I think it can be added as like a configuration option with different options (sudo, please, gksu, and polkit keyring stuff).

I need to take a look at how the latter works though.

Eventually it'd be cool to create a GUI for vopono as a like a toolbar icon to handle these sorts of cases even easier.

jamesmcm avatar Jun 01 '21 10:06 jamesmcm