FedoraThis forum is for the discussion of the Fedora Project.
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.
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.
Distribution: Debian, Fedora 8 and 9, Mandriva 2009, Mepis, Kubuntu, SuSe 10.1, Slackware 12.1 - and Knoppix.
Posts: 155
Rep:
Fedora 7 - Autostarting apps
I want to have some apps start automatically when Fedora 7 boots (using KDE).
At the moment, I start them manually when needed, but the machine is supposed to run unattended, and if the power goes off, they don't restart till I get back.
Googling tells me to add them to ~/.kde/Autostart - that doesn't work.
Another says add to /etc/rc.d/rc.local - that doesn't work: they start before the logon, and the GUI doesn't pick them up.
.xinitrc doesn't do it.
rc.local is executed after the other init scripts but before X is really running (if I'm right), so like you said, it's too early. If you want them to run when KDE has started, then it's KDE config file you need to edit. Are they such apps that you need to be logged in before they can launch? In that case I would start off by opening the KDE Control Center and looking if there's a similar tool like the "Sessions" in Gnome which lets you add programs to a list that is executed when the Gnome session starts. This obviously needs that your login to KDE is automated, if you're not there giving password when the machine reboots itself. It's unsafe, so..I would consider another way
Distribution: Debian, Fedora 8 and 9, Mandriva 2009, Mepis, Kubuntu, SuSe 10.1, Slackware 12.1 - and Knoppix.
Posts: 155
Original Poster
Rep:
Yes, exactly. rc.local is not the right answer.
There is no other user of this machine - it sits in the corner of my study and quietly does its thing. In fact, it's under the bench and out of sight, unless I pull out the keyboard, mouse, and monitor. Fedora logs in to the only account it has, automatically. It wouldn't matter whether the apps started before or after the login - but they do have to start after kdestart.
What I would really like is not to have to type the root password umpteen times whenever I'm working on it, but I understand that's part of the Linux creed and I'd be excommunicated for suggesting it.
KDE has a Session Manager and a Resource Manager, but neither allows adding of stuff to run at GUI boot time. I've not yet found a file where stuff can be added to run at that point.
In Windows, I'd just add them to the "Start" menu, and that would be it. If Fedora or KDE has such a thing, it's well hidden.
Maybe I have to start again, and use Gnome as the desktop (or is that ?)
Distribution: Debian, Fedora 8 and 9, Mandriva 2009, Mepis, Kubuntu, SuSe 10.1, Slackware 12.1 - and Knoppix.
Posts: 155
Original Poster
Rep:
I found the answer!
It's ~/.bashrc
Hours of Googling, and careful reading of the KDE manual, revealed nothing. The realisation that some things were starting led me to search for them. One was in .bashrc.
I added the apps to that, and strange things happened at boot-up.
I added a & at the end of each app, and they now all run fine.
The file folders no longer appear on the desktop, but I can live with that.
Distribution: Debian, Fedora 8 and 9, Mandriva 2009, Mepis, Kubuntu, SuSe 10.1, Slackware 12.1 - and Knoppix.
Posts: 155
Original Poster
Rep:
SEQUEL TO THE ABOVE (if anyone's reading this or using it to solve the same problems).
Putting the commands in ~/.bashrc works - they start at login.
However, if you try to open a terminal window, they all run again, with "interesting" results.
No doubt some clever "if .. then .. else" coding could deal with that, but I cheated.
I created a new file called z_startup_apps.sh in /etc/profile.d and then removed everything from ~/.bashrc. Otherwise, .bashrc tries to load them again anyway via the /etc/bashrc setup.
Distribution: Debian, Fedora 8 and 9, Mandriva 2009, Mepis, Kubuntu, SuSe 10.1, Slackware 12.1 - and Knoppix.
Posts: 155
Original Poster
Rep:
AND ANOTHER SEQUEL (this stuff isn't in any book or website I've found yet!)
z_startup_apps.sh in /etc/profile.d works fine, until you try to open a terminal window. Then Fedora tries to run that stuff all again. Some apps don't mind, some get right shirty.
The better place for z_startup_apps.sh is in ~/.kde/Autostart
I don't know if that's what that folder is for (Google searches imply otherwise) but it works well in there, running with the individual's boot-up preferences and not arguing with Terminal.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.