The username may be available on nsIUserInfo:
http://mxr.mozilla.org/mozilla-central/source/toolkit/components/startup/public/nsIUserInfo.idl
The profile name is not available, because the user may not be using a named
profile, (e.g. they are using the -profile flag).
--BDS
Thanks.
Any hint where to look for Profile info if I want to write my own XPCOM
interface.
I would like to derive the profile name from the profile directory path
(ProfD) but I need access to
information in profiles.ini file. The profile chooser XUL dialog already
access the info in the profiles.ini file.
Which is interface profile chooser uses to display the profiles.ini file.
Any help in identifying source file for processing the profiles.ini file
is greatly appreciated.
--
Subrata
Found the profile manager interface:
http://mxr.mozilla.org/mozilla-central/source/profile/public/nsIProfile.idl
--
Subrata
> Found the profile manager interface:
> http://mxr.mozilla.org/mozilla-central/source/profile/public/nsIProfile.idl
That interface is not implemented or supported. The information you want is
really not available at all. The only way you'd get at it is by reading
profiles.ini yourself and matching the name up with the current ProfD.
I do not recommend getting or using the profile name for anything. Needing
it is the sign of a design error of some sort.
--BDS
----- Original Message ----
> From: Benjamin Smedberg <benj...@smedbergs.us>
> I do not recommend getting or using the profile name for anything. Needing
> it is the sign of a design error of some sort.
Ben,
How might you recommend uniquely identifying an installation if not through profile name?
Thanks,
Eric
What do you mean by "an installation"? If you install multiple versions of
Firefox, they still share the same profile, and so that's not unique per
installation on that machine.
And 99.99% of all profiles are called "default".
--BDS
Benjamin Smedberg wrote:
> Subrata Mazumdar wrote:
>
>
>> Found the profile manager interface:
>> http://mxr.mozilla.org/mozilla-central/source/profile/public/nsIProfile.idl
>>
>
> That interface is not implemented or supported. The information you want is
> really not available at all. The only way you'd get at it is by reading
> profiles.ini yourself and matching the name up with the current ProfD.
>
>
I have realized that it does not work - thanks for confirming it.
> I do not recommend getting or using the profile name for anything. Needing
> it is the sign of a design error of some sort.
>
I use a number development profiles - one for each project. I would
just like to show the profile name
in the status bar just indicate which profile a particular browser
instance is using.
I would also like to create a scratch directory for per profile per user
in the OS specific temp directory.
These are mostly related to keeping testing data of my add-on- nothing
to do with actual operation of the add-ons. I could also use
leaf-name of the profile directory path to avoid any issues with
obtaining profile-name.
Thanks for help.
--
Subrata
> --BDS
>
You can probably just show the value of ProfD then:
http://developer.mozilla.org/en/Code_snippets/File_I%2F%2FO
jjb