You are not logged in.

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

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

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,349
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

Offline

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

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

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,349
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

Offline

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

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

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,943
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.
my repos / my repos

Offline

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

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,349
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

Offline

#8 2020-08-12 16:19:04

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

Re: Import

johnraff wrote:

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

Vote +1 big_smile

Offline

#9 2020-08-13 03:06:57

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

Re: Import

sgx wrote:
johnraff wrote:

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

Vote +1 big_smile

OK let's put this on the todo list. Beryllium might not be so far away, so that might be the best time.

---
As for the larger topic of users lightening-up their HOME, ~/.cache won't necessarily save all that much.
Mine is quite big, over several years of use it's grown to ~350MB, but ~/.local is 1.4GB! Meanwhile other apps are putting data right in ~/.dirname. Apps like to accumulate data, and they're hard to outwit.

It looks (from a quick glance) as if unburden-home-dir can be configured to move or keep different files & directories, so presumably could be set to leave ~/.cache/bunsen alone. (It's small, and after the original setup very little data is written there.) I think u-h-d would only become useful if it was configured to handle all the cache-like data in HOME, not just in ~/.cache, so would need configuring anyway.

---
But, anyway,just in the interests of Doing The Right Thing, using ~/.local/share/bunsen for some BL data wouldn't hurt. smile

Last edited by johnraff (2020-08-13 03:12:03)


...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

Offline

#10 2020-08-15 07:17:36

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

Re: Import

johnraff wrote:

As for the larger topic of users lightening-up their HOME, ~/.cache won't necessarily save all that much.

I think OP is about speeding up, not saving space:

sgx wrote:

I transferred ~/.cache to tmpfs.
(fixed typo)

This makes sense.


BL quote proposals to this thread please.
my repos / my repos

Offline

#11 2020-08-15 18:31:32

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

Re: Import

ohnonot wrote:

I think OP is about speeding up, not saving space

Yes, i have it mostly for speed up.

Last edited by sgx (2020-08-15 18:34:57)

Offline

#12 2020-08-18 04:00:07

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

Re: Import

ohnonot wrote:
johnraff wrote:

As for the larger topic of users lightening-up their HOME, ~/.cache won't necessarily save all that much.

I think OP is about speeding up, not saving space:

Speeding up, by writing less data to disk perhaps? I was just pointing out other possible places where sub-critical files might be.


...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

Offline

#13 2020-08-19 05:04:46

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

Re: Import

johnraff wrote:

Speeding up, by writing less data to disk perhaps?

Speeding up by moving much-accessed folders to RAM.
You do know what a tmpfs is?

Example: https://wiki.archlinux.org/index.php/Fi … ile_on_RAM

Last edited by ohnonot (2020-08-19 05:05:18)


BL quote proposals to this thread please.
my repos / my repos

Offline

#14 2020-08-19 05:43:01

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

Re: Import

ohnonot wrote:
johnraff wrote:

Speeding up, by writing less data to disk perhaps?

Speeding up by moving much-accessed folders to RAM.
You do know what a tmpfs is?

Yes.
I was contrasting writing data to disk with writing to RAM.
And still my point applies that there's data outside ~/.cache that might be equally worthy of interest.

But never mind - BL's persistent data will be moved out of ~/.cache in due course. (There's some in ~/.config that also ought to be in ~/.local/share IMO.)


...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

Offline

#15 2020-08-19 20:21:10

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

Re: Import

johnraff wrote:

And still my point applies that there's data outside ~/.cache that might be equally worthy of interest.

I don't think anyone was disputing that.
Yet still my point applies that moving ~/.cache to a tmpfs might well speed things up for applications that use it a lot.
And that was the "larger topic" from the start (of this topic), not "lightening-up their HOME".
I pointed out a small misinterpretation, a matter of loosing the common thread maybe. You seem to have great difficulty simply admitting that.


BL quote proposals to this thread please.
my repos / my repos

Offline

#16 2020-08-19 20:47:23

damo
....moderator....
Registered: 2015-08-20
Posts: 6,347

Re: Import

ohnonot wrote:

...
I pointed out a small misinterpretation, a matter of loosing the common thread maybe. You seem to have great difficulty simply admitting that.

And unnecessary to say so, IMO.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#17 2020-08-22 07:10:15

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

Re: Import

damo wrote:

And unnecessary to say so, IMO.

I'm not sure I understand you.
Did you mean to say:
"On a forum, if two people engage in pointless bickering, and one of them is a moderator, it is automatically the others fault!"
Or did you mean to say:
"Folks, please stop your pointless bickering before it evolves into something more serious!"
???


BL quote proposals to this thread please.
my repos / my repos

Offline

#18 2020-08-23 15:41:48

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

Re: Import

johnraff wrote:

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

Guys, i think there is already an interesting proposal from johnraff for this topic, and disputes, most likely due to misunderstanding, can be skipped.

Last edited by sgx (2020-08-23 15:42:44)

Offline

#19 2020-09-23 02:03:40

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

Re: Import

johnraff wrote:

a move to, possibly, ~/.local/share/bunsen/user-setup?

Done in bunsen-configs 10.7.1-1, now in the repo.


...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

Offline

#20 2020-09-28 20:14:39

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

Re: Import

johnraff wrote:

Done in bunsen-configs 10.7.1-1, now in the repo.

It works for me, thanks!

Offline

Board footer

Powered by FluxBB