Open
Bug 1105429
Opened 11 years ago
Updated 3 years ago
createprofile switch doesn't provide clear output about what it does / what fails, is trailing-slash-sensitive on Windows, doesn't deal with multiple spaces in its argument
Categories
(Toolkit :: Startup and Profile System, defect)
Tracking
()
NEW
People
(Reporter: bawittmeier, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.0; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 20141125030206
Steps to reproduce:
Issue this command or similar:
<driveID>:\firefox\firefox.exe -CreateProfile "Butch c:\mozilla\profiles"
Actual results:
c:\mozilla\profiles does not exist
No entry in the profile manager for Butch exists
Expected results:
If I understand correctly. I'm on Vista Ultimate 32bit.
c:\mozilla\profiles\Butch directory should have been created
Should have made an entry in the profile manager listing for Butch
May see different results on different O/S
Comment 1•11 years ago
|
||
Where do you get the idea this syntax should work? The code lives here: http://mxr.mozilla.org/mozilla-central/source/toolkit/xre/nsAppRunner.cpp#2258 . AFAICT the format of your arguments is wrong.
Component: Untriaged → Startup and Profile System
Flags: needinfo?(bawittmeier)
Product: Firefox → Toolkit
From this page:
https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#-CreateProfile_profile_name
This is taken right from the help page.
-CreateProfile "profile_name profile_dir"
Creates a new profile named profile_name in the profile_dir directory, but do not start application. Note profile_name and profile_dir are quoted together.
NOTE: profile_dir must not exist and you must not already have a profile called profile_name.
firefox -CreateProfile "JoelUser c:\internet\moz-profile"
Perhaps this should be noted:
firefox -CreateProfile "JoelUser c:\internet\moz-profile\JoelUser"
I appreciate you letting me know I was wrong but could you possibly make a better contribution to your reasoning? Maybe I need to send you $5.00.
Flags: needinfo?(bawittmeier)
Comment 3•11 years ago
|
||
(In reply to Bruce from comment #2)
> From this page:
> https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#-
> CreateProfile_profile_name
>
> This is taken right from the help page.
>
>
> -CreateProfile "profile_name profile_dir"
>
> Creates a new profile named profile_name in the profile_dir directory, but
> do not start application. Note profile_name and profile_dir are quoted
> together.
>
> NOTE: profile_dir must not exist and you must not already have a profile
> called profile_name.
>
> firefox -CreateProfile "JoelUser c:\internet\moz-profile"
>
> Perhaps this should be noted:
> firefox -CreateProfile "JoelUser c:\internet\moz-profile\JoelUser"
>
> I appreciate you letting me know I was wrong
I was actually not sure, and on closer reading, I think I'm wrong myself! Sorry for being overly brief. Did the second syntax do what you expected?
Reading your message, I reread the code I pointed to. The quoting does seem to be the right thing to do here (which surprises me to begin with!). However, note that your initial input here had two spaces (as posted on bugzilla, anyway), which at least in my testing on OS X also doesn't work at all - we should probably fix that. :-\
I would agree that the wording on the wikipage is ambiguous (and will try to fix that right after posting this), but I guess it assumes that "C:\internet\moz-profile" is the intended directory for the profile to be created in - that is to say, it will be created exactly there, not in its subfolder.
> but could you possibly make a
> better contribution to your reasoning? Maybe I need to send you $5.00.
I'm... not sure why you think you need to send me money, but nope, please don't! :-)
Comment 4•11 years ago
|
||
I've updated the documentation for https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#-CreateProfile_profile_name and the next subsection. Can you verify it is more clear now? (you may need to force-refresh (ctrl-shift-r/ctrl-f5) to get past whatever caching on the wiki)
I'm going to make this bug be about providing better output and fixing the double-space issue.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(bawittmeier)
OS: Windows Vista → All
Hardware: x86 → All
Summary: profile manager does not create directories for new profiles → createprofile switch doesn't provide clear output about what it did, doesn't deal with multiple spaces in its argument
I was being a little sarcastic about the $5.00. Sorry.
The wording on the help page makes sense, but my understanding of the code does not seem to work. I believe I have applied all the rules for the syntax.
I understand the statement ... separated by 1 space
These do not work
g:\Firefox\Firefox.exe -CreateProfile "BUTCH c:\mozilla\profiles"
g:\Firefox\Firefox.exe -CreateProfile "BUTCH c:\mozilla\profiles\"
What I expect from these commands ~
Call the program Firefox.exe << this should not start - not required
Create a directory c:\mozilla\profiles or c:\mozilla\profiles\BUTCH
- I assume this command will create a directory << maybe this is wrong
- this cannot preexist << no problem
Create a profile under the newly created directory named BUTCH
Put an entry in the Profile Manager
It doesn't matter which one is created but as it is neither is created
~~~~~~~~~~~~
Execute firefox -p << starts the profile manager
Select BUTCH << should launch Fx with the pofile BUTCH
When the profile BUTCH executes from the profile manager, the above directory/BUTCH is populated with the core files
~~~~~~~~~~~~
What actually happens with the above command
- No directories created of either style
- No entry of BUTCH in the profile manager
Tell me if/where my logic is incorrect using the above as the example
If you would, please send/post a command of the like that works on Windows Vista Ultimate 32 bit
Here is what prompted the discussion and other user comments.
http://forums.mozillazine.org/viewtopic.php?f=38&t=2891531
Thanks for your effort.
Flags: needinfo?(bawittmeier)
Comment 6•11 years ago
|
||
Hmm, that's puzzling. The short answer is, I'm not sure. Two questions to narrow this down a bit:
Does "C:\mozilla" exist already?
When you execute the command, is Firefox running?
As best I can tell from nosing around the code some more, assuming Firefox can find the defaults for creating new profiles (somewhere in the app directory), it'll try to copy those. That will fail if the parent directory doesn't exist.
If it can't find the defaults, it will try to create the directory. I *think* it does this recursively and could/should in theory work - but I know Windows can be finnicky about allowing you to create C:\whatever, ie root folders on the drive. Have you checked that's not the issue here?
In the meantime, I'll experiment with this some more on my Windows machine instead of my mac...
Flags: needinfo?(bawittmeier)
Comment 7•11 years ago
|
||
So for me,
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" --createprofile ...
doesn't work while Firefox is running, I need to add --no-remote. Otherwise I just get another Firefox window.
Then:
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" --no-remote --createprofile "Test-removeme C:\Thisisatest\someprofile\"
gets me a dialog that the profile cannot be found and may be missing. It creates C:\Thisisatest, but not C:\Thisisatest\someprofile. It also doesn't add an entry in the profile manager.
Removing C:\Thisisatest\, and trying:
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" --no-remote --createprofile "Test-removeme C:\Thisisatest\someprofile"
(note lack of trailing slash)
quits without any other messages, but seems to do the Right Thing in that it creates both directories and adds two files to the inner dir, and lists the profile in the profile manager. That directory itself (and not "C:\Thisisatest\someprofile\Test-removeme") is then populated once using it.
Let me know if after this, you still have problems. I'm updating this bug to reflect the slash issue...
Summary: createprofile switch doesn't provide clear output about what it did, doesn't deal with multiple spaces in its argument → createprofile switch doesn't provide clear output about what it does / what fails, is trailing-slash-sensitive on Windows, doesn't deal with multiple spaces in its argument
My Firefox is not on my C drive or the directory you posted.
I am able to create new profiles with the profile manager and I am able to use other directories if I so select in the profile creation process.
I note that in some cases you are using "--" two dashes. Is there a need for this?
=== First post in bug
In my tests:
>Does C:\mozilla already exist? No.
>When you execute the command is Firefox running? No. If it is running it just opens a new tab which is how I have it configured. Yours you indicate opens a new window.
I am familiar with the -no-remove argement but not using it in this discussion. I'm just trying from a DOS/CMD window, a batch file or the Start/Run - but Fx is NOT running or loaded in memory.
=== Second post in bug
"g:\Firefox\firefox.exe" --no-remote --createprofile "Test-removeme C:\Thisisatest\someprofile\"
Dialog box message: Your firefox profile cannot be loaded. It may be missing or unaccessible.
This created the directory c:\Thisisatest but no subdirectory
No entry in the profile manager is created
===
>gets me a dialog that the profile cannot be found and may be missing. It creates C:\Thisisatest, but not C:\Thisisatest\someprofile. It also doesn't add an entry in the profile
manager.
I get the same result
===
>"g:\Firefox\firefox.exe" --no-remote --createprofile "Test-removeme C:\Thisisatest\someprofile"
I get the same result
There is an entry in the profile manager "Test-removeme"
Here is where the problem lies. There is no directory "Test-removeme"
The files are in the someprofile directory so the Test-removeme directory is meaningless but is the profile name.
If you go to about:support in the URL box click show folder it will show the contents of someprofile rather than Test-removeme << because it does not exist.
===
So yours is creating the Test-removeme subdirectory and mine is not :)
Flags: needinfo?(bawittmeier)
Comment 9•11 years ago
|
||
(In reply to Bruce from comment #8)
> My Firefox is not on my C drive or the directory you posted.
Right, sure, I was just copying the exact commands I'd used - the location of Firefox itself doesn't matter.
> I am able to create new profiles with the profile manager and I am able to
> use other directories if I so select in the profile creation process.
>
> I note that in some cases you are using "--" two dashes. Is there a need
> for this?
No, just habit because I use other OSes as well as Windows - single dash will work on Windows.
> === First post in bug
> In my tests:
> >Does C:\mozilla already exist? No.
> >When you execute the command is Firefox running? No. If it is running it just opens a new tab which is how I have it configured. Yours you indicate opens a new window.
>
> I am familiar with the -no-remove argement but not using it in this
> discussion. I'm just trying from a DOS/CMD window, a batch file or the
> Start/Run - but Fx is NOT running or loaded in memory.
>
> === Second post in bug
>
> "g:\Firefox\firefox.exe" --no-remote --createprofile "Test-removeme
> C:\Thisisatest\someprofile\"
> Dialog box message: Your firefox profile cannot be loaded. It may be missing
> or unaccessible.
> This created the directory c:\Thisisatest but no subdirectory
> No entry in the profile manager is created
>
> ===
>
> >gets me a dialog that the profile cannot be found and may be missing. It creates C:\Thisisatest, but not C:\Thisisatest\someprofile. It also doesn't add an entry in the profile
> manager.
> I get the same result
OK, good.
> >"g:\Firefox\firefox.exe" --no-remote --createprofile "Test-removeme C:\Thisisatest\someprofile"
> I get the same result
> There is an entry in the profile manager "Test-removeme"
OK, good.
> Here is where the problem lies. There is no directory "Test-removeme"
> The files are in the someprofile directory so the Test-removeme directory is
> meaningless but is the profile name.
This is expected. I tried to update the documentation to reflect this already in comment #4. The example invocation on the documentation reads:
firefox -CreateProfile "JoelUser c:\internet\joelusers-moz-profile"
The first 'word', in this case "Test-removeme" (and in the docs, "JoelUser") is just the label that the profile gets in the profile manager. It never gets used as a directory name.
> If you go to about:support in the URL box click show folder it will show the
> contents of someprofile rather than Test-removeme << because it does not
> exist.
>
> ===
>
> So yours is creating the Test-removeme subdirectory and mine is not :)
No, I also don't get a "Test-removeme" directory. I did try to make this very explicit in my previous comment as well:
(In reply to :Gijs Kruitbosch from comment #7)
> it
> creates both directories and adds two files to the inner dir, and lists the
> profile in the profile manager. That directory itself (and not
> "C:\Thisisatest\someprofile\Test-removeme") is then populated once using it.
| Reporter | ||
Comment 10•11 years ago
|
||
Gijs --
I just wrongly wanted/expected the --createprofile to append the profile_name to isolate the files and associate the files to the profile name.
As it is using --no-remote you can create another profile pointing to the same files and they are now shared.
"g:\Firefox\firefox.exe" --no-remote --createprofile "BILL C:\mozilla\profiles"
If I look on the c drive I see a directory c:\mozilla\profiles and this contains the Fx files.
If I now execute a command like:
"g:\Firefox\firefox.exe" --no-remote --createprofile "JANE C:\mozilla\profiles"
it will use the files in the c:\mozilla\profiles directory for the profile JANE - verified by executing
"g:\Firefox\firefox.exe" --no-remote -p and selecting JANE
But now I know and better understand.
In summary the issues I was experiencing was the directory ending with a '\' and the multiple spaces and the misunderstanding thinking the profile name would be appended to the path..
Thank you for your explanation and all your effort.
Comment 11•11 years ago
|
||
> The first 'word', in this case "Test-removeme" (and in the docs, "JoelUser") is
> just the label that the profile gets in the profile manager. It never gets used as
> a directory name.
And in that respect the MDN article still seems ambiguous to me.
Mozillazine thread for reference: http://forums.mozillazine.org/viewtopic.php?f=38&t=2891531
Comment 12•11 years ago
|
||
(In reply to therube from comment #11)
> > The first 'word', in this case "Test-removeme" (and in the docs, "JoelUser") is
> > just the label that the profile gets in the profile manager. It never gets used as
> > a directory name.
>
> And in that respect the MDN article still seems ambiguous to me.
I'm not sure how to make it clearer, then - but it's a wiki, so feel free. :-)
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•