Create a generator for all remaining .desktop files and user scripts
Closed, ResolvedPublic

Description

We want to find things that don't have their own explicit unit and create a .service from the .desktop file.

Gnome has a flag to attach to .desktop files that says there is a systemd unit for it already and they don't need to activate it explicitly in other ways

We need to also work out how to install generators on a per desktop basis so we don't conflict with gnome. Or maybe we could even share this.

A FOSDEM meeting said we would try and create a common generator which will ship with systemd

This would source all .desktop files

Anything with
X-Only-In: KDE

would create services in the kde.target.wants folder
same for gnome etc.
anything without that line would be in the desktop.target.wants folder

our final target will want both kde and desktop targets

This is being upstream in systemd by Ben from Gnome

We will just need to add some targets later.

davidedmundson added a comment.EditedMar 26 2020, 1:24 PM

Generator is here:

https://github.com/systemd/systemd/pull/15226/files

We need to add a KDE part to that to support X-KDE-Autostart-Condition

Plan is to map it to

ExecCondition=kde-systemd-start-condition "argFromAutoStartCondition"

we need a binary that takes that argument which is in the form "baloorc:General:IndexingEnabled"

Open the config, call readEntry
Then return 0 or 255 depending.

davidedmundson closed this task as Resolved.Apr 6 2020, 2:19 PM
davidedmundson claimed this task.