0

I am trying to do experiment with /etc/init. I have written a script which displays a window showing some menu. I don't understand on which event I should start my service. I don't want any desktop manager after booting so I disabled LightDM. Now I want that my script should execute to show my own menu after booting. How can I achieve this?? Please help..... I am using Ubuntu 13.04.

This is my script

  dialog --backtitle "Linux Shell Script Tutorial " --title "Main\
  Menu" --menu "Move using [UP] [DOWN],[Enter] to\
  Select" 15 60 3 \
  Date/time "Shows Date and Time" \
  Calendar "To see calendar " \
  Editor "To start vi editor " 2>/tmp/menuitem.$$

  menuitem=`cat /tmp/menuitem.$$`

  opt=$?

 case $menuitem in
 Date/time)  date;;
 Calendar)    cal;;
 Editor)       vi;;
 esac
papukaija
  • 2,425
Kishor
  • 33
  • 8

1 Answers1

1

You don't have any chance to run such a script during booting or before login screen. The reason: you must to be authorized/authentified to run commands like vi. If you wish, you can run that script on/at (immediately after) login. See How do I start applications automatically on login? in this sense.

Files in /etc/init are configuration files telling Upstart how and when to start, stop, reload the configuration, or query the status of a service.

Radu Rădeanu
  • 174,089
  • 51
  • 332
  • 407