LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices



Reply
 
Search this Thread
Old 06-25-2007, 08:19 PM   #1
Keithj
Member
 
Registered: May 2005
Location: Essex and Norfolk
Distribution: Debian, Fedora 8 and 9, Mandriva 2009, Mepis, Kubuntu, SuSe 10.1, Slackware 12.1 - and Knoppix.
Posts: 155

Rep: Reputation: 30
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.

There has to be a place...

Anyone tell me where it is?
 
Old 06-26-2007, 03:41 AM   #2
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
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

Maybe kde.org is the right place to start.
 
Old 06-26-2007, 03:36 PM   #3
Keithj
Member
 
Registered: May 2005
Location: Essex and Norfolk
Distribution: Debian, Fedora 8 and 9, Mandriva 2009, Mepis, Kubuntu, SuSe 10.1, Slackware 12.1 - and Knoppix.
Posts: 155

Original Poster
Rep: Reputation: 30
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 ?)
 
Old 06-26-2007, 05:12 PM   #4
Keithj
Member
 
Registered: May 2005
Location: Essex and Norfolk
Distribution: Debian, Fedora 8 and 9, Mandriva 2009, Mepis, Kubuntu, SuSe 10.1, Slackware 12.1 - and Knoppix.
Posts: 155

Original Poster
Rep: Reputation: 30
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.
 
Old 06-27-2007, 03:15 PM   #5
Keithj
Member
 
Registered: May 2005
Location: Essex and Norfolk
Distribution: Debian, Fedora 8 and 9, Mandriva 2009, Mepis, Kubuntu, SuSe 10.1, Slackware 12.1 - and Knoppix.
Posts: 155

Original Poster
Rep: Reputation: 30
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.
 
Old 06-28-2007, 05:58 PM   #6
Keithj
Member
 
Registered: May 2005
Location: Essex and Norfolk
Distribution: Debian, Fedora 8 and 9, Mandriva 2009, Mepis, Kubuntu, SuSe 10.1, Slackware 12.1 - and Knoppix.
Posts: 155

Original Poster
Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing Apps on Fedora Vertel Linux - Newbie 2 07-05-2005 09:29 PM
Installing Apps on Fedora DesyphER Linux - Newbie 5 12-19-2004 08:26 AM
installing apps on fedora canucks Linux - Newbie 1 07-30-2004 02:32 PM
Two Apps Needed In Fedora! sxa Linux - Software 5 01-08-2004 07:10 PM
Autostarting apps concoran Linux - Newbie 1 07-29-2002 12:41 PM


All times are GMT -5. The time now is 10:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration