[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU IceCat and use with the alternate profile option

From: rmyster
Subject: Re: GNU IceCat and use with the alternate profile option
Date: Sun, 2 Dec 2007 13:57:20 -0700

On 12/1/07, Giuseppe Scrivano <address@hidden> wrote:
> I modified the patch offered on bugzilla.mozilla.org to match our
> needs, it creates and uses the ~/.gnuzilla/icecat directory to store
> profiles data.
> It is not completely clean gAppData->name should be "icecat" and not
> "firefox" without hardly-code the value we want, but at moment it is
> acceptable to fix this problem.
> Giuseppe
> --- ./toolkit/xre/nsXREDirProvider.cpp 2007-05-08 21:25:29.000000000 +0200

Confirmed. With the patch applied, icecat now respects the
--with-user-appdir=.<name> option.

Here's an outline of the steps used in my testing
1. applied ./toolkit/xre/nsXREDirProvider.cpp patch

2. set ac_add_options --with-user-appdir=.gnuzilla8 in .mozconfig
(chose alternate name deliberately for the test)

3. applied variation of the zhack-b script mentioned in earlier post:

for i in `grep -irl run-icecat.sh ./*`; do
sed -i 's/run-icecat.sh/run-icecat.sh/g' $i;done

for i in `grep -rl 'MOZ_USER_DIR="\.mozilla" ' ./*`; do
sed -i 's/MOZ_USER_DIR="\.mozilla"/MOZ_USER_DIR="\.icecat"/g' $i; done

sed -i 's/MOZ_APP_NAME=mozilla/MOZ_APP_NAME=icecat/g' ./configure
sed -i 's/MOZ_APP_NAME=firefox/MOZ_APP_NAME=icecat/g' ./configure
sed -i 's/MOZ_APP_DISPLAYNAME=BonEcho/MOZ_APP_DISPLAYNAME=IceCat/g' ./configure
sed -i 's/MOZ_APP_DISPLAYNAME=Firefox/MOZ_APP_DISPLAYNAME=IceCat/g' ./configure
sed -i 's/firefox/icecat/g' ./configure

4. compiled with all other defaults unchanged
make -C xpinstall/packager

creates icecat- with
"make -C xpinstall/packager".

The created icecat script executed and the profile folder was created at
~/.gunzilla8/icecat corresponding to the --with-user-appdir=.gnuzilla8
.mozconfig option used so all looks good.

Notes that may be  of interest:

The "icecat" script that is created during the compile still shows the
line "MOZ_USER_DIR=".mozilla/icecat" but it doesn't appear to affect anything
and it may not matter.  It appears the script is just a fancy way of
running the binary directly:

sh /path/to/run-icecat.sh /path/to/icecat-bin

which can take options like "-ProfileManager" & alternate profiles just like
when icecat is started from the icecat script. It can also be used to start
with an alternate profile folder location(same functionality as icecat

sh /path/to/run-icecat.sh /path/to/icecat-bin -profile /path/to/newprofiledir

And in case anyone is curious, another discussion at
suggested editing nsXREAppData in ./browser/app/nsBrowserApp.cpp which
seems to work in a slightly different manner. Editing "nsBrowserApp.cpp" can
also be used to change the default location of the profile folder but does
not respect the "--with-user-appdir=" .mozconfig option.

In the tests I did, editing the nsXREAppData portion of the nsBrowserApp.cpp
file with the following changes produces the corresponding results for the
default location of the profile folder upon startup:
"Mozilla" to "gnuzilla" and "Firefox" to "IceCat"  creates  ".gnuzilla/icecat"
"Mozilla" to "GNUzilla" and "Firefox" to "IceCat"  creates ".gnuzilla/icecat"
"Mozilla" to "testing" and "Firefox" to "IceCat"  creates ".testing/icecat"
"Mozilla" to "Snake" and "Firefox" to "Oil"  creates ".snake/oil"

Apparently, the changes are not case sensitive.

However, when using the nsBrowserApp.cpp edit versus the nsXREDirProvider.cpp
patch, the icecat script file that is created after compiling still contains
run-mozilla.sh entries instead of run-icecat.sh entries even though the same
variation of the zhack-b script(mentioned above) was applied in both

In the nsBrowserApp.cpp testing,  the "--with-user-appdir=.<newname>" option
will still create a new empty folder but the actual profile folder name
seems to be affected by the  "Mozilla" entry under the nsXREAppData section
of the nsBrowserApp.cpp file and the icecat subdirectory that actually
contains the profile folders is affected by the "Firefox" entry.  In other
words(using nonsense terms), if "Mozilla" was changed to "Black"
and "Firefox" was changed to "Dog", a default profiles folder would be
created under "~/.black/dog" upon startup after compiling.

In summary, the ./toolkit/xre/nsXREDirProvider.cpp patch in combination with
relevant zhack-b script portions applied seems to address all issues since it
creates an executable icecat script and respects
the --with-user-appdir=<name> option.

The nsBrowserApp.cpp test edit mentioned above does not respect
the --with-user-appdir=<name> option and requires a manual edit of the
nsBrowserApp.cpp file to specify a default profile location.  It also
requires a manual edit of the "icecat" script after compiling to replace
the "run-mozilla.sh" entries with "run-icecat.sh" in order for the "icecat"
script to execute properly.  Whether these changes would work on mac
or window compiles is unknown.

Thanks for the suggestions.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]