Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-14-2002, 05:49 AM   #1
Registered: Apr 2002
Distribution: SuSe/Redhat
Posts: 94

Rep: Reputation: 15
Menu system scripting

I dont know if this should go in programming, feel free to move it if needed.

I have a number of "widgets" that I have built a shell script menusystem around and was wondering whether someone can point me in the right direction about finding some answers to some of the following queries I have.

1) I want to be able to create an account that can only use this menu system when it logs in. That side of it is not too much trouble, but how do I ensure that when they exit the menu, they are logged out of the system totally?

2) On a related issue, how do I stop them issuing a ctrl+C (or any other escape character sequence) to exit the script?

3) And I know this is pretty unimportant to the functionality, but is there a guide to text formatting? I wouldnt mind making it a little bit clearer with colour or two, bold text that sort of thing.

4) I've run into a number of options for building menus (PS3/case, read and so on) but is there a guide that anyone knows of setting out the options available? I've been using PS3/case to date, but while it is easy for a n00b like me to figure out, it seems very restrictive in how the menu is formatted and there was not much behind the reasoning for using it in the original site I found suggesting other than it seems to be the easiest to set up, but I'd like a bit more flexibility if possible.

Thanks in advance
Old 08-15-2002, 10:20 PM   #2
Senior Member
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
These are the questions I can answer:
1) Change the login shell in the /etc/passwd file for the user to be the name of the script. When the script exits the shell will exit.
2) You can capture signals in a script like this. This one captures ^C or SigInt.

    echo "Caught SigInt"

trap "SigInt 2" INT

# Start script here
echo hello
3) Donno, try looking at tset. I know you can set bold text with it, don't think colors thought.
4) Donno

Yes, this is probably a programming post. Not much newbie content here.
Old 08-16-2002, 05:37 AM   #3
Registered: Apr 2002
Distribution: SuSe/Redhat
Posts: 94

Original Poster
Rep: Reputation: 15
Thanks for your help, got the important questions answered at least :-)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Perl text menu system toolshed Programming 3 04-26-2011 08:35 PM
restructuring the menu system? gunnix Debian 4 01-30-2005 04:08 PM
MDK9.2 - Menu system is not quite right pete_bogg Mandriva 1 11-23-2003 08:34 AM
System/Application menu Roxy143 Linux - General 0 06-27-2003 11:57 PM
dail up using ppp menu system joy_boy Linux - Newbie 2 05-01-2002 04:37 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:59 AM.

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