blue-build / modules

BlueBuild standard modules used for building your Atomic Images
Apache License 2.0
23 stars 25 forks source link

fix(default-flatpaks): run 'system-flatpak-setup.service' as a system service #93

Closed lorduskordus closed 6 months ago

lorduskordus commented 6 months ago

Why ?

fiftydinar commented 6 months ago
  1. I addressed this by adding system-flatpak-presetup service.
  2. Notify-send does not work if you run the service as system. Which is very important for sending notifications to the user when flatpaks are installed or uninstalled.
xynydev commented 6 months ago

@lorduskordus Have you encountered an issue with the module that you aim to fix, or is this PR made on the basis of assumptions. I have assumed that @fiftydinar 's recent changes with the presetup work correctly.

lorduskordus commented 6 months ago
  1. I addressed this by adding system-flatpak-presetup service.

    1. Notify-send does not work if you run the service as system. Which is very important for sending notifications to the user when flatpaks are installed or uninstalled.

Yes, but system-flatpak-presetup doesn't handle installations or removals. The system-wide apps should be installed/removed regardless of whether the current user has privileges or not, ideally they would come bundled right in the image, no installation needed.

The notifications not working is unfortunate. There has to be a way to enable that as well.

@lorduskordus Have you encountered an issue with the module that you aim to fix, or is this PR made on the basis of assumptions. I have assumed that @fiftydinar 's recent changes with the presetup work correctly.

The issue is, when a user without sudo logs in, the system-wide Flatpaks fail to install. They are downloaded, but not installed due to lack of privileges. A user with sudo would have to login first to get them installed.

I'll close this and try to come up with a solution once I have time.

xynydev commented 6 months ago

The issue is, when a user without sudo logs in, the system-wide Flatpaks fail to install. They are downloaded, but not installed due to lack of privileges. A user with sudo would have to login first to get them installed.

This seems to be ok behaviour with how the feature is currently structured. I guess a fix would be to put the installation in the priviliged script, and only have a "notifier" script that runs for the user, if we really want to get the notifs working.

fiftydinar commented 6 months ago

I understand the issue now. I will try to solve it without loosing notifications support.