Is there a command to open a root terminal and execute a function?
I am trying to set up my Openbox menu exactly as I want it to be, but I ran into a problem: some of my pentesting programs require me to be root in order to run, so I can't just add "Eterm -e programname" in the menu.
What I need is something that will cause a gksu (or the like) interface to come up, asking me to authorize myself as root, and then run "Eterm -e programname" as root. Is this possible? What would my menu entry look like? Thanks. *EDIT* I realized that to open a root terminal, all I need to do is "gksu Eterm" but "gksu Eterm -e programname" does nothing at all. |
Maybe
Code:
gksu "eterm -e programname" |
Quote:
The main reason that I want these programs in my menu is so that I remember that I have them installed; many of them need me to feed them an argument else they just print out the help screen (which is okay for the purpose of remembering my installed programs). Those that don't print out a help screen, don't exit immediately. Those that do print a help screen, do exit immediately; openbox interprets the return of the command prompt as the program being terminated. Which it is, I would just rather the terminal window stayed open with the help screen, but I don't think there is a solution to this specific problem. As the post below me says, scripting is probably my best option. Thanks for your help, I'll mark this thread as solved. |
you need to dive inside bash scripting.. a simple script will solve your problem.
posting your problem in the programming forum will concentrate on the issue..I trying to read about scripting to solve your problem. |
All times are GMT -5. The time now is 07:24 AM. |