[PATCH] services: slim: Make the logged-in session show up in "w".

  • Done
  • quality assurance status badge
Details
3 participants
  • Danny Milosavljevic
  • Ludovic Courtès
  • Marius Bakke
Owner
unassigned
Submitted by
Danny Milosavljevic
Severity
normal

Debbugs page

Danny Milosavljevic wrote 7 years ago
(address . guix-patches@gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20180217120022.696-1-dannym@scratchpost.org
* gnu/services/xorg.scm (slim-shepherd-service): Make the logged-in session
show up in "w".
---
gnu/services/xorg.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (13 lines)
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 50af2408b..b73dbe0d7 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -467,6 +467,8 @@ authfile /var/run/slim.auth
login_cmd exec " xinitrc " %session
sessiondir /run/current-system/profile/share/xsessions
session_msg session (F1 to change):
+sessionstart_cmd " sessreg "/bin/sessreg -a -l $DISPLAY %user
+sessionstop_cmd " sessreg "/bin/sessreg -d -l $DISPLAY %user
halt_cmd " shepherd "/sbin/halt
reboot_cmd " shepherd "/sbin/reboot\n"
Marius Bakke wrote 7 years ago
87zi47typv.fsf@fastmail.com
Danny Milosavljevic <dannym@scratchpost.org> writes:

Toggle quote (3 lines)
> * gnu/services/xorg.scm (slim-shepherd-service): Make the logged-in session
> show up in "w".

Nit-pick: Instead of reusing the commit title here, it would be better
to mention what is being done, e.g. "Use SESSREG to register X11
session".

[...]

Toggle quote (11 lines)
> diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
> index 50af2408b..b73dbe0d7 100644
> --- a/gnu/services/xorg.scm
> +++ b/gnu/services/xorg.scm
> @@ -467,6 +467,8 @@ authfile /var/run/slim.auth
> login_cmd exec " xinitrc " %session
> sessiondir /run/current-system/profile/share/xsessions
> session_msg session (F1 to change):
> +sessionstart_cmd " sessreg "/bin/sessreg -a -l $DISPLAY %user
> +sessionstop_cmd " sessreg "/bin/sessreg -d -l $DISPLAY %user

I'm surprised that this works. I would have expected sessreg to be
unbound in this context, and that it would have to be added to the
<slim-configuration> record similar to xauth and startx.

However I suspect it may be better to add it to the record regardless,
to stay consistent and allow overriding it. WDYT?

This is a change that affects most GuixSD users, so we better not break
anything here :-)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlqIS/wACgkQoqBt8qM6
VPqHDAgAi8UihyG1UBr8gjk027BPTyiiY7acqsvAJRSGtBvRY5eAqAYTxhDDWIFP
esNh4M8xeoWBDIkMjJjJg+Ws9Xb7F25HXRK72NIf6NPND7Uc+nPQi5hwjyGWzQbE
Wkd1TsI/rxF4vKEzTBjra/ra56U3ylDUFh5mh5EX0mUFgBbwmJqWNsyYCeKoAwIY
txKx2k70m40Ga8NTotOz78LpRatfu9eh2oMpMqZ5xn7s8lA7Kck28ek3oL4DuAWH
zqbo50r4oewgSK5dEI8o7oyJiPpCm0LYp1eKiyCygTPbsdAmw9i/1TVHpe2xNIYz
e2i5P28QpNE3otLlJCgkTT4F/Okd4g==
=rYl+
-----END PGP SIGNATURE-----

Danny Milosavljevic wrote 7 years ago
[PATCH v2] services: slim: Make the logged-in session show up in "w".
(address . 30497@debbugs.gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20180217163412.614-1-dannym@scratchpost.org
* gnu/services/xorg.scm (slim-shepherd-service): Use SESSREG to register X11
session.
---
gnu/services/xorg.scm | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

Toggle diff (34 lines)
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 50af2408b..ea8433af3 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -437,7 +437,9 @@ desktop session from the system or user profile will be used."
(auto-login-session slim-configuration-auto-login-session
(default #f))
(startx slim-configuration-startx
- (default (xorg-start-command))))
+ (default (xorg-start-command)))
+ (sessreg slim-configuration-sessreg
+ (default sessreg)))
(define (slim-pam-service config)
"Return a PAM service for @command{slim}."
@@ -454,7 +456,8 @@ desktop session from the system or user profile will be used."
(xauth (slim-configuration-xauth config))
(startx (slim-configuration-startx config))
(shepherd (slim-configuration-shepherd config))
- (theme-name (slim-configuration-theme-name config)))
+ (theme-name (slim-configuration-theme-name config))
+ (sessreg (slim-configuration-sessreg config)))
(mixed-text-file "slim.cfg" "
default_path /run/current-system/profile/bin
default_xserver " startx "
@@ -467,6 +470,8 @@ authfile /var/run/slim.auth
login_cmd exec " xinitrc " %session
sessiondir /run/current-system/profile/share/xsessions
session_msg session (F1 to change):
+sessionstart_cmd " sessreg "/bin/sessreg -a -l $DISPLAY %user
+sessionstop_cmd " sessreg "/bin/sessreg -d -l $DISPLAY %user
halt_cmd " shepherd "/sbin/halt
reboot_cmd " shepherd "/sbin/reboot\n"
Ludovic Courtès wrote 7 years ago
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 30497@debbugs.gnu.org)
878tboekkr.fsf@gnu.org
Danny Milosavljevic <dannym@scratchpost.org> skribis:

Toggle quote (3 lines)
> * gnu/services/xorg.scm (slim-shepherd-service): Use SESSREG to register X11
> session.

Please mention the new field in <slim-configuration>, and also add it to
doc/guix.texi.

If you’ve confirmed that it works for you, OK for master.

Thank you!

Ludo’.
Danny Milosavljevic wrote 7 years ago
(no subject)
(address . control@debbugs.gnu.org)
20180220212120.747099ff@scratchpost.org
close 30497
?
Your comment

This issue is archived.

To comment on this conversation send an email to 30497@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 30497
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help