Linux - Newbie This 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! |
Notices |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-04-2003, 09:53 PM
|
#1
|
LQ Newbie
Registered: Sep 2003
Location: Buffalo, NY
Distribution: FC6, Slackware 10.2
Posts: 8
Rep:
|
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
|
|
|
10-05-2003, 11:00 PM
|
#2
|
Member
Registered: May 2003
Location: India
Distribution: Knoppix, RedHat
Posts: 246
Rep:
|
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
|
|
|
10-06-2003, 07:10 AM
|
#3
|
LQ Newbie
Registered: Sep 2003
Location: Buffalo, NY
Distribution: FC6, Slackware 10.2
Posts: 8
Original Poster
Rep:
|
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,
|
|
|
10-06-2003, 08:50 AM
|
#4
|
Member
Registered: Mar 2002
Location: Edinburgh, Scotland
Distribution: Suse 7.2, Gentoo 1.4, Solaris 9
Posts: 661
Rep:
|
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 
|
|
|
10-06-2003, 12:16 PM
|
#5
|
Member
Registered: May 2003
Location: India
Distribution: Knoppix, RedHat
Posts: 246
Rep:
|
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
|
|
|
10-06-2003, 02:31 PM
|
#6
|
LQ Newbie
Registered: Sep 2003
Location: Buffalo, NY
Distribution: FC6, Slackware 10.2
Posts: 8
Original Poster
Rep:
|
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.
|
|
|
10-06-2003, 02:31 PM
|
#7
|
Member
Registered: Sep 2002
Location: Haarlem , the Netherlands
Distribution: VectorLinux SOHO 5.1
Posts: 470
Rep:
|
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.
|
|
|
10-06-2003, 04:22 PM
|
#8
|
Member
Registered: Mar 2002
Location: Edinburgh, Scotland
Distribution: Suse 7.2, Gentoo 1.4, Solaris 9
Posts: 661
Rep:
|
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 
Last edited by fatgod; 10-06-2003 at 04:25 PM.
|
|
|
10-06-2003, 06:04 PM
|
#9
|
LQ Newbie
Registered: Sep 2003
Location: UK
Distribution: LFS-CVS-20031113
Posts: 29
Rep:
|
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
|
|
|
10-06-2003, 08:51 PM
|
#10
|
Senior Member
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802
Rep:
|
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).
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.
Last edited by /bin/bash; 10-06-2003 at 08:53 PM.
|
|
|
10-15-2003, 09:30 AM
|
#11
|
LQ Newbie
Registered: Sep 2003
Location: Buffalo, NY
Distribution: FC6, Slackware 10.2
Posts: 8
Original Poster
Rep:
|
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 07:01 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|