LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   run command evertime linux starts up (https://www.linuxquestions.org/questions/linux-general-1/run-command-evertime-linux-starts-up-254132/)

GUIPenguin 11-12-2004 04:36 PM

run command evertime linux starts up
 
I need to run the command
ifconfig eth1:1 67.20.159.164 netmask 0.0.0.0
and
ping -i 3 -I 67.20.159.164 192.168.100.1

everytime Linux starts
this is for my IPcop linux router box but the distro should'nt matter

thanks alot!

rusty_slacker 11-12-2004 04:50 PM

well, i don't know if this will help, but i learned a trick with kde: if you leave a program open when you end your session, then it will start up next time you log in again

what donuts do u like?

GUIPenguin 11-12-2004 04:55 PM

I dont run any X sessions or KDE
my box has no gui

wolfe2554 11-12-2004 04:55 PM

why, don't you just pop them in the start section of your networking daemon? open /etc/init.d/network and look for the start) part then insert the code making sure not to put it between if and fi.
there are other ways too.
cd /etc/rc.d
edit the rc.local file
and insert code
and save

wolfe

rusty_slacker 11-12-2004 04:56 PM

then, what's with the name?

GUIPenguin 11-12-2004 05:06 PM

Ok wolfe2554, thanks, i'll try

Quote:

rusty_slacker: then, what's with the name?
Well I only prefer not to have a gui on my servers and things that dont really need them, and slow them down, like my webserver and my router, there isnt a need for a gui if you dont need it :)

wolfe2554 11-12-2004 05:20 PM

sorry I recommend that you use the rc.local file to run it.

jschiwal 11-12-2004 06:15 PM

If you are not very tight for disk space, installing X windows and a lightweight windows manager shouldn't hurt. Just have your server boot up into init level 3. When you want to run a gui application, enter 'init 5' ( Note: A few distro's use run level 4 for xwindows )

jschiwal 11-13-2004 02:06 AM

Is X-windows (run level 5) needed on remote server to run a GUI program remotely?
 
My response came up when loading live-bookmarks in Firefox, and I had a related thought, which others may be able to answer. Doesn't one need x-windows running on a server to be able to ssh into a server and use a program in the local gui. Ssh will run the program on the server with the DISPLAY variable of 'localhost:0,10'. How about if one remotely runs a program on the server without ssh with a display variable, or -display option, of '<remotehost>:0.0'. Is it possible to run a program remotely then, if the remote computer isn't running x-windows. In other words, when the local computer is the X-Windows server, does a program on the remote host need to be running X-windows in order for the application to be the client. Remember that the client-host relationship using x-windows is reversed with the terminal that person is using being the server, and the server-computer is running the client-application.

I hope this post is related enough to the original. I'm not trying to hijack the post. I'ts just that someone with similar thoughts as GUIPenguin may want to consider this.


All times are GMT -5. The time now is 06:07 AM.