PDA

View Full Version : How to put 2 orders in a starter


abcdabcd2
August 27th, 2007, 08:58 AM
Hello
I have a little question:
How to put 2 orders in 1 starter?
compiz --replace & avant-window-navigator just compiz starts
avant-window-navigator & compiz --replace just avant starts
:confused:

DivineGod
August 27th, 2007, 12:17 PM
you'll need to AND the opperations with the && operator instead of using &.

joeyjwc
August 27th, 2007, 03:12 PM
Do you want to start both at once?


#!/bin/bash
compiz --replace &
avant-window-navigator &


The & there forks the process to the background.

&& is used for starting one thing after another.

For example:

#!/bin/bash
sleep 10 && echo "Hello, world!"


This will sleep for 10 seconds and then spit out "Hello, world!" The sleep command has to complete before the echo command can work.


I'm pretty sure you want my first example, with both processes running at once.

abcdabcd2
August 27th, 2007, 04:55 PM
compiz --replace && avant-window-navigator
To put this in a starter?

delfick
August 27th, 2007, 05:08 PM
do it with only one &

compiz --replace & avant-window-navigator

(also, if you want to be able to use ccsm to configure compiz, use "compiz --replace ccp")

:D

hyperair
August 27th, 2007, 05:22 PM
I reckon it's "compiz --replace ccp" not "cpp".

delfick
August 28th, 2007, 02:31 AM
oops. my bad, it is ccp, was past midnight when i typed that :p

abcdabcd2
August 30th, 2007, 07:12 PM
compiz --replace & avant-window-navigator

doesnt work

delfick
September 1st, 2007, 04:18 AM
what happens instead?

abcdabcd2
September 1st, 2007, 02:31 PM
when compiz stands first, only compiz starts, when i put awn at first only awn starts:confused:

delfick
September 1st, 2007, 05:00 PM
weird, only having one & works for me ....

do something like

gedit & gvim

does that work ??

abcdabcd2
September 2nd, 2007, 04:23 PM
Yes, but rhythmbox & gnome-terminal doesnt work (only rhythmbox)
and rhythmbox && gnome-terminal " "