Thursday, June 11, 2009

Welcome script

This is simple welcome script, asking for User selection.

dialog --title "Welcome to Messung System " --menu "\nChose the user" 11 30 2 1 "messung" 2 "root" 2>.welcome Q_MUSIC=$(cat .welcome)
This dialog box gives you two option, one is enter as Messung user or switch to Root user.

if [ "$Q_MUSIC" = "1" ]; then
dialog --msgbox "Hit Enter to continue" 5 25
else #dialog --passwordbox "Enter the Password :" 12 25 dialog --infobox "Enter the Password " 3 25 su -l

If you go for first option, then you login as a Messung user. Then welcome dialog box will appear, given below.

If you go for second option, then it will ask for password.

The welcome window for Root user is given below.

No comments: