<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>On 07/06/2016 02:34 PM, Martin Pitt wrote:<br>
</p>
<blockquote cite="mid:20160706143454.GJ4530@piware.de" type="cite">
<pre wrap="">This /usr/lib/systemd/user/graphical.target (and only that) <b class="moz-txt-star"><span class="moz-txt-tag">*</span>does<span class="moz-txt-tag">*</span></b>
belong in to systemd, as it cannot sensibly be in any
gnome-session/mate-session/kde-session/etc. package -- it's a shared
resource/synchronization point between all of those. Having a unit
structure which actually works and is reasonably easy to extend and
maintain is AFAICS the main blocker why systemd isn't being used for
desktop environments at all yet.
</pre>
</blockquote>
<br>
I think we are talking somewhat in mixed direction here. <br>
<br>
What I'm ( poorly ) trying to say is that you will need to make a
clear distinction of naming on the type units for the desktop
environment and the type units for the desktop environment user and
potentially other existing type units on the system to avoid
confusions and conflicting naming scheme, since Desktop Environments
will need to have their own targets so based on my comments on this
and for Gnome ( on Fedora ) and on the type units you are creating
in your script ( that all have to reside in ~/.config/systemd/user/
directory for all the desktop environment user type units right )
so this would become something along the lines of<br>
<br>
# gnome.target<br>
<br>
[Unit]<br>
Description=Gnome Desktop Environment<br>
Documentation=<a class="moz-txt-link-freetext" href="https://wiki.gnome.org/">https://wiki.gnome.org/</a><br>
Requires=multi-user.target<br>
Wants=gdm.service<br>
Conflicts=rescue.service rescue.target<br>
After=multi-user.target rescue.service rescue.target gdm.service<br>
AllowIsolate=yes<br>
<br>
# gdm.service<br>
<br>
[Unit]<br>
Description=GNOME Display Manager<br>
<a class="moz-txt-link-abbreviated" href="mailto:Conflicts=getty@tty1.service">Conflicts=getty@tty1.service</a><br>
<a class="moz-txt-link-abbreviated" href="mailto:After=getty@tty1.service">After=getty@tty1.service</a><br>
Conflicts=plymouth-quit.service<br>
After=plymouth-quit.service<br>
After=rc-local.service plymouth-start.service
systemd-user-sessions.service<br>
OnFailure=plymouth-quit.service<br>
<br>
[Service]<br>
ExecStart=/usr/sbin/gdm<br>
KillMode=mixed<br>
Restart=always<br>
IgnoreSIGPIPE=no<br>
BusName=org.gnome.DisplayManager<br>
StandardOutput=syslog<br>
StandardError=inherit<br>
EnvironmentFile=-/etc/locale.conf<br>
<br>
# gnome-user-graphical.target<br>
<br>
[Unit]<br>
Description=User systemd services for graphical session<br>
StopWhenUnneeded=yes<br>
<br>
# gnome-user.target<br>
[Unit]<br>
Description=User systemd services for GNOME graphical session<br>
BindsTo=gnome-user-graphical.target gnome-user-session.service<br>
<br>
# gnome-user-session.service<br>
[Unit]<br>
Description=gnome-user-session leader<br>
PartOf=gnome-user-graphical.target<br>
<br>
[Service]<br>
ExecStart=/bin/sleep infinity<br>
<br>
# someapp.service<br>
[Unit]<br>
Description=example graphical app<br>
PartOf=gnome-user-graphical.target<br>
<br>
[Service]<br>
ExecStart=/bin/sleep infinity<br>
<br>
...<br>
<br>
This will allow for<br>
<br>
# DE units<br>
kde.target<br>
kdm.service<br>
xfce.target<br>
xdm.service<br>
....<br>
<br>
DE user type units<br>
kdm-user-graphical.target<br>
kdm-user.target<br>
kdm-user-session.service<br>
xfce-user-graphical.target<br>
xfce-user.target<br>
xfce-user-session.service<br>
etc.. <br>
<br>
In your script you had an conflicting naming scheme (
gnome.target/graphical.target ) and a colliding one (
graphical.target with systemd default and potentially other DE's as
well ) if multiple desktop environments where installed. <br>
<br>
And you also might need to add something like an Alias ( like for
example "Alias=user-graphical.target" ) directive to the
DE-user-graphical.target unit so that someapp.service can be made
PartOf an generic directive (PartOf=user-graphical.target) to make
it DE agnostic ( should it be required to be so ) if it's not DE
specific. ( if you follow me here ).<br>
<br>
JBG<br>
</body>
</html>