Support XDG_RUNTIME_DIR being unset

Kristian Høgsberg krh at bitplanet.net
Wed Mar 13 06:35:05 PDT 2013


On Mon, Mar 11, 2013 at 4:39 PM, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> On Mon, 11 Mar 2013 18:43:07 +0100
> Emilio Pozuelo Monfort <pochu27 at gmail.com> wrote:
>
>> On 03/11/2013 06:12 PM, Thiago Macieira wrote:
>> > On segunda-feira, 11 de março de 2013 17.10.53, Emilio Pozuelo Monfort wrote:
>> >> The XDG base directory specification[1] says that "If $XDG_RUNTIME_DIR
>> >> is not set applications should fall back to a replacement directory
>> >> with similar capabilities and print a warning message."
>> >>
>> >> Currently we abort if XDG_RUNTIME_DIR is not set. The following patches
>> >> fall back to ~/.cache, as GLib does.
>> >
>> > Which relevant and recent distribution does not set XDG_RUNTIME_DIR?
>>
>> Debian doesn't by default (you can use systemd or upstart, but sysvinit is the
>> default init system). Probably others, as well as *BSDs (some people are
>> interested in porting wayland to them).
>>
>> While it would be nice if sysvinit et al supported XDG_RUNTIME_DIR, and even
>> though I plan on switching to systemd, wayland is still not following the spec.
>
> I think Wayland is following the spec the best it possibly can. You
> can continue proposing new kinds of fallbacks, and we can see if
> they fill the spec better. Anything short from creating a new mount
> point and mounting a tmpfs in it will probably not be good enough.
> And to mount a new tmpfs I think you need to be root. Also need to
> implement the same fallback logic everywhere, since I don't think we
> want Weston (or weston-launch, rather) to become a XDG_RUNTIME_DIR
> provider. That would be the OS's responsibility.
>
> I would be happy to be proven wrong in this, since it would make
> also my life easier if we could sanely fall back.

Yup, not much to add here, that is the reason for how things work.

Kristian


More information about the wayland-devel mailing list