<?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>9701</bug_id>
          
          <creation_ts>2016-06-02 11:46:13 +0000</creation_ts>
          <short_desc>Reconcile xserver-nodm-init and x11-common/xserver-common between oe-core and meta-oe</short_desc>
          <delta_ts>2016-07-29 15:14:34 +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>2.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>5546</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.2 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>jku</cc>
    
    <cc>jose.perez.carranza</cc>
    
    <cc>joshuagloe</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>62596</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-06-02 11:46:13 +0000</bug_when>
    <thetext>Its confusing for users to add meta-oe and then have the system change behaviour. meta-oe has a different (higher) version of xserver-nodm-init and we really need to figure out a way so we have one good version of this rather than two incompatible ones with different features.

Once that is resolved, we could also do with either trying to reconcile x11-common and xserver-common, or putting in PROVIDES += &quot;virtual/xserver-common&quot; into both such that only one can build and an error is triggered if its attempted to mix them.

For nodm-init a diff is shown below. We need to:
a) Drop the unused killproc from the OE-Core version
b) Merge the shell fix for meta-oe (so cat isn&apos;t used for s subshell)
c) Add rootless X support to the meta-oe version
d) Add the misisng chvt from meta-oe
e) Add a restart sleep to OE-Core
f) Look at the differences between /etc/X11/xserver-common verses  &quot;xinit /etc/X11/Xsession&quot;


$ diff -u xserver-nodm-init{,-2.0}/xserver-nodm
--- xserver-nodm-init/xserver-nodm	2015-12-14 22:52:39.482429236 +0000
+++ xserver-nodm-init-2.0/xserver-nodm	2016-01-25 21:07:34.000000000 +0000
@@ -8,13 +8,10 @@
 # Default-Stop:      0 1 2 3 6
 ### END INIT INFO
 
-killproc() {            # kill the named process(es)
-        pid=`/bin/pidof $1`
-        [ &quot;$pid&quot; != &quot;&quot; ] &amp;&amp; kill $pid
-}
 
-read CMDLINE &lt; /proc/cmdline
-for x in $CMDLINE; do
+. /etc/init.d/functions
+
+for x in $(cat /proc/cmdline); do
         case $x in
         x11=false)
 		echo &quot;X Server disabled&quot; 
@@ -25,35 +22,33 @@
 
 case &quot;$1&quot; in
   start)
+    # We don&apos;t want this script to block the rest of the boot process
+    if [ &quot;$2&quot; != &quot;background&quot; ]; then
+      $0 $1 background &amp;
+    else
+       # work around from /etc/X11/Xinit
+       export USER=root
+       export HOME=/home/root
+       if [ ! -d $HOME ] &amp;&amp; [ -d /root ]; then
+         HOME=/root
+       fi
+
        . /etc/profile
-       username=root
+
        echo &quot;Starting Xserver&quot;
-       if [ -f /etc/X11/Xusername ]; then
-           username=`cat /etc/X11/Xusername`
-           # setting for rootless X
-           chmod o+w /var/log
-           chmod g+r /dev/tty[0-3]
-           # hidraw device is probably needed
-           if [ -e /dev/hidraw0 ]; then
-               chmod o+rw /dev/hidraw*
-           fi
-       fi
-       # Using su rather than sudo as latest 1.8.1 cause failure [YOCTO #1211]
-       su -l -c &apos;/etc/X11/Xserver&amp;&apos; $username 
-       # Wait for the desktop to say its finished loading
-       # before loading the rest of the system
-       # dbus-wait org.matchbox_project.desktop Loaded
+       . /etc/X11/xserver-common
+       xinit /etc/X11/Xsession -- `which $XSERVER` $ARGS &gt;/var/log/Xsession.log 2&gt;&amp;1
+    fi 
   ;;
 
   stop)
         echo &quot;Stopping XServer&quot;
         killproc xinit
-        sleep 1
-        chvt 1 &amp;
   ;;
 
   restart)
 	$0 stop
+        sleep 1
         $0 start
   ;;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62615</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-06-02 20:11:06 +0000</bug_when>
    <thetext>There&apos;s already bug 5546 open for this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62624</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-06-03 09:52:56 +0000</bug_when>
    <thetext>Yes, marking as dup.

*** This bug has been marked as a duplicate of bug 5546 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64656</commentid>
    <comment_count>3</comment_count>
    <who name="Jose Perez C">jose.perez.carranza</who>
    <bug_when>2016-07-29 15:14:34 +0000</bug_when>
    <thetext>Duplicated bug</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>