i made this script for you... i've tried it with my firefox and it seems to work fine... but i'm a newbie, so i'm sure it has lot's of room for improvement... having said that, it basically does what it needs to do, it opens a new window and opens three URLs in three different tabs...
Code:
#!/bin/sh
# Put the URLs here:
URL1="http://www.slackware.com"
URL2="http://www.debian.org"
URL3="http://www.redhat.com"
# Check if Mozilla is already running:
mozilla -remote "ping()" &> /dev/null
# If it is, use that process to open the new window:
if [ $? == "0" ]; then
exec mozilla -remote "openURL($URL1,new-window)" &
sleep 2
exec mozilla -remote "openURL($URL2,new-tab)" &
exec mozilla -remote "openURL($URL3,new-tab)" &
# If it's not, start a new Mozilla process:
else
exec mozilla $URL1 &
sleep 3
# Open the other two URLs in new tabs:
exec mozilla -remote "openURL($URL2,new-tab)" &
exec mozilla -remote "openURL($URL3,new-tab)" &
fi
i couldn't find a way to make it work without the "sleep" commands, as if you try and open a tab before the window has come all the way up on the screen it fails (unless a window was already open, in which case the tabs would open in that window and the window with URL1 would be separate)...
try commenting the sleeps and you'll see you start getting errors... i know that mozilla takes a lot longer to load than firefox, so if you're getting the window errors, try increasing the sleep time a little... the sleep time you need depends on how fast your computer is, and how long it takes to get the window up...
okay man, please let me know if this works for you...
good luck...