How do I select the Firefox Profile?

Forums: 

I wanted to vacuum my Firefox sqlite databases. However, BleachBit vacuumed the default profile which I do not not use..
How do I set the path to the profile that I want to vacuum (it is not in the default directory or even on my C drive)?

p.s. I am using BleachBit v.0.8.7 and WIN 7 - 64 bit, in case that is relevant

BleachBit will try to get all the profiles in the standard Firefox locations, but if you have it in a completely different place, it cannot find it. Is the path listed in your profiles.ini file? At this time, BleachBit doesn't read profiles.ini (because 99.9% people use the default settings), but I suppose it could. In any case, for now I recommend you create a custom CleanerML file like this
  1. copy google_chrome.xml (because it demonstrates how to vacuum SQLite)
  2. store it in c:\users\username\appdata\roaming\bleachbit\cleaners (you may need to create the last folder)
  3. rename it to firefox_vacuum.xml
  4. change the unique ID in the XML (look id="google_chrome")
  5. take out all the options except vacuum
  6. change the vacuum paths

---
Andrew, lead developer

Yes, the profiles are in profiles.ini

I am unclear about the firefox_vacuum.xml options.
In Firefox, all the sqlite databases are in the same path (profile), e.g. D:\FireFoxProfiles\New_012311

In order to vacuum ALL databases, would it be sufficient to have the following command in firefox_vacuum.xml:

[action command="sqlite.vacuum" search="file" path="D:\FireFoxProfiles\New_012311"/]

or do I need to specify each database individually somehow (how?)?

-------

p.s. The xml command didn't show in this Forum when using "<", so I replaced it with "["
here (only)
p.p.s. I am not getting a notification to my registered E-mail when comments are posted.

Regarding the [: this forum software expects HTML which users the greater-than and less-than symbols.

Try this in the CleanerML to vacuum Firefox

[action command="sqlite.vacuum" search="glob" path="D:\FireFoxProfiles\New_012311\*.sqlite"/]

Regarding the email

1. Go to http://bleachbit.sourceforge.net/user , click edit, and verify the email address is correct
2. Check your spam filter

---
Andrew, lead developer

I may be missing something fundamental?

How does BleachBit recognize and use the new Firefox XML..? Would BleachBit automatically use the XML file that I created and put in the cleaners Folder? Is it then supposed to show up in the Name pane as a new Name ("firefox_vacuum")? If so, it doesn't.
Note: BleachBit, did show a dialogue box asking me if I wanted to accept the new XML file, and I approved (I did not delete it).

Anyway, since the new XML didn't show up, I run BleachBit again using the previous setting to vacuum Firefox, and BleachBit just cleaned the default Firefox profile again, as expected, since nothing was changed in the program.

1. Maybe there is something wrong with the new XML file (See below)?
2. When done, using the old Firefox vacuum, I got several errors in the log (see below)

----- XML File (swapped < & > with [ & ]) ----------------

[?xml version="1.0" encoding="UTF-8"?]
[!--

BleachBit
Copyright (C) 2011 Andrew Ziem
http://bleachbit.sourceforge.net

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see [http://www.gnu.org/licenses/].

--]
[cleaner id="firefox_vacuum"]
[label]Vaccum Firefox[/label]
[description]Web browser[/description]
[option id="vacuum"]
[label]Vacuum[/label]
[description]Clean database fragmentation to reduce space and improve speed without removing any data[/description]
[action command="sqlite.vacuum" search="glob" path="D:\FireFoxProfiles\New_012311\*.sqlite"/]
[/option]
[/cleaner]

-------------

----------Errors-----------
Traceback (most recent call last):
File "bleachbit\CleanerML.pyo", line 200, in load_cleaners
File "bleachbit\CleanerML.pyo", line 61, in __init__
File "xml\dom\minidom.pyo", line 1915, in parse
File "xml\dom\expatbuilder.pyo", line 924, in parse
File "xml\dom\expatbuilder.pyo", line 207, in parseFile
ExpatError: mismatched tag: line 29, column 2
Traceback (most recent call last):
File "bleachbit\CleanerML.pyo", line 200, in load_cleaners
File "bleachbit\CleanerML.pyo", line 61, in __init__
File "xml\dom\minidom.pyo", line 1915, in parse
File "xml\dom\expatbuilder.pyo", line 924, in parse
File "xml\dom\expatbuilder.pyo", line 207, in parseFile
ExpatError: mismatched tag: line 29, column 2
--------------------------------------

Maybe there is something wrong with the new XML file (See below)?

Yes.

The ExpatError indicates an XML syntax error (which would cause it to not appear in the GUI), but on my end your XML looked fine when I checked it with xmllint. In case there was a translation error, here it is without the escaping workaround

<?xml version="1.0" encoding="UTF-8"?>
<cleaner id="firefox_vacuum">
<label>Vaccum Firefox</label>
<description>Web browser</description>
<option id="vacuum">
<label>Vacuum</label>
<description>Clean database fragmentation to reduce space and improve speed without removing any data</description>
<action command="sqlite.vacuum" search="glob" path="D:\FireFoxProfiles\New_012311\*.sqlite"/>
</option>
</cleaner>

If you want to post XML in this forum, either
1. Use http://accessify.com/tools-and-wizards/developer-tools/quick-escape/defa...
2. Use any Pastebin service such as http://pastebin.com

How does BleachBit recognize and use the new Firefox XML..?

The CleanerML documentation (I hope) explains that BleachBit looks for CleanerML files with the .xml extension in several directories.

---
Andrew, lead developer

Not sure why the original file didn't work, but I created a blank file and copied/pasted the code above.
Works great!

Thank you also for the link to: http://accessify.com/tools-and-wizards/developer-tools/quick-escape/defa...
Makes it a lot easier :-).

THANKS!

p.s. I tried to use sqlite.exe to do the same thing. However, I couldn't find a precompiled 64-bit version of it.
BleachBit solved my issue, and is more powerful!