LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 11-16-2008, 11:53 AM   #1
firewiz87
Member
 
Registered: Jan 2006
Distribution: OpenSUSE 11.2, OpenSUSE 11.3,Arch
Posts: 240

Rep: Reputation: 37
How to add a program to linux startup??


I need a program, Rutilt to run automatically at system statup for all users..... How can this be done?? I am using openSUSE 11.0

Thanx in advance...
 
Old 11-16-2008, 01:45 PM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 65
Not sure what you mean by "run for all users"; a command is run by one user, or you could run it repeatedly for each user.

You can run a command at start-up, as the root user, by adding it into /etc/init.d/rc.local.

You can run a command for a particular user by adding it to that user's crontab, and using "@reboot" in the time-to-run fields.

If you want every user to run the command, I would add it to crontab, and maybe modify the adduser script to add a crontab entry in case you add any new users.

Hope that helps,

—Robert J Lee
 
Old 11-16-2008, 03:12 PM   #3
firewiz87
Member
 
Registered: Jan 2006
Distribution: OpenSUSE 11.2, OpenSUSE 11.3,Arch
Posts: 240

Original Poster
Rep: Reputation: 37
Quote:
Originally Posted by rjlee View Post
Not sure what you mean by "run for all users"; a command is run by one user, or you could run it repeatedly for each user.

You can run a command at start-up, as the root user, by adding it into /etc/init.d/rc.local.

You can run a command for a particular user by adding it to that user's crontab, and using "@reboot" in the time-to-run fields.

If you want every user to run the command, I would add it to crontab, and maybe modify the adduser script to add a crontab entry in case you add any new users.

Hope that helps,

—Robert J Lee

By every user, i mean that the program should run irrespective of who logs in..... i d like to add that this program is a GUI program and can be run only after a user logs in....

I am completely new to linux..... what is a crontab and how do i add anything into it?? Plz help
 
Old 11-16-2008, 03:21 PM   #4
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware -current, 14.1
Posts: 1,019

Rep: Reputation: 157Reputation: 157
It would be helpful if you would clue us in as to your DE, and/or your WM, as running programs when X starts can vary accordingly.

That being said, you should be able to start rutilt (and any other program) by placing a suitable launch command in each user's .xinitrc file.
hth,

Last edited by mrclisdue; 11-16-2008 at 04:30 PM. Reason: clarification
 
Old 11-20-2008, 05:08 PM   #5
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 65
If you want every user to run the command when they log in, then you can usually just add the command to /etc/X11/Xsession (note the capital letters "X").

This is a shell script, consisting mostly of functions, but you should be able to add your command near the bottom (but above any "exit" lines).

Disadvantages (compared to each user's .xinitrc file) include the fact that this script is important to the correct running of your X session, so if you break anything then you'll break your GUI (so take a backup before you add your commands, just to make sure). But Xsession has the advantage of working for all users, and only needing to edit the change in one place.

Also, users won't be able to opt out of using it (which may be good or bad).

Crontab: A table of commands run by cron (http://en.wikipedia.org/wiki/Cron). To get instructions on editing it, you can type
Code:
man cron
and for the file format, see:
Code:
man 5 crontab
 
Old 11-21-2008, 03:18 PM   #6
firewiz87
Member
 
Registered: Jan 2006
Distribution: OpenSUSE 11.2, OpenSUSE 11.3,Arch
Posts: 240

Original Poster
Rep: Reputation: 37
Quote:
Originally Posted by mrclisdue View Post
It would be helpful if you would clue us in as to your DE, and/or your WM, as running programs when X starts can vary accordingly.

That being said, you should be able to start rutilt (and any other program) by placing a suitable launch command in each user's .xinitrc file.
hth,
I am using KDE.....

Modifying a file for each user is not possible..... i ll give it a try anyway.....

Last edited by firewiz87; 11-21-2008 at 03:23 PM.
 
Old 11-21-2008, 03:22 PM   #7
firewiz87
Member
 
Registered: Jan 2006
Distribution: OpenSUSE 11.2, OpenSUSE 11.3,Arch
Posts: 240

Original Poster
Rep: Reputation: 37
There are so many ways to do something in linux..... no wonder i love it.....

I ll give everything a try to see which works out best.....
 
  


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add a startup program in Linux?? Cypher12 Linux - General 3 01-19-2007 02:31 PM
Mandriva startup scripts (need to add something to startup before X starts) thunderweasel Mandriva 3 01-01-2006 12:55 AM
Add Program to startup Shadow2982 Linux - Newbie 1 02-27-2005 05:48 PM
how can i add a program to startup with RH 9.0 akohamen Linux - Networking 1 01-16-2005 04:10 AM
How to add program to startup? lamiczka Linux - Newbie 2 02-17-2004 07:37 PM


All times are GMT -5. The time now is 01:09 AM.

Main Menu
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