I am new to applescript and programming in general, but I would like to use Applscript to open X11 and log me into a server at school so that I can use some programs requring X11. As it is , with my spelling, it takes me 3 or 4 tries to type “ssh etc…” and I would just like to not have to worry about that : ) How would I go about doing this? I am not averse to writing a script in linux and having Applescript open X11 and run that script, but currently I don’t even know how to get applescript to execute anything at an X11 prompt.
I don’t think appescript is able to control X11. It actually isn’t X11 you want to control either. The application you want to script is xterm. This becomes more of a unix scripting issue. I think you could edit xterm’s .init file or even X11’s .init file to open xterm and then initiate the commands. I am pretty sure this is possible but I don’t know how to do it. Sorry.
Are these apps command line based? I only ask because you can ssh in Terminal, which is scripitable. . .
That would look something like this:
tell application “Terminal”
do script with command “ssh -l username xxx.xxx.xxx.xxx”
end tell
I tried to figure out the timing to have the script give the password for the ssh server but I couldn’t figure that out. . . Hopw this helps you get started.
Unfortunately the programs aren’t comand line based, so terminal won’t work, but at least you kept me from continuing to attempt the wrong solution. I’ll check out editing the .init files. Thanks!