Is it possible to auto login from console
Hi everyone,
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 Thanks! Rob |
hi
i dont know what freevo is but if its a service you should be running it at runlevel 3 for command prompt and runlevel 5 for graphical. search in google. i am not sure howto set this up regards rahul sundaram |
Hi Rahul,
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? Thanks, |
Are you sure that you need to login? Can you not just setup an RC script to run Freeco at boot?
I have no idea about Freevo, so I am just asking ;) |
hi
ok then. runlevel 4 makes better sense now. like the post above i believe that you can run this as a service without actually logging in. sorry. cant help better than that regards rahul sundaram |
Hi fatgod,
I do have it running as an rc script. the script runs, looks like it is about to start and then it goes to the login prompt. If I log in and run the same script, it works... It's got me totally confused. |
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. |
Dude,
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.... #! /bin/bash #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... expect -c "spawn /usr/bin/ssh mycomputer"\ -c "expect password: " \ -c "send mypassword\r" \ -c "system 'MyFreevocommand'" \ exit 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. Dunno if that helps. Euan |
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: Code:
si::sysinit:/etc/rc.d/rc.sysinit # System initialization (runs when system boots). Then you just change the initdefault line to 4 in inittab. |
Got it to work -- albeit in a cheesy way. I did the following:
Set gnome to autologin with an account, then in gnome i set freevo to start. It's not exactly what I was hoping for, but it'll do. Thanks for all your help! |
All times are GMT -5. The time now is 05:29 PM. |