how to lock preferences?
I have read about creating the user.js file, and it took a while to read somewhere that this loads after prefs,js and thereby those user.js prefs takes precedence. And seeing as prefs.js is the one written to, this is a round about way of locking the preferences. Well I have tried that, copied prefs,js and named it user.js, restarted, then removed menu toolbars and some tick boxes in Options, restarted, and expected my changes to be gone...but they were not. What am I doing wrong?
Valittu ratkaisu
user.js does override the prefs.js. So this is useful.
However, you are talking about enabling Toolbars etc and these settings are in a different file. xulstore.json
Access Profile folder Exit Thunderbird right click on xulstore.json and set Attributes to 'read only'
REstart Thunderbird Open Write window deliberately hide the 'Composition Toolbar' It will disappear.
Whilst you are using that current session, it will remain hidden (unless manually enabled again) However, if you exit and restart Thunderbird, it will reappear because nothing was updated to the 'read only' xulstore.json file.
Not exactly what you are looking for but a simple way of ensuring you can get it all back by closing and restarting Thunderbird.
Lue tämä vastaus kontekstissaan 👍 1Kaikki vastaukset (11)
Why not just use it as it is meant to be used? What are you trying to lock, and why does it need locking?
Are you using CCleaner or similar? This likes to wipe files that Thunderbird uses to store settings.
CCleaner does not wipe the settings in Thunderbird. It will clear the passwords though if ticked in app settings of CCleaner.
I am wanting to lock the preferences of Thunderbird as my 87 year old mum is using Thunderbird for email, and she keeps turning toolbars off such as making the Send button go, and changing the drop down menu of TO to FROM for example. Thankfully I found the extension that stops drag and drop so that has stopped folders being put inside one another and emails moving around. Historically it looks like this has been a frequent request from people who use it in a mass user place such as a school. I have found that I can simply make the pref.js file Read Only and that works, restarting Thunderbird returns it to the previous setup, however a new pref.js file gets created everytime the app closes. Even though this is just 0Kb, from a maintenance perspective its not good to have a folder full of 100's of files like that.
Ah, that explains your puzzling comment "and expected my changes to be gone...but they were not" - most users complain about their changes NOT persisting. ;-)
I think I'd settle for the multiplying empty files rather than having to regularly repair all the unintended damage.
Maybe you could run Thunderbird from a batch file that:
- restores a standard kit of settings files at start-up, or
- deletes the surplus .js files, in conjunction with the read-only trick.
mmm, though the reason for my post is that the published method of locking the prefs / returning it to user presets, doesn't work, and wanted to know what I am doing wrong. Does it work for you?
I don't know, I've never had the need to lock it. Do you have a link to where you read this advice?
Are you are that's the right article? I don't see any mention of the precedence between prefs.js and user.js, but instead a discussion of how to build a lock file.
Now, the approach given there seems to be useful to disable specific controls. It doesn't strike me as being well suited to your particular needs; I guess you could disable a few checkboxes, but it won't help with drag-and-drop accidents. Have you managed to block all drag and drop? I know of solutions that prevent the moving of folders, but not the moving of individual messages.
Hmm, we can buy simple phones with big buttons for our elderly folk. (Though I bought one for my mum when she was starting to suffer with dementia and it just baffled her. She'd pick up the receiver and start dialling, very slowly, reading out one digit at a time, and the system would time out and drop the call before she'd entered all the digits. She couldn't grasp using numbers stored in its memory, and she couldn't accept that it would do on-hook dialling.)
I was going to say that we could use a very simple no-frills email client, but after reflecting on my mum's issues with rather simpler technology, I'm not so sure even that would be helpful.
I'll have a play with the lock file. Unfortunately, articles like that one are sometimes overtaken by events and what they describe just stops working. For instance, I'm still trying to add a particular search engine to Thunderbird; none of the published solutions seem to work any longer.
Sorry too many windows open http://kb.mozillazine.org/Restricting_user_actions_-_Thunderbird
Prevent a user from changing the settings
Firefox supports a mozilla.cfg file that contains encoded javascript commands that you can use to lock settings. Thunderbird doesn't have an equivalent file. The best you can do is create an optional user.js file. It gets loaded after prefs.js so that it can override any edits to prefs.js or any changes made via the Config Editor. However, a user could either edit or delete the user.js file, or create a new profile.
AndrewT001 said
CCleaner does not wipe the settings in Thunderbird. It will clear the passwords though if ticked in app settings of CCleaner.
I must admit it is some four years since I looked, but it deleted the session.json file which controls menus and tabs last time I looked.
So I installed it again today, and again it wants to delete the session.json file. This is a critical file as far as Thunderbird is concerned containing open tabs and, the appearance of the much of the user interface such as the contacts pane in compose and the reading pane for the main window. I still don't like ccLeaners approach to "protecting" you.
Valittu ratkaisu
user.js does override the prefs.js. So this is useful.
However, you are talking about enabling Toolbars etc and these settings are in a different file. xulstore.json
Access Profile folder Exit Thunderbird right click on xulstore.json and set Attributes to 'read only'
REstart Thunderbird Open Write window deliberately hide the 'Composition Toolbar' It will disappear.
Whilst you are using that current session, it will remain hidden (unless manually enabled again) However, if you exit and restart Thunderbird, it will reappear because nothing was updated to the 'read only' xulstore.json file.
Not exactly what you are looking for but a simple way of ensuring you can get it all back by closing and restarting Thunderbird.
Thanks! Sounds like that is what I am after