You are not logged in.

#1 2020-07-11 19:33:04

sgx
Member
Registered: 2019-06-27
Posts: 7

Import

Hello!

I transferred ./cache to tmpfs. After a reboot, Lithium checks for configs. What exactly does “import” mean, what actions are performed after clicking?

If I understand correctly, then..
Default configs are returned?

How to leave my configs and not skip every time in my situation?

Sorry for my English.

Last edited by sgx (2020-07-11 20:52:34)

Offline

#2 2020-07-12 02:46:26

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,146
Website

Re: Import

Hello sgx, welcome to BunsenLabs!

What's happening with the "checks for configs" is that with an upgrade to the bunsen-configs package one or more of the files in /usr/share/bunsen/skel changed. These files are copied into a new user's $HOME when that user account is set up, so the user has the default BunsenLabs configuration for various applications.

From that point on, those files belong to the user (ie you) who has complete freedom to edit them any way he/she wants. But, sometimes we at BunsenLabs discover some way the default user configs could be improved. What to do? Nobody would like it if their carefully edited config files were overwritten and sent back to the default state, even if it is better than before.

So what bl-user-setup (which runs on every login) does is first check if anything in /usr/share/bunsen/skel has changed, and if not it just exits. If there are changes, then first the user is asked for permission to "import" the changes. (That means copy them from skel/ to $HOME.) If user agrees, any user files that are still in the original default state are silently updated.

On the other hand, if they have been changed by the user then permission is asked for each individual file, whether to overwrite it or not. If you're not sure whether your change was important or not, say "No". You can make a note of the file name, and later compare the version in skel/ with yours if you want, to see if the change is worth adding or not.

In practice, this won't happen very often, and only for one or two files, especially once the Lithium release is finalized in all its details. (In the future we'd like to add a "check difference" function to the script, to make it easier to decide.)

To see more about this, have a look at 'man bl-user-setup'.

This is an important new function in BunsenLabs Lithium, so if you still don't understand something about it, please ask! smile


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Online

#3 2020-07-12 11:15:21

sgx
Member
Registered: 2019-06-27
Posts: 7

Re: Import

Thanks for your reply!

Great release!

Will it be possible not to check already verified configs? (it is like feature request)
Or a radical way, how to disable verification completely? (remove bl-user-setup?)

just asking big_smile

Last edited by sgx (2020-07-12 11:31:15)

Offline

#4 2020-07-13 07:26:44

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,146
Website

Re: Import

Once you reply "No" to overwriting a file you won't be asked a second time, at least until another change happens to that file in the BunsenLabs package. As I said, that will probably happen very seldom.

If you want to disable it anyway, you can comment out the last line in  /usr/lib/bunsen/configs/bunsen-autostart
( In future that line will likely move to ~/.config/bunsen/autostart )


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Online

#5 2020-08-05 09:42:25

JCN-9000
New Member
From: Turin, Italy
Registered: 2016-04-22
Posts: 4

Re: Import

johnraff wrote:

Once you reply "No" to overwriting a file you won't be asked a second time, at least until another change happens to that file in the BunsenLabs package. As I said, that will probably happen very seldom.

Unless you relocate $HOME/.cache to a non-persistent storage like the OP says

sgx wrote:

I transferred ./cache to tmpfs.

I'm using unburden-home-dir to get the same behaviour, but this makes bl-user-setup ask the same questions at every login, since it has no memory of the answers/files from the previous session.

It's easy to change the script to point to a persistent cache but

  • script has to be re-edited on system updates

  • it is an Oxymoron: if the script needs persistent info, it should not save them to a cache, but to some different location.

Will it be possible to amend this?

Thanks

Offline

#6 2020-08-05 18:30:39

ohnonot
...again
Registered: 2015-09-29
Posts: 4,784
Website

Re: Import

Storing configuration data in ~/.cache is wrong - that folder should contain data that might be re-used between reboots but can always be recreated if need be, i.e. deleting it should not change anything.

JCN-9000 wrote:

but this makes bl-user-setup ask the same questions at every login, since it has no memory of the answers/files from the previous session.

If the welcome script really does that then that would need to be changed IMHO.


BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
---
Thank you for posting direct image links!

Online

#7 2020-08-06 06:03:58

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,146
Website

Re: Import

This is not about the welcome script, it's bl-user-setup which imports the config files needed for a BL user. A recent change is that it will offer to update them if new versions of the default files have arrived in a package upgrade. Obviously this requires user agreement, so as not to overwrite their customizations.

Yes, storing configuration data in ~/.cache would be wrong, but I don't think what bl-user-setup saves in ~/.cache is configuration data. For a start, it's not at all amenable to editing by the user to modify the program's behaviour - the usual criterion for inclusion in ~/.config. And, strictly speaking, it can always be recreated if it's lost - at the cost of some user annoyance. (That also applies to some other apps' cached data.) I certainly did try to make sure the script would be able to recover from having the cache deleted.

While few users will be throwing away their cached data on every logout - it's certainly not a use case I gave much thought to - this still has some validity IMO:

JCN-9000 wrote:

if the script needs persistent info, it should not save them to a cache, but to some different location

So, yes, worth considering a move to, possibly, ~/.local/share/bunsen/user-setup?


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Online

Board footer

Powered by FluxBB