LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Prompt user for information immediately after login? (https://www.linuxquestions.org/questions/linux-software-2/prompt-user-for-information-immediately-after-login-450212/)

bpottle 05-31-2006 08:26 AM

Prompt user for information immediately after login?
 
I've created a LiveCD using RYLX that holds a copy of sflowtool 3.9. What I need to do is auto-run a program that will prompt the user for a couple pieces of information (hostname/ip of target machine, etc), and then run sflowtool with -(answer1) (answer2) and so forth. Basically automate the process of running the executable with their settings.

What would be the best way to go about this? Any help would be GREATLY appreciated, I've never had a lot of luck getting things to auto-run in Linux.

timmeke 05-31-2006 09:59 AM

1. Does the program have any options or settings to make it non-interactive (ie auto-run)?
2. If it doesn't, you can always try writing a script that "prints" commands to the stdin (standard input, where the user normally types his information via the keyboard) to the program in question.
ie something like:
Code:

cat your_settings_file | your_program
(where "your_settings_file" contains each response the user is supposed to give via the keyboard)
for starters.


All times are GMT -5. The time now is 04:18 PM.