Hi there everyone. I’ve installed an utility for monitoring web traffic ,called WebScarab. I’ve set in firefox to use it as proxy server and now I have to start WebScarab before I can start the browser, which is ok, but now I would like to make a shortcut on my desktop, which would first start WebScarab and then firefox, to automate the process. I tried entering the command of the shortcut like this
Oh I think you’re problem is that it’s not running the commands asynchroniously, so it is waiting for the first one to finish. I guess I’m not too sure how to do it in one command, you probably need an & somewhere though and I don’t know how to fit it in one command.
Have you tried launching from a bash script? That’s generally my go to solution for launchers, I find they’re pretty simple and flexible (i.e. if you need to set environmental variables, or the starting directory, etc. you can). here maybe:
Actually I don’t know what the %u in the command you gave does, so I don’t know where it would go. Here the & is what makes the first one run as a different process.
Then you save it as FILENAME, and for the command in the launch you either use:
sh FILENAME
or else you first use
chmod +x FILENAME
from the command line and use as a launch command just
FILENAME
Hope that helps, there is almost certainly a way to get it into one command also I just don’t know what it is.
The ‘&&’ doesn’t work the way you expect it to. Try replacing the ‘&&’
with just ‘&’ and I think it will be a little better for you.
Good luck.
On 09/11/2010 07:06 AM, arcull wrote:
>
> Hi there everyone. I’ve installed an utility for monitoring web traffic
> ,called WebScarab. I’ve set in firefox to use it as proxy server and now
> I have to start WebScarab before I can start the browser, which is ok,
> but now I would like to make a shortcut on my desktop, which would first
> start WebScarab and then firefox, to automate the process. I tried
> entering the command of the shortcut like this
> Code:
> --------------------
> java -jar “/home/arcull/WebScarab/webscarab.jar” && firefox %u
> --------------------
> but it doesn’t work, browser doesn’t start. Please help, thanks in
> advance.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
as malcolm81 suggested, and then run the script on the shortcut. The results are better, but still not perfect. The problem seems, that starting up WebScarab takes more time than starting up firefox, therefore firefox shows up first, saying it can not connect to proxy. So I guess I should include a few seconds of delay between both commands. So I tried like this
try
Code:
#!/bin/bash
java -jar "/home/arcull/WebScarab/webscarab.jar" &
sleep 5
firefox
without the & after sleep. You want those run in succession, not asynchroniously (they are both starting at the same time in the original.)
Malcolm
Works ok, thanks Is there any switch available to run an app minimized? In my case, I would prefer webscarab starting minimized. Thanks again.
I am not sure there’s a likewise command for GNOME / Metacity, but there’s a tool called →Devil’s Pie which obviously lets you manage it in a convenient way, so give it a shot.