 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

28th January 2007, 04:23 PM
|
 |
Registered User
|
|
Join Date: Nov 2006
Location: Hamilton, Ontario
Posts: 33

|
|
|
automatic startup of programs on boot
I think I may have entitled my las post incorrectly. All I want to know is how to get a program to automatically startup on boot. Do I have to create some kind of little shell script for this and add it to some kind of directory? I don't imagine this would be difficult. Any help would be much appreciated. By the way, I am using Fedora core 5.
Many Thanks,
Matt
|

28th January 2007, 04:35 PM
|
|
Registered User
|
|
Join Date: Nov 2005
Location: Los Angeles area
Posts: 887

|
|
|
You can add scripts to /etc/init.d/ and (I believe) use chkconfig to make them start up.
You usually want add to levels 3-5. Try "chkconfig --list haldaemon".
|

29th January 2007, 01:00 AM
|
 |
Registered User
|
|
Join Date: Nov 2006
Location: Hamilton, Ontario
Posts: 33

|
|
|
I created a script called ktorrent.sh in the /etc/init.d directory. I tried to start it with the chkconfig program but it wouldn't work on my script. I went into the /etc/rc.d/rc5.d directory and created a symbolic link to my ktorrent script then rebooted and it didn't work. Anyone have any other advice?
|

29th January 2007, 01:32 PM
|
|
Registered User
|
|
Join Date: Apr 2005
Location: Finland
Posts: 190

|
|
Quote:
|
Originally Posted by fancylad
I created a script called ktorrent.sh in the /etc/init.d directory. I tried to start it with the chkconfig program but it wouldn't work on my script. I went into the /etc/rc.d/rc5.d directory and created a symbolic link to my ktorrent script then rebooted and it didn't work. Anyone have any other advice?
|
Instead of creating full System V style init script for your program, you can just add the command you want to run in /etc/rc.d/rc.local. However, to me it seems like you're trying to run ktorrent with that. In that case I'm pretty sure it won't work. AFAIK you can't run ktorrent in headless mode. To my knowledge, you can start ktorrent only from an X session.
|

29th January 2007, 02:20 PM
|
 |
Registered User
|
|
Join Date: Nov 2006
Location: Hamilton, Ontario
Posts: 33

|
|
|
Yeah adding ktorrent to the /etc/rc.local script didn't work. I know there is a way to do this. After all, it can be done very easily in Windows.
|

29th January 2007, 02:33 PM
|
|
Registered User
|
|
Join Date: Oct 2006
Posts: 4,752

|
|
|
If you are using Gnome you just add the command to System>Preferences>Sessions>Start up Programs, on KDE just do ln -s /usr/bin/ktorrent ~/.config/autostart/ktorrent.
Or make a text file named ktorrent and put :
#!/bin/sh
ktorrent
in it and move it to ~/.config/autostart/ in either one.
|

29th January 2007, 02:43 PM
|
|
Registered User
|
|
Join Date: Apr 2005
Location: Finland
Posts: 190

|
|
Quote:
|
Originally Posted by fancylad
Yeah adding ktorrent to the /etc/rc.local script didn't work. I know there is a way to do this. After all, it can be done very easily in Windows.
|
Exactly what can be done very easily in Windows? Running KTorrent upon startup? Running KTorrent headless? Running KTorrent at all in Windows? I do not know what you are trying to justify by saying that something can be done very easily in Windows.
This is Fedora Core discussion forum. Fedora Core is a linux distribution. Linux is complitely different from Windows by design, implementation and philosophy. It's like you're saying that something can be done with a knife because you *know* it can be done with a spoon. However, most of the time, this is not the case.
As far as running KTorrent headless on a linux box goes see this thread on the KTorrent forum.
However, if you indeed do come up with a solution to running KTorrent in headless mode, I would be very interested in knowing about it. However, If you want to run KTorrent when you log in with KDE or GNOME, you don't need to write any startup scripts. Just consult your window managers options. It should be very easy to accomplish.
|

29th January 2007, 02:54 PM
|
|
Registered User
|
|
Join Date: Nov 2005
Location: Los Angeles area
Posts: 887

|
|
|
fancyland,
My interpretation is that you are used to the Windows single-user machine paradigm.
I don't know how ktorrent runs. If it runs as the user (you don't have to get root priv's
to run it) then, for GNOME, I believe you may be able to run it automatically from [System]->[Preferences]->[More Preferences]->[Sessions].
Click on [Startup Programs] and add ktorrent.
If you are using KDE then there may be similar options.
note: One can run X applications on a headless box with "Xvfb".
(I used to run batch scripts in gimp this way.)
|

29th January 2007, 05:19 PM
|
 |
Registered User
|
|
Join Date: Nov 2006
Location: Hamilton, Ontario
Posts: 33

|
|
|
Ok, what I meant was that adding a program to startup automatically upon login of a Windows session is easy and that I'm sure it's no harder--probably just different--than doing it in Fedora. I know that Windows and Linux are completely different OS's. My question has really nothing to do with ktorrent; that just happens to be the application that I want to startup automatically upon login. For the record I am using the Gnome and not KDE desktop environment.
|

30th January 2007, 07:35 AM
|
|
Registered User
|
|
Join Date: Apr 2005
Location: Finland
Posts: 190

|
|
|
Hello fancylad.
I'm sorry if I sounded harsh.
Ranting follows, feel free to skip it.
[rant]
It's just that I keep having people come to me all the time asking why this and that is so hard or difficult to do in linux because it is soooo easy in windows. And most of the time the thing they want to do is even easier to do in linux than in windows, they just don't know how to do the thing properly in linux. It sometimes pisses the hell out of me when people tell me that linux is somehow "worse" that windows, just because they don't know how to operate it. The routine counter question I give them is that why compilining the OS kernel by yourself is so difficult in windows when I *know* it's soooo easy to do in linux? That usually ends the debate right there. If they just asked how to do the damn thing in linux and left the "because it's so easy in windows..." part out I would have no problem with that. In fact, I see as my obligation to help people with linux, because I've been helped -- and keep being helped, as I can realize that there is alot more that I don't know about linux than there are things I do know -- by the linux community in the past. Also, I dont' have a problem with people asking how this or that windows-like thing is done in linux, but I just hope that they didn't think that they should be able to do it in the exact same way they are in windows, because most of the time that's not the case. And I sure do hope that they didn't say linux is good for nothing just because of that.
[/rant]
Again, I'm sorry if I sounded rude. What I didn't realize was that instead of running programs at *boot* you wanted them to run at *login*. I'd say that all this was a huge misunderstanding. You didn't realize that bootup and login (even if it's automatic passwordless one) are two complitely separate processes and I wasn't able to adjust myself to your level of experience. Clearly, you haven't used linux much, and as clearly I should have been able to read that between the lines of your first post.
@mwette: Thanks for the hint about Xvfb. I'll look into that. I sure would like to find a way to run some GUI programs w/o logging in to X, preferably so that they were started from init scripts. Maybe Xvfb enables this.
|

30th January 2007, 02:48 PM
|
 |
Registered User
|
|
Join Date: Nov 2006
Location: Hamilton, Ontario
Posts: 33

|
|
|
No need to apologize Pobbz; I understand where you're coming from. The misunderstanding was entirely my fault; I should have been more specific with my question. I do understand the difference between a program being run at boot time versus login; I just didn't really think about it when I posted my question. Sorry about that. In the future I will try to analyze my problem a little better before posting a question. Thanks for your help (and everyone else who posted). I managed to get Ktorrent to run after login by adding the ktorrent command to the .bash_profile file. If I had phrased my question better the first time I'm sure someone would have been able to tell me that right off the bat. And for the record, this is what I meant by it being just as easy to do in Linux. Personally, although I am new to Linux, I prefer it much more to Windows.
Thanks again everyone.
Matt
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 20:43 (Thursday, 23-05-2013)
|
|
 |
 |
 |
 |
|
|