Yo how do I run an executable script that requires sudo privileges, without ever touching the command line? I want it to just prompt me for my password the GUI way and be done with it.

How do I write a script so that, instead of just failing and doing nothing, it brings this up?


@bignose, @sotolf and @undefined provided answers that probably would work, if I had the respective programs installed. @jinxd solution probably would work, but I prefer having to input the password.

@yyp Hit the jackpot, as it turns out pkexec is what I have on my system. So just putting "pkexec" at the start of the script makes it ask for password and everything works as intended. Thanks, everyone!

Sign in to participate in the conversation

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.