View previous topic :: View next topic |
Author |
Message |
martinc6 n00b
Joined: 28 Mar 2005 Posts: 29
|
Posted: Sat Apr 02, 2005 7:47 pm Post subject: Running comands at start up [SOLVED] |
|
|
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 |
|
|
0815Rabauke n00b
Joined: 28 Feb 2005 Posts: 9 Location: Gudensberg
|
Posted: Sat Apr 02, 2005 7:58 pm Post subject: |
|
|
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 |
|
|
martinc6 n00b
Joined: 28 Mar 2005 Posts: 29
|
Posted: Sat Apr 02, 2005 8:00 pm Post subject: |
|
|
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 |
|
|
statmobile Apprentice
Joined: 16 Jul 2004 Posts: 286 Location: Chapel Hill, NC
|
Posted: Sun Apr 03, 2005 4:35 pm Post subject: |
|
|
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 |
|
|
totencham Apprentice
Joined: 05 Dec 2004 Posts: 299 Location: Szczecin, Poland
|
Posted: Sun Apr 03, 2005 6:08 pm Post subject: |
|
|
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 |
|
|
zieloo Veteran
Joined: 28 Mar 2004 Posts: 1337
|
Posted: Sun Apr 03, 2005 6:55 pm Post subject: |
|
|
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 |
|
|
martinc6 n00b
Joined: 28 Mar 2005 Posts: 29
|
Posted: Mon Apr 04, 2005 10:18 pm Post subject: |
|
|
Thanks I got it working. |
|
Back to top |
|
|
statmobile Apprentice
Joined: 16 Jul 2004 Posts: 286 Location: Chapel Hill, NC
|
Posted: Mon Apr 04, 2005 10:35 pm Post subject: |
|
|
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 |
|
|
lousyd Apprentice
Joined: 15 Mar 2003 Posts: 166 Location: Des Moines
|
Posted: Mon Apr 04, 2005 10:41 pm Post subject: |
|
|
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 |
|
|
|