Applescript and SUDO

Vard

Looking for progress
OK, so I finally got FINK installed and lvoe that fact that I can load KDE's Kicker and use those applications. However, while I don't mind opening and X11 window, typing sudo kicker and then entering a password, my wife would never use this system if she had to do that. I want her to be able to have access to the Koffice Suite from startup.

So I was wondering if it is possible to write and Applescript that you can load at login that would call up Kicker and enter that password for her. Basically have everything work in the background so that the only thing she needs to do is choose an app from Kicker and start working,

I have never written an Applescript before, or any other, but from some reading, it sounds like it should be pretty easy, at least as far as what I want it to do, if in fact it is even possible.

Just wanted to ask the 'possibility' question before I got going on it and kept running into walls that I can't get around.

Thanks for any help with this,
Eddie
 
You *can* execute Unix shell commands in Applescript, but I'm not aware of a way to 'feed' keystrokes into a Unix process, as if they were typed.

Ergo, if sudo can accept the password as a command-line argument, you're in business. If not, maybe not. I *think* it can... Try typing "man sudo" and find out.

Of course, you could try creating a text file with the password in it, and then execute:

sudo kicker (lessthan)pwdFile

But I don't know if this would work.

Note that this forum does not allow me to put an actual less-than character into my post....
 
Thanks for the reply Brian. I will look into when I get home tonight. Just think, come this time next summer I'll have my first Mac Laptop in hand and I can work on this stuff at work when no one is looking!

Eddie
 
Back
Top