LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-31-2014, 06:17 AM   #1
biysu01
LQ Newbie
 
Registered: Oct 2014
Posts: 1

Rep: Reputation: Disabled
How to provide runtime arguments in the pop ups?


Hi All,

I very new to shell scripting so need help on the following.

SCenario:

I`m developing a automation script which as to restrat one of my servers. for that I`m writing a shell script.While stopping the server
it will prompt the user for the credentials for a double check.

Is there any way we can detect this and provide the credentials.

Thanks in Advance
Surender
 
Old 10-31-2014, 01:27 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Scripts can be written to prompt for information and then you can use select or other methods to determine what was entered by a user. It depends whether you're using BASH or some other scripting language to determine what the exact syntax would be.

Here are some BASH references:

Bash Guide for Beginners
Advanced Bash Scripting Guide
Bash Scripting for Dummies and Geniuses

What you should do is start a script, try some choices to get things going and then post further questions when you get stuck. The way the forum best works is if someone puts forth honest attempts at doing something, then they usually can get all the help they ask for. Remember that forum posters are doing this on their own time, not for pay, not as part of their job or anything. Another thing to consider is what you mentioned, that you are new to writing scripts. People are not here to write scripts for you, if you wish to have someone write a script for you then the forum is the incorrect place to visit for that kind of assistance. If you've never written any script before, then you should read the beginner's guide and get familiar with writing scripts in the first place, there are examples. This way when you do try something and post it, and people then respond with suggestions, you'll be able to cope with understanding things.

Also not sure what you mean by wanting to use pop-ups. Whether that's a requirement or if you just want a banner of information to be sent like people see when they login to systems sometimes.

Last edited by rtmistler; 10-31-2014 at 01:44 PM.
 
Old 10-31-2014, 01:36 PM   #3
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
if you want pop-ups look into zenity.
 
Old 10-31-2014, 01:42 PM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
or use OSD?
Code:
notify-send "LQRocks!"
zenity|yad|dialog...
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to provide password for pppd at runtime deepalalla Linux - Networking 0 12-29-2004 04:33 AM
#ifdefs versus runtime arguments Dark_Helmet Programming 5 09-27-2004 11:52 PM
pop ups brokenflea Slackware 1 03-25-2004 02:52 PM
Pop ups mylo2003 General 10 09-12-2003 03:37 PM
pop ups popcorn5714 Linux - Software 3 03-04-2003 10:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration