all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrew Tropin <andrew@trop.in>
To: Antero Mejr <antero@mailbox.org>
Cc: ludo@gnu.org, antero@mailbox.org, 59983@debbugs.gnu.org
Subject: [bug#59983] [PATCH] home: Let user configure XDG base directories.
Date: Mon, 07 Aug 2023 10:57:37 +0400	[thread overview]
Message-ID: <87350vl4pq.fsf@trop.in> (raw)
In-Reply-To: <87y1rbthce.fsf@mailbox.org>

[-- Attachment #1: Type: text/plain, Size: 1920 bytes --]

On 2022-12-13 15:53, Antero Mejr wrote:

> Andrew Tropin <andrew@trop.in> writes:
>> There is no way to understand upfront if directory containing
>> XDG_RUNTIME_DIR is writable and this is why it's a good idea to delegate
>> initialization of it to external thing and never try to create it here,
>> even if it has non-default value.
>
> Thank you for the snippet, that's a much better way of fixing my issue.
>
> I still think guix home should (by default) be able to use all its
> features without the requirement of having external programs installed.
>
> For example, suppose you have a server that you want to set up your home
> environment on, for when you login to do sysadmin tasks. That server
> wouldn't have %desktop-services (elogind), nor would it have a custom
> greeter like greetd. So XDG_RUNTIME_DIR will be unset.
>
> If XDG_RUNTIME_DIR does not exist, can we make a fallback path to have
> guix home put the shepherd socket and on-first-login-executed flag file
> in ~/.local/var/run (or somewhere else writable) instead?

Without automatic cleanup (which is the case for elogind, pam_rundir and
other options providing XDG_RUNTIME_DIR) it will likely missbehave.

It's much trickier than it seems on the first sight.  Theoretically it's
possible, but requires a lot of additional work to do it right.

In fact on-first-login script is a kinda hack to make shepherd started
somehow, but running user's shepherd is tricky on its own.  Shutting it
down correctly (and all the processes managed by it) is even more
challenging.  AFAIK, there is no easy and straightforward solution (even
in other init systems that we can quickly borrow), so it will require
time and effort to carefully design and implement it.

If you want to work on it - send you ideas, research and patches for the
possible solutions, I'll share my input :)

-- 
Best regards,
Andrew Tropin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

      reply	other threads:[~2023-08-07  6:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12  3:00 [bug#59983] [PATCH] home: Let user configure XDG base directories Antero Mejr via Guix-patches via
2022-12-13  4:25 ` Andrew Tropin
2022-12-13 15:53   ` Antero Mejr via Guix-patches via
2023-08-07  6:57     ` Andrew Tropin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87350vl4pq.fsf@trop.in \
    --to=andrew@trop.in \
    --cc=59983@debbugs.gnu.org \
    --cc=antero@mailbox.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.