LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Mozilla Profiles and Program Script - simple (https://www.linuxquestions.org/questions/linux-software-2/mozilla-profiles-and-program-script-simple-186293/)

LinuxBot5000 05-26-2004 07:59 PM

Mozilla Profiles and Program Script - simple
 
I'm sure it has been asked before, but after nearly an hour of fruitless searching, I have come to the forums... when using Mozilla, opening a second browser brings up a Profile Manager, I'm not about to create 10 profiles just to use Mozilla, and yes I am aware that pressing CTRL+T opens a new tab and CTRL+N opens a new window, but I'm also not about to go from Desktop 8 where I am working to Desktop 2 just to open a new browser, so I'd like to know how I can get around the profile manager and open several Mozillas for use with the same profile (default) ... I have seen something about editing a file in /usr/X11R6/bin/mozilla ...but I have no such file or directory in that location... I run RedHat 8.0 and Mozilla 1.6 ... Mozilla is installed in /usr/local/mozilla/ and profiles are in /$HOME/.mozilla/ ... any help would be greatly appreciated... I also have another question, how would I go about running a certain Application every time I start X? I need to open KMix when I start X so that XMMS works, but I do not wish to manually start it every time... any help with opening it upon X's booting would also be greatly appreciated...

Tinkster 05-26-2004 08:05 PM

http://www.linuxquestions.org/questi...mozilla+remote




Cheers,
Tink

LinuxBot5000 05-27-2004 06:43 PM

it didn't work, care to try again?

Tinkster 05-27-2004 07:35 PM

What didn't work, care to be more specific, like
in even providing an error message?



Cheers,
Tink

LinuxBot5000 05-27-2004 09:31 PM

I created the file run_moz.sh file as instructed in /usr/local/mozilla/ (where my mozilla is located) and gave the file execution perimssion, I then took the icon on my KDE Control Panel and changed it from running /usr/bin/htmlview to /usr/local/mozilla/mozilla and changed its pointing from /usr/share/applications/redhat-web.desktop to /usr/local/mozilla/run_moz.sh ... the Mozilla icon changed to a gear and I could no longer alter the Preferences for it... upon clicking that icon, mozilla would open, but a second click would bring up the profile manager, just as before... I tried another method in which I tried to run run_moz.sh but received the error " Cannot find the program 'run_moz.sh' " as I had expected it to (doesn't hurt to try though, eh?) ... I am curious, do I need to specify the full path to mozilla inside the run_moz.sh file?

Ex:
Code:

#!/bin/sh
if /usr/local/mozilla/mozilla -remote "ping()";
then
if test "$1" != ""
then
/usr/local/mozilla/mozilla -remote "openURL($1,new-window)";
else
/usr/local/mozilla/mozilla -remote "xfeDoCommand (openBrowser)";
fi
else
/usr/local/mozilla/mozilla -width 800 -height 600 $1;
fi;

I assumed I did not have to, being as it is already in the same directory as the mozilla script... what to do now?

[ Edit: I tried the full path in the run_moz.sh file, it did not do any better, as I expected... ]

Tinkster 05-27-2004 09:41 PM

I can only start guessing now ... I'm not too familiar with
DeadRat. You installed Mozilla from source or a different
source than DR RPM's? I'm almost certain that DR wouldn't
use /usr/local ...

Did you uninstall the original RPM?
What result does 'which mozilla' give you?



Cheers,
Tink

LinuxBot5000 05-28-2004 12:48 AM

I installed from the file: mozilla-i686-pc-linux-gnu-1.6-installer.tar.gz
at
http://ftp.mozilla.org/pub/mozilla.o...staller.tar.gz

I did uninstall all of Mozilla1.0.1's files and directories before installing Mozilla 1.6 and I am positive Mozilla 1.6 is installed at /usr/local/mozilla/

as for the results i get from "which mozilla" ...
[user@localhost /]# which mozilla
/usr/bin/which: no mozilla in (/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/$HOME/bin)

Tinkster 05-28-2004 03:38 AM

What error messages does the modified script (with
full path's) produce when you run it from a console?


Cheers,
Tink

LinuxBot5000 05-28-2004 02:58 PM

when I run 'run_moz.sh' (with full paths) in console, it opens several mozillas on the default profile, as we were hoping for... so it seems to be working now... odd... well, thank you for your help, do you know of any way I would be able to start KMix every time I boot into my X Server?

Tinkster 05-28-2004 05:11 PM

Actually KDE would normally remember that. If you
have turned session saving off you can add it to

~/.kde/Autostart ...


Cheers,
Tink

LinuxBot5000 05-28-2004 07:05 PM

thanks a lot man, adding it to ~/.kde/Autostart/ worked

ashutoshmahajan 06-15-2004 11:44 PM

LinuxBot5000, your code works very good. thanks, it solved a lot of problems. however i suggest reversing the if condition to make it possible to open files stored locally properly on doubleclicking. the modified script should be:

#!/bin/sh
if mozilla -remote "ping()";
then
if test "$1" = ""
then
mozilla -remote "xfeDoCommand (openBrowser)";
else
mozilla -remote "openURL($1,new-window)";
fi
else
mozilla -width 800 -height 600 $1;
fi;

note the change in the second if condition and reversing the order of 'mozilla -remote' commands.


All times are GMT -5. The time now is 03:39 AM.