Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Running comands at start up [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
martinc6
n00b
n00b


Joined: 28 Mar 2005
Posts: 29

PostPosted: Sat Apr 02, 2005 7:47 pm    Post subject: Running comands at start up [SOLVED] Reply with quote

I was wondering if there was a way to send some commands to Linux while KDE starts up.

The problem is my network card doesn't automatically connect to a network so I just need to type this into a terminal after KDE has started:
Code:
iwconfig eth1 essid Workgroup
ifconfig eth1 up
dhcpcd eth1


Is there a way to send these commands automatically? Sorry for any vagueness I'm a linux newbie.


Last edited by martinc6 on Mon Apr 04, 2005 10:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
0815Rabauke
n00b
n00b


Joined: 28 Feb 2005
Posts: 9
Location: Gudensberg

PostPosted: Sat Apr 02, 2005 7:58 pm    Post subject: Reply with quote

Hi!

I think try this:

Config your eth1 in /etc/conf.d/net
Then start your Card that way:
Code:
/etc/init.d/net.eth1 restart
note there must be a start script if not copy net.eth0 to net.eth1.
If that works, your Config is correct, then tell the Default Runlvel to start your eth1 at startup:
Code:
rc-update add net.eth1 default
now eth1 would be started at Linux startup.

I hope this would help, otherwise ignore my answer, I'm a newbie,too! :)
Back to top
View user's profile Send private message
martinc6
n00b
n00b


Joined: 28 Mar 2005
Posts: 29

PostPosted: Sat Apr 02, 2005 8:00 pm    Post subject: Reply with quote

I don't believe that would work because this is a PCMCIA card which is started with PCMCIA. I forgot to say that sorry.
Back to top
View user's profile Send private message
statmobile
Apprentice
Apprentice


Joined: 16 Jul 2004
Posts: 286
Location: Chapel Hill, NC

PostPosted: Sun Apr 03, 2005 4:35 pm    Post subject: Reply with quote

Code:

/etc/conf.d/local.start

Is where you can put commands to start automatically when booted. Just make sure you have local starting at boot time.
Code:

rc-udpate add local boot

This is when starting up the kernel, and not specifically for KDE. Hope this helps.
_________________
Comp Specs:
Asus A7V(rev1.02)|AMDXP2100+@1.7GHz|Creative SB128PCI|32MB NVIDIA/TNT2AGP|512MBPC-133
Back to top
View user's profile Send private message
totencham
Apprentice
Apprentice


Joined: 05 Dec 2004
Posts: 299
Location: Szczecin, Poland

PostPosted: Sun Apr 03, 2005 6:08 pm    Post subject: Reply with quote

To start a program or command on kde startup, create a shortcut to a program/command (right click on desktop -> Create New -> Link To Application) and move it to ~/.kde/Autostart/.
_________________
http://gentoo-wiki.com/HOWTO_Index
cd /usr/src/linux && egrep -ir "( fuck)|( shit)" *
Linux registered user #376896
Back to top
View user's profile Send private message
zieloo
Veteran
Veteran


Joined: 28 Mar 2004
Posts: 1337

PostPosted: Sun Apr 03, 2005 6:55 pm    Post subject: Reply with quote

totencham wrote:
To start a program or command on kde startup, create a shortcut to a program/command (right click on desktop -> Create New -> Link To Application) and move it to ~/.kde/Autostart/.


I'm afraid that it's not possible when logged in as a normal user. dhcpcd requires root privileges so you'll need to do this unless to want to su to root every time you'll need net:
Code:
chmod a+s /sbin/dhcpcd


Anyway, all the commands you want to be executed while booting should be placed in /etc/conf.d/local.start just like statmobile stated. And that's the best way accomplish this.
Back to top
View user's profile Send private message
martinc6
n00b
n00b


Joined: 28 Mar 2005
Posts: 29

PostPosted: Mon Apr 04, 2005 10:18 pm    Post subject: Reply with quote

Thanks I got it working.
Back to top
View user's profile Send private message
statmobile
Apprentice
Apprentice


Joined: 16 Jul 2004
Posts: 286
Location: Chapel Hill, NC

PostPosted: Mon Apr 04, 2005 10:35 pm    Post subject: Reply with quote

It may help future readers if you explain exactly what it is you wanted, and how you got it done. I'm not even that sure myself. ;)
_________________
Comp Specs:
Asus A7V(rev1.02)|AMDXP2100+@1.7GHz|Creative SB128PCI|32MB NVIDIA/TNT2AGP|512MBPC-133
Back to top
View user's profile Send private message
lousyd
Apprentice
Apprentice


Joined: 15 Mar 2003
Posts: 166
Location: Des Moines

PostPosted: Mon Apr 04, 2005 10:41 pm    Post subject: Reply with quote

martinc6 wrote:
Thanks I got it working.

That is kind of rude.
_________________
Minds are like parachutes... Most people will do their damnedest to avoid having to use one.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum