View previous topic :: View next topic |
Author |
Message |
beakmyn n00b
Joined: 26 Mar 2003 Posts: 31
|
Posted: Tue Jun 24, 2003 12:30 pm Post subject: inittab run program bypass login? |
|
|
Ok I'm building a digital picture frame. I basically want this thing to start up and run zgv all by itself. Googling suggested:
modifying /etc/inittab with a new line
7:2345:once:/usr/bin/zgv -l /home/photos/*
Now here's my question:
Does putting this line in the inittab efffectively run the program at bootup with no-one logged in?
If yes, great. All I do is turn on the power let it boot and away we go.
If no, then do I need to configure something like mingetty to do an autologin before the aformentioned line in inittab is parsed? |
|
Back to top |
|
|
dirtyjake n00b
Joined: 06 Jul 2002 Posts: 60
|
Posted: Tue Jun 24, 2003 8:24 pm Post subject: |
|
|
Have you tried it? Give it a shot and see what happens. 'zgv' will start on vc7 with the line as it is. Also, I believe that if it gets killed it will not start back up because of the "once".
Try changing the line to:
Code: |
c1:2345:respawn:/usr/bin/zgv -l /home/photos/*
|
and replace the 'agetty' line that starts with "c1" with it. This way your pictures will start on vc1 and you will have login prompts on vc2-vc6.
Remember that this will start zgv with root privileges, so depending on your security needs, make sure zgv has no bugs. Or now that I think of it, make sure a user can't overwrite any files. They could clobber some important files as root.
You might be able to create a user to run zgv under.
`su - some_user_name -c "/usr/bin/zgv -l /home/photos/*"` might work.
Also, make sure your default runlevel is 3.
I have never tried this so I can't guarantee any of suggestions will work as you want. Good Luck. |
|
Back to top |
|
|
beakmyn n00b
Joined: 26 Mar 2003 Posts: 31
|
Posted: Tue Jun 24, 2003 11:16 pm Post subject: |
|
|
Not too concerned about security. The box will be a digital picture frame without a keyboard or mouse hooked up. I tried it and it appeared to work. Not sure why it didn't work before I posted? anyway. I like your idea of respawning it if it gets shutdown for some reason as that would require me getting a keyboard out and hooking it up yadda, yadda, yadda. Thanks for the help. Now if I could get zgv to remember the picture rotation I'd be set.
What else is a 166Mhz,1gb,32mbram laptop good for? |
|
Back to top |
|
|
|