creating useful launchers
Hey all,
I'm trying to figure out how to make scripts or launchers do my bidding. basically I'd like to have an icon i can click on to run commands or more specifically lists of commands. most of these would require sudo privileges. One of the things I'd like to do is have a button "turn on" another X server which would use ssh and the -X switch to login to an X server on another computer on my LAN. currently what I have to do to accomplish this is: switch to tty2 and: Code:
X :1 switch to tty1 and: Code:
xterm -display :1 Code:
ssh -X myuser@192.168.1.5 Code:
gnome-session now for the purpose of this post, I'd like to know how to automate this into a single click of a script or launcher of sorts. Is this possible? how would I configure my local gnome session to prompt me for passwords the way everything else does (with the pretty little password dialog). Thanks for reading, and hopefully posting... |
Well, you can make a simple sh script. Basically, all you do is list the commands you want to execute in a file since you say you're using Gnome, I'll assume you have gksduo or gksu, the programs that do the password asking. To figure out which you have, open a terminal, type them in, and see which doesn't complain about not existing.
Then, with the passwords, your script should look kinda like this: Code:
gksu firstCommand && secondCommand && thirdComand |
All times are GMT -5. The time now is 12:39 AM. |