Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I've got a RedHat 9 system I'm setting up and I need to be able to autologin as a user (got that part figured out), come up in X, and start an application. If that application is exited from, I need it restarted.
How do I set this up? Should be easy for someone who's done it, and I'm sure it'll be easy once I see a solution, but I'm drawing a blank. Just one of those days, you know?
hmmm.. lemme see if I have this right before I try to give you some advice. You already have have it login and startx? Or just login, but no xserver? then You'll need it to start a program and if it dies restart it?
You're putting this all in a file?
Which also contains startkde
make sure it's
exec startkde
And that the other apps don't have the exec in front, and have a & behind them.
All that means is that they are normally detached from the console, but in this case, it means you can kill them without bringing everything to a grinding halt.
Me I'd put kdm in rcX.d (whatever your init level is, using sysV-init editor) Set kdm to autologin whatever user (under Setting ControlCentre System Admin, Login Manager). Then in the ~/.kde/Autostart directory put a script to launch whatever programs I needed.
I've got a script called startups, that looks like this:
Code:
#!/bin/sh
#Altering keymap for Extra Keys, and to resort mouse buttons
xmodmap ~/.Xmodmap
#Extra Mouse Buttons
imwheel -k -b "67"
#Karamba eyecandy
karamba ~/.karamba/time.theme ~/.karamba/noatun.theme
okay, I'm not sure if I'm understanding your questions correctly, but here's my $0.02:
you could edit your .bashrc so that when you log in on a console, it runs:
#!/bin/bash
startx&
mozilla&
That should take care of starting the program when you log in. As for restarting when the application closes [I presume you mean the computer], you could edit the .bashrc script to say:
mozilla && sudo /sbin/reboot.
This means that when it finishes executing the mozilla command, it will move onto the next [I'm not sure if this would actually work, as I haven't tried it, but I'm fairly certain that it would...]
to start the application, add it to ~/.xinitrc, if that doesnt exist, /etc/X11/xinit/xinitrc. but as was said before add a & after it. on makeing it restart when its closed, i dont reallly know, u could make a cron script that would check if it was running, but this isnt really a good way. i dunno if its possible but u could try a script that does something like "mozilla && <the script again>" this is assuming u ment for the program to restart not the computer.
Originally posted by unixgeek I've got a RedHat 9 system I'm setting up and I need to be able to autologin as a user (got that part figured out), come up in X, and start an application. If that application is exited from, I need it restarted.
How do I set this up? Should be easy for someone who's done it, and I'm sure it'll be easy once I see a solution, but I'm drawing a blank. Just one of those days, you know?
Thanks for any help you can provide.
Ron
put a respawn in /etc/inittab. and put in your .xinitrc the name of the app that you want to start.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.