You are not logged in.

#1 2010-08-31 04:55:22

vahnx
Member
Registered: 2010-08-29
Posts: 10

[SOLVED] Running Two Commands at Boot

I've tried adding to the Startup Manager in Gnome and since that didn't work, I tried adding to rc.local to no avail. The only way I can run these scripts is manually through the terminal. The commands are to enable wireless and compiz:

wireless.sh
sudo wicd -foe
/usr/bin/wicd-client

compiz.sh
LIBGL_ALWAYS_INDIRECT=1 compiz --replace ccp & emerald --replace &

Here's what I put in rc.local

/etc/rc.local
#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
sh ~/Scripts/wireless.sh
LIBGL_ALWAYS_INDIRECT=1 compiz --replace ccp & emerald --replace &

Last edited by vahnx (2010-08-31 05:30:34)

Offline

#2 2010-08-31 05:16:41

yabasta
Member
Registered: 2010-05-01
Posts: 167

Re: [SOLVED] Running Two Commands at Boot

i'm pretty sure you can add wicd to your daemons list in rc.conf

Offline

#3 2010-08-31 05:20:00

doorknob60
Member
Registered: 2008-09-29
Posts: 403

Re: [SOLVED] Running Two Commands at Boot

They didn't work in rc.local since that loads before you log in (I think right after it finishes loading all the daemons). You'll need to run the full path (not using ~). Also, that won't help you with running GUI apps (like compiz, or the wicd tray icon). Also, if your sudo asks for a password that's probably why it doesn't work from Gnome startup (not sure about the compiz one, maybe try putting env before the command like "env LIBGL_ALWAYS_INDIRECT=1 compiz --replace ccp && emerald --replace" And oh yeah, to run another command it's "&&", not "&" (you can also use a wink

Last edited by doorknob60 (2010-08-31 05:21:31)

Offline

#4 2010-08-31 05:29:16

vahnx
Member
Registered: 2010-08-29
Posts: 10

Re: [SOLVED] Running Two Commands at Boot

I managed to get compiz at boot by using the Gnome Startup Manager to execute the compiz script, I had to add # /bin/sh into the file and chmod +x it. But it doesn't work for my WICD script. I just added the wicd daemon to rc.conf and that works big_smile
Thanks.

I've also shortened my compiz thingy to just "compiz --replace cpp & emerald --replace"

Last edited by vahnx (2010-08-31 05:30:48)

Offline

Board footer

Powered by FluxBB