<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>13878</bug_id>
          
          <creation_ts>2020-04-17 03:40:17 +0000</creation_ts>
          <short_desc>xserver-nodm-init: broken XDG_RUNTIME_DIR setup</short_desc>
          <delta_ts>2025-04-03 12:02:26 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>graphics</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.2 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="tf">tf+bugs.yocto</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>87051</commentid>
    <comment_count>0</comment_count>
    <who name="tf">tf+bugs.yocto</who>
    <bug_when>2020-04-17 03:40:17 +0000</bug_when>
    <thetext>The 13xdgbasedirs.sh needs to setup XDG_RUNTIME_DIR in a spec compliant way. The comment in the existing script says: 

&apos;Wayland needs XDG_RUNTIME_DIR, so set it to /tmp.  This isn&apos;t compliant with the specification (wrong mode, wrong owner) but it&apos;s mostly sufficient.&apos;

Unfortunately, this assumption doesn&apos;t hold, because some system components will, correctly, ignore the directory if the owner and permissions are not correct, while others will not, and things break. For example, GIO DBus code falls into the former category, while dconf into the latter, and consequently GSettings with a dconf backend don&apos;t work.

Either this directory needs to be set up correctly, or the variable should not be set at all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99810</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-10-10 12:02:09 +0000</bug_when>
    <thetext>The spec is at https://specifications.freedesktop.org/basedir-spec/latest/.

Interesting prior art to solve this in a non-horrible manner:

https://github.com/ifreund/dumb_runtime_dir
https://github.com/linux-pam/linux-pam/issues/416
https://www.gsp.com/cgi-bin/man.cgi?section=8&amp;topic=PAM_XDG</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99815</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-10-10 14:03:53 +0000</bug_when>
    <thetext>Or https://github.com/jjk-jacky/pam_rundir.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101274</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2025-03-04 11:13:04 +0000</bug_when>
    <thetext>Patches on the list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101549</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2025-04-03 12:02:26 +0000</bug_when>
    <thetext>Fixed in 5c98609bf7dfb05af722e30adb49731727df9a94.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>