Bug 483505 - After making changes, restart Baloo in the background instead of asking the user to reboot
Summary: After making changes, restart Baloo in the background instead of asking the u...
Status: RESOLVED DUPLICATE of bug 467531
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_baloo (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2024-03-14 01:49 UTC by Ben Daines
Modified: 2024-04-15 06:40 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Daines 2024-03-14 01:49:52 UTC
SUMMARY
When manually adding directories to be either indexed or not indexed, a message is displayed at the top of the screen after clicking apply saying that "the system must be restarted for changes to take effect."  The user is here presented with a restart button with a spinning arrows icon that seems to indicate that the entire system will be restarted if the button is clicked.  

The biggest issue is that (under Plasma 5 Wayland) work will be lost when the session is ended if this button does indeed restart the entire system to make changes to the indexed directories.  Supposedly this is fixed with Plasma 6, so that may be a non-issue.  However, needing to restart the entire system seems quite intrusive when I can confirm that merely restarting the user service for kde-baloo is plenty to what needs to be done.  

I purpose that this message should be worded better, either specify that you do in fact mean the computer or the session rather than just "system."  The indexing system?  The computer system?  The what?  More to the point of sanity, I would hope that this message can be clarified as "the indexing service needs to be restarted..." and that button can be made to simply restart the baloo service for the current session without requiring the session to be ended or the computer rebooted.
Comment 1 Nate Graham 2024-04-09 21:35:53 UTC
> work will be lost when the session is ended
Only if you have "confirm logout turned off, which is a non-default setting.

> Supposedly this is fixed with Plasma 6
It's fixed for Qt6 apps at least.

> I can confirm that merely restarting the user service for kde-baloo is plenty to what needs to be done.
That's fine, we can do that instead, but what about people not using Systemd? That use case needs to be considered too. We also may need to kill the worker processes as IIRC at least at some point in the past that didn't happen automatically. If we can handle all those subtleties then it's feasible to remove the message and kust restart the service in the background.
Comment 2 tagwerk19 2024-04-15 06:32:17 UTC
(In reply to Nate Graham from comment #1)
> ... but what about people not using
> Systemd? That use case needs to be considered too. We also may need to kill
> the worker processes as IIRC at least at some point in the past that didn't
> happen automatically ...
On systems with systemd, baloo is started using it (it gets the unit file contraints on the use of RAM). It does seem though that if you stop and restart with with "balooctl disable" and "balooctl enable", it is started as a background process (not controlled by systemd).

It's probably worthwhile to give this process management more love: Use systemd functions whereever possible, fall back to old school methods where not. In that case a "systemctl --user restart kde-baloo" (equivalent) ought to do the job...
Comment 3 tagwerk19 2024-04-15 06:40:43 UTC
There seems to be a Bug 467531 with some discussion already covering this...

... Marking as duplicate

*** This bug has been marked as a duplicate of bug 467531 ***