ahkok / user-session-units

A collection of units for the systemd user session.
GNU Lesser General Public License v2.1
72 stars 23 forks source link

Make better use of targets #10

Closed tchebb closed 10 years ago

tchebb commented 11 years ago

Currently, nearly every service unit in this repository has a corresponding target unit, most of which are identical to each other with only the description changed. I gather that the intent of this is to make it easy to symlink any one of these targets as default.target, but it's a very inefficient solution.

This change creates three common target files which roughly mirror systemd's basic.target and graphical.target. It brings a number of benefits which are outlined in more detail in the commit message, but the main advantage is that users can use the familiar systemctl enable and systemctl disable commands to manage their user sessions instead of manually symlinking default.target. This creates a more uniform user experience as well as an improved ability to mix and match desired units.

lemenkov commented 11 years ago

I like this approach. So +1 from me. Btw I think this also could be expanded in the future for ssh sessions as well.

I thought of developing something similar for a while, but didn't find enough time to come up with the proposal.

sofar commented 10 years ago

I like this approach, but I'd also like to better distinguish between seat/sessions inside the user session, and this patch will likely conflict badly with it - I'll keep it aside here for reference until I figure out what if the combination will work out.

tchebb commented 10 years ago

I've just rebased these changes on top of the latest master and made some dependency ordering improvements in the process. Can you elaborate on what's stopping you from merging this? I'm happy to do any refactoring that's necessary to resolve conflicts.