[bug#70085] home: services: add newline to XDG_RUNTIME_DIR warning

Message ID 06b44aeb449a5335f12e1a4774d8a3222d87bf8c.1711761035.git.richard@freakingpenguin.com
State New
Headers
Series [bug#70085] home: services: add newline to XDG_RUNTIME_DIR warning |

Commit Message

Richard Sent March 30, 2024, 1:10 a.m. UTC
* gnu/home/services.scm: Add end-of-text newline to warning printed by
on-first-login script when XDG_RUNTIME_DIR does not exist.

Change-Id: I3bfe2c415f6941fa9a2231ab2a0be53db965053f
---
Without this change, the prompt will be pushed to the side by the
warning message. Other warnings in the repo follow this convention, so
I assume this one should as well.

 gnu/home/services.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: d67e4f0f9b10c7ddac8fb0ca68cbf1d6ad0a6e5d
  

Comments

Fabio Natali Aug. 8, 2024, 6:04 p.m. UTC | #1
Thanks Richard.

This is more of a bump rather than a review as the change itself is a
pretty obvious.

For what it's worth, I confirm I double-checked the change locally (as I
was accidentally experiencing the "XDG_RUNTIME_DIR doesn't exists"
warning).

All looks good, if someone with commit rights wants to give a final look
and push, that'd be cool.

Thanks, cheers, Fabio.
  
Attila Lendvai Sept. 28, 2024, 5:36 p.m. UTC | #2
it took a few hours of my life to find out that this is the reason my emacs tramp cannot connect to my servers all of a sudden.

and this rather straightforward fix is all the way back from march!

could someone please push this finally?

sidenote for another issue: why is my user missing its $XDG_RUNTIME_DIR ? its value is /run/user/1000, but that dir doesn't exist.

my ssh server is dropbear, i switched away from openssh after their last blunder. maybe that is the root cause of the warning?
  
Hilton Chain Sept. 29, 2024, 2:38 p.m. UTC | #3
Hi everyone,

On Sat, 30 Mar 2024 09:10:35 +0800,
Richard Sent wrote:
> 
> * gnu/home/services.scm: Add end-of-text newline to warning printed by
> on-first-login script when XDG_RUNTIME_DIR does not exist.
> 
> Change-Id: I3bfe2c415f6941fa9a2231ab2a0be53db965053f
> ---
> Without this change, the prompt will be pushed to the side by the
> warning message. Other warnings in the repo follow this convention, so
> I assume this one should as well.
> 
>  gnu/home/services.scm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied as cbf46d2565112180fe7b316b2530293ed2d3acf3, thanks!
  
Hilton Chain Sept. 29, 2024, 2:40 p.m. UTC | #4
On Sun, 29 Sep 2024 01:36:23 +0800,
Attila Lendvai wrote:
> 
> sidenote for another issue: why is my user missing its $XDG_RUNTIME_DIR ? its value is /run/user/1000, but that dir doesn't exist.
> 
> my ssh server is dropbear, i switched away from openssh after their last blunder. maybe that is the root cause of the warning?

I suppose the directory should be created by elogind or greetd?
  
Attila Lendvai Sept. 30, 2024, 7:47 a.m. UTC | #5
> > sidenote for another issue: why is my user missing its $XDG_RUNTIME_DIR ? its value is /run/user/1000, but that dir doesn't exist.
> > 
> > my ssh server is dropbear, i switched away from openssh after their last blunder. maybe that is the root cause of the warning?
> 
> 
> I suppose the directory should be created by elogind or greetd?


i have no idea about the login infrastructure.

with that in mind: i have a suspicion that dropbear lacks some integration (PAM?) that invokes the login services you mentioned above. or maybe it doesn't define some env variable that openssh does?

these machines are used as servers to which i log in through ssh (i.e. no logins through the local console).

i'll search around and i'll open a new issue if i cannot resolve this.
  

Patch

diff --git a/gnu/home/services.scm b/gnu/home/services.scm
index b69cd91203..39c9033ad6 100644
--- a/gnu/home/services.scm
+++ b/gnu/home/services.scm
@@ -445,7 +445,7 @@  (define (compute-on-first-login-script _ gexps)
              (warning (G_ "XDG_RUNTIME_DIR doesn't exists, on-first-login script
 won't execute anything.  You can check if xdg runtime directory exists,
 XDG_RUNTIME_DIR variable is set to appropriate value and manually execute the
-script by running '$HOME/.guix-home/on-first-login'"))))))))
+script by running '$HOME/.guix-home/on-first-login'~%"))))))))
 
 (define (on-first-login-script-entry on-first-login)
   "Return, as a monadic value, an entry for the on-first-login script