[Linux]Firefox does not open the Save Dialog for a Download

User Help for Mozilla Firefox
User avatar
Grumpus
Posts: 13246
Joined: October 19th, 2007, 4:23 am
Location: ... Da' Swamp

Re: [Linux]Firefox does not open the Save Dialog for a Downl

Post by Grumpus »

It's good practice, even when going between same base OSs, like Mint and Ubuntu, to create a new profile and just move the bookmarks.
There are sometimes subtle differences between the systems which, through experience, have shown themselves to cause issues.
Doesn't matter what you say, it's wrong for a toaster to walk around the house and talk to you
kmike
Posts: 124
Joined: November 4th, 2002, 10:54 pm

Re: [Linux]Firefox does not open the Save Dialog for a Downl

Post by kmike »

How does one migrate accumulated emails, saved passwords, browser history then?
User avatar
Grumpus
Posts: 13246
Joined: October 19th, 2007, 4:23 am
Location: ... Da' Swamp

Re: [Linux]Firefox does not open the Save Dialog for a Downl

Post by Grumpus »

The emails should be simple, just copy the files, as to saved passwords and browser history these don't migrate as they're not used or maintained.
Maybe someone else can help this end of it as not much is kept in a system change, usually it's just a wipe for me.
Doesn't matter what you say, it's wrong for a toaster to walk around the house and talk to you
User avatar
s-light
Posts: 7
Joined: January 3rd, 2010, 1:14 pm
Location: Paderborn
Contact:

Re: [Linux]Firefox does not open the Save Dialog for a Downl

Post by s-light »

Hey Ho :-)

if someone just want to migrate from windows to linux without creating a new profile and with the side effect of having eventually bugs cause by this...
i have modified my places.sqlite file and now the save function is back working :-)

i used http://sqlitebrowser.org/ to open a copy of the places.sqlite file:
close firefox
copy your places.sqlite file to some temp place.
start DB Browser for SQLite
open your places.sqlite file from your temp place.
than switch to the tab 'Browse Data'
and choose the Table 'moz_annos':
Image
there find the column 'content' and in the filter type:

Code: Select all

file:///C:/%
(uses '%' for a partly match.)
Image
there will show up all the entries with the old windows file paths.
now switch to the tab 'Execute SQL'
in the right panel at the bottom you can switch to 'SQL Log' there you can see the last filter statement.
i have cleaned this up:

Code: Select all

SELECT `id`, `content` FROM `moz_annos` WHERE `content` LIKE 'file:///C:/%'
copy this statement into the SQL 1 box and click on the 'Execute SQL' (play symbol) button.
Image
now there are all the results from your SQL command shown.
from this statement we now know the internal names we have to use...
a short search at stackoverflow brought up a example for a string replace.
to test if the replacement works like expected i added a second SQL tab and entered this command:

Code: Select all

SELECT `id`,`content`, replace(`content`, 'file:///C:/', 'file:///home/username/') FROM `moz_annos` WHERE `content` LIKE 'file:///C:/%';
Image
you should edit the search and replace strings so that they fit your needs...
last step is to really execute the replacement in the datasets:
again i added a new sql tab and entered the replace command:

Code: Select all

UPDATE `moz_annos` SET `content` = replace(`content`, 'file:///C:/', 'file:///home/username/')
and executed it
Image
now you can switch back to the 'Browse Data' Tab and check if your changes are all fine.

Code: Select all

file:///%
a list of all file entries..
or

Code: Select all

file:///C:/%
a empty list if all went well..
Image
if all is fine click the 'Write Changes' button.
close the tool.
make a second backup copy of your original places.sqlite file (to get back if something went wrong)
and than overwrite your places.sqlite file in your firefox profile folder with the modiefied one.
start firefox and test if it worked..
8-) good luck :D

sunny greetings
stefan

PS: is it possible to attach the images directly in the forum? (currently they are hosted on my own webspace but it think its nicer if they are at the same location as the content they are belonging to...)
User avatar
therube
Posts: 21714
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: [Linux]Firefox does not open the Save Dialog for a Downl

Post by therube »

is it possible to attach the images directly in the forum?
No. -> Posting a screenshot on the forum.
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
jms
Posts: 17
Joined: July 15th, 2004, 1:39 pm

Re: [Linux]Firefox does not open the Save Dialog for a Downl

Post by jms »

This is a bug in FF because it does not check the path in the preferences. It should check if browser.download.lastDir contains a valid path.

With the SQLITE-Manager addon, open content-prefs.sql and run
update prefs set value='' where value like 'C:%'
User avatar
s-light
Posts: 7
Joined: January 3rd, 2010, 1:14 pm
Location: Paderborn
Contact:

Re: [Linux]Firefox does not open the Save Dialog for a Downl

Post by s-light »

hey jms,

thanks to pointing out the second place to edit!
my first edit only helped so i was able to use the 'page save as' dialog again. ;-)
your mentioning of the content-prefs.sql helped to solve the download thing!
(i edited with my mentioned way - just to preserve the sub-parts of my paths - but your way is definitive easier ;-) )

sunny greetings

stefan
Maniaxx
Posts: 13
Joined: November 22nd, 2008, 7:03 pm

Re: [Linux]Firefox does not open the Save Dialog for a Downl

Post by Maniaxx »

I had the same problem but sqlite method didn't work. Completely deleting 'content-prefs.sqlite' did the trick in the end.
User avatar
Grumpus
Posts: 13246
Joined: October 19th, 2007, 4:23 am
Location: ... Da' Swamp

Re: [Linux]Firefox does not open the Save Dialog for a Downl

Post by Grumpus »

@s-light and others - Don't any of you who migrated a Windows based Firefox profile to a Linux based Firefox find you've spent more time buggering the cross platform issues than to have just built a new profile. Somethings cross over very well but really, this seems like a lot of nuisance for little gain and really isn't a fault of Firefox. More like trying to make orange juice with apples.
Doesn't matter what you say, it's wrong for a toaster to walk around the house and talk to you
LeeBinder
Posts: 20
Joined: December 25th, 2009, 4:40 pm

macOS Mac OX Firefox does't open the Save Dialog for a Downl

Post by LeeBinder »

This query worked for me in macOS High Sierra 10.13.6:

update prefs set value='/Users/YouUserNameHere/Downloads' where value like 'C:%'

replace YouUserNameHere with you know what with..

In other words, the value '' is not allowed to be empty in above mentioned OS.
Waterfox & Thunderbird | macOS Mojave & Big Sur
also installed but hardly ever use: Windows 10
Post Reply