Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Pardon me if the subject is using the wrong terminology (that's why I'm posting in the newbie forum!). Anyway, I'm trying to set up my freevo to run automatically upon boot up, but it starts my script, then stops and shows the console (tty) login prompt. Anyone know how to make it login automatically, or am I going down the wrong path? I'm using Anand Patel's guide for booting freevo, but it doesn't seem to work. Any help would be greatly appreciated. Oh yeah, I'm running Red Hat 9, using runlevel 4 and not running gdm, I'm using the following line to start X:
/usr/X11R6/bin/xinit /root/freevo.xinitrc -- /usr/X11R6/bin/X -xf86config /etc/X11/XF86Config bc
Freevo is a DVR application. What I am looking to do is turn my Red Hat 9 system into an appliance. I would like the system to boot up and run Freevo without logging in, or boot up, log in automatically. Right now, I'm using runlevel 4 for a custom boot config. Have you ever heard of anyone being able to auto-login?
Dunno 'bout RedHat , but in SuSE , somewhere in the Acount-management-configuration-thingy , you could set up a default user and make it login automatically.
Maybe you should look for something like that in RH.
I think you might be able to use "expect" to get your script to login for you. Expect is a command interpreter that is meant to be used for this very purpose. I beleive that you can also use it in a regular bash script to attain the same results.
Ummm, I think that something like this would work, albeit in a very crap way....
#yada yada yada, all your regular script upto this point, but when the
# script wants to start a login you need to get funky
#I've no idea what your RC script is doing, but for ssh you might do
# somthing like this...
This way probably completely sucks and will barely work I dont use expect in this fashion, but I know that you can. Expect is a massive program, and the man page wont be much help to you, but you can also use expect to execute bash commands so maybe you should use it that way instead.
I dont really know... maybe posting the script your running Freevo from might help...
[EDIT]: Actually I'm not sure if 'system' it the right command, post your script though and we will see what we can do
You can in principle start a Linux system without logging in, by setting the default runlevel to 1 in /etc/inittab - but (a) you won't get network access and (b) not all distributions support doing this (they shouldn't - it's basically a single user system maintenance mode).
If your program can run as a daemon ("service" in Windows-speak) then you could configure it thus, in which case it can autorun on system boot. I don't know about your program (never even heard of it), but that's the general principle. Check out the docs for your program.
Put it in /etc/inittab where the runlevels are defined, every distro is different but RedHat should be something like this:
# Script to run when going to other runlevel:
si::sysinit:/etc/rc.d/rc.sysinit # System initialization (runs when system boots).
l0:0:wait:/etc/rc.d/rc 0 # Halt the system
l1:1:wait:/etc/rc.d/rc 1 # Single user
l2:2:wait:/etc/rc.d/rc 2 #
l3:3:wait:/etc/rc.d/rc 3 # Default
l4:4:wait:/usr/X11R6/bin/xinit /root/freevo.xinitrc -- /usr/X11R6/bin/X -xf86config /etc/X11/XF86Config bc #
l5:5:wait:/etc/rc.d/rc 5 # X window and xdm
l6:6:wait:/etc/rc.d/rc 6 # Reboot the system
Now I don't know if you can pass arguments like that so you may need to create a script that passes the arguments to freevo
Then you just change the initdefault line to 4 in inittab.