LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 11-12-2004, 04:36 PM   #1
GUIPenguin
Member
 
Registered: Aug 2004
Location: Maine
Distribution: Gentoo Linux
Posts: 239

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

Last edited by GUIPenguin; 11-12-2004 at 04:47 PM.
 
Old 11-12-2004, 04:50 PM   #2
rusty_slacker
Member
 
Registered: Sep 2004
Location: Mars, right next to the UAC base
Distribution: Fedora Core 3/Knoppix 3.4
Posts: 138

Rep: Reputation: 15
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?
 
Old 11-12-2004, 04:55 PM   #3
GUIPenguin
Member
 
Registered: Aug 2004
Location: Maine
Distribution: Gentoo Linux
Posts: 239

Original Poster
Rep: Reputation: 30
I dont run any X sessions or KDE
my box has no gui
 
Old 11-12-2004, 04:55 PM   #4
wolfe2554
Member
 
Registered: Apr 2003
Location: denver co
Distribution: redhat9
Posts: 156

Rep: Reputation: 30
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
 
Old 11-12-2004, 04:56 PM   #5
rusty_slacker
Member
 
Registered: Sep 2004
Location: Mars, right next to the UAC base
Distribution: Fedora Core 3/Knoppix 3.4
Posts: 138

Rep: Reputation: 15
then, what's with the name?
 
Old 11-12-2004, 05:06 PM   #6
GUIPenguin
Member
 
Registered: Aug 2004
Location: Maine
Distribution: Gentoo Linux
Posts: 239

Original Poster
Rep: Reputation: 30
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
 
Old 11-12-2004, 05:20 PM   #7
wolfe2554
Member
 
Registered: Apr 2003
Location: denver co
Distribution: redhat9
Posts: 156

Rep: Reputation: 30
sorry I recommend that you use the rc.local file to run it.
 
Old 11-12-2004, 06:15 PM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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 )
 
Old 11-13-2004, 02:06 AM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

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


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to run xscreensaver when x starts darkleaf Linux - Software 5 05-20-2005 05:25 PM
how to run linux command from java program? ranger225 Linux - Newbie 1 11-10-2004 06:55 AM
Run a program when a connection starts hamtavs Linux - Software 1 09-21-2004 05:11 AM
How to specify what starts when startx command charlie.babitt Slackware 2 05-22-2004 03:28 PM
Run programs automatically when KDE starts koyi Linux - General 2 09-01-2003 06:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:04 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
Open Source Consulting | Domain Registration