PDA

View Full Version : Scripting



Firewing1
23rd December 2004, 12:43 AM
Hi,
I'm not sure how to do this, but I'd really appreciate it if someone helped me out on how to. What I'd like is to script that asks me if I want to su. So, pretty much, I click on my taskbar button, I want it then to open a terminal with this message:
Do you want to log in as root? [yes or no]

Yes, asks for password, no, runs normally...

I know this so far about scripting; You start it with #! /bin/bash, end w/ exit, and I also know the basic stuff, like echo, so on... but not how to ask questions and read responses from the user...

Thanks so much,
Firewing1

rogue
26th December 2004, 07:24 PM
Hi Firewing... the Advanced Bash-Scripting Guide (http://howtos.linux.com/guides/abs-guide/) should answer all of your questions.

If you just want to su so a root-only program can run, I'm fairly sure the Gnome authorization application (the name escapes me right now) will automagically kick in for you under certain circumstances.

Also, if you just need to prompt the user and don't need a terminal open, you can invoke dialog widgets (http://howtos.linux.com/guides/abs-guide/assortedtips.shtml) (gdialog, kdialog and xdialog) in your shell script.

Jaya_Mani
6th June 2009, 09:42 AM
Hai Rogue,

The link is not working http://howtos.linux.com/guides/abs-guide/. Can you please provide us the correct link.

We are also looking for a script to creat a installer.

Thank you very much
Jaya

leigh123linux
6th June 2009, 01:59 PM
Hai Rogue,

The link is not working http://howtos.linux.com/guides/abs-guide/. Can you please provide us the correct link.

We are also looking for a script to creat a installer.

Thank you very much
Jaya


Thread closed.

Welcome to the forum.

This is a very old thread and therefore it has been closed. Fedora evolves at a rapid pace and, as such, most or all of this thread is far less relevant to your problem than at first it might seem. If you still need help, and after searching the forum, please start a new thread.

FedoraForum.org Guidelines (http://www.fedoraforum.org/?view=guide)