basementjack Posted June 18, 2016 Share Posted June 18, 2016 Hi, I'm an alfred powerpack user, and today I had a need to write down a few commands I'll need to use. here's one of them: sudo kextunload -b com.intel.kext.intelhaxm I was about to write this down in my documentation I'm keeping but then wondered if Alfred would be a better place for this! I figured if i can put this into a macro then I can just pull up alfred, run the macro and I won't need to look up the exact syntax and spelling of the whole command string. Is this easy to do? Does having sudo in there complicate things (Since some input will be needed from the terminal)? Thanks! - Jack Link to comment
vitor Posted June 18, 2016 Share Posted June 18, 2016 (edited) You don’t actually need input from a terminal. You can either use AppleScript with with administrator privileges to have a GUI dialog popup (see MachineClean for an example) or you can do something like sudo -S kextunload -b com.intel.kext.intelhaxm <<< your_sudo_password (-S tells sudo to read the password from standard input). The second option would mean you having your password in plain text right there in your workflow which isn’t exactly recommended, but works without prompts. Edited June 18, 2016 by Vítor Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now