From 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd Mon Sep 17 00:00:00 2001 From: ToshikazuOhiwa Date: Mon, 30 Mar 2020 09:24:26 +0900 Subject: agl-basesystem --- .../x11-common/xserver-nodm-init/X11/Xsession | 38 +++ .../X11/Xsession.d/13xdgbasedirs.sh | 13 + .../X11/Xsession.d/89xdgautostart.sh | 7 + .../X11/Xsession.d/90XWindowManager.sh | 7 + .../x11-common/xserver-nodm-init/Xserver | 25 ++ .../xserver-nodm-init/gplv2-license.patch | 355 +++++++++++++++++++++ .../x11-common/xserver-nodm-init/xserver-nodm | 67 ++++ .../xserver-nodm-init/xserver-nodm.conf.in | 7 + .../xserver-nodm-init/xserver-nodm.service.in | 11 + 9 files changed, 530 insertions(+) create mode 100644 external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession create mode 100644 external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/13xdgbasedirs.sh create mode 100644 external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/89xdgautostart.sh create mode 100644 external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/90XWindowManager.sh create mode 100644 external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver create mode 100644 external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/gplv2-license.patch create mode 100755 external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm create mode 100644 external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in create mode 100644 external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in (limited to 'external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init') diff --git a/external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession b/external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession new file mode 100644 index 00000000..0b73127a --- /dev/null +++ b/external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession @@ -0,0 +1,38 @@ +#!/bin/sh + +if [ -x /usr/bin/dbus-launch ]; then + # As this is the X session script, always start a new DBus session. + eval `dbus-launch --sh-syntax --exit-with-session ++ Copyright (C) ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with this program; if not, write to the Free Software Foundation, Inc., ++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ ++Also add information on how to contact you by electronic and paper mail. ++ ++If the program is interactive, make it output a short notice like this ++when it starts in an interactive mode: ++ ++ Gnomovision version 69, Copyright (C) year name of author ++ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. ++ This is free software, and you are welcome to redistribute it ++ under certain conditions; type `show c' for details. ++ ++The hypothetical commands `show w' and `show c' should show the appropriate ++parts of the General Public License. Of course, the commands you use may ++be called something other than `show w' and `show c'; they could even be ++mouse-clicks or menu items--whatever suits your program. ++ ++You should also get your employer (if you work as a programmer) or your ++school, if any, to sign a "copyright disclaimer" for the program, if ++necessary. Here is a sample; alter the names: ++ ++ Yoyodyne, Inc., hereby disclaims all copyright interest in the program ++ `Gnomovision' (which makes passes at compilers) written by James Hacker. ++ ++ , 1 April 1989 ++ Ty Coon, President of Vice ++ ++This General Public License does not permit incorporating your program into ++proprietary programs. If your program is a subroutine library, you may ++consider it more useful to permit linking proprietary applications with the ++library. If this is what you want to do, use the GNU Lesser General ++Public License instead of this License. diff --git a/external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm b/external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm new file mode 100755 index 00000000..6c548551 --- /dev/null +++ b/external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm @@ -0,0 +1,67 @@ +#!/bin/sh +# +### BEGIN INIT INFO +# Provides: xserver +# Required-Start: $local_fs $remote_fs dbus +# Required-Stop: $local_fs $remote_fs +# Default-Start: 5 +# Default-Stop: 0 1 2 3 6 +### END INIT INFO + +killproc() { # kill the named process(es) + pid=`/bin/pidof $1` + [ "$pid" != "" ] && kill $pid +} + +read CMDLINE < /proc/cmdline +for x in $CMDLINE; do + case $x in + x11=false) + echo "X Server disabled" + exit 0; + ;; + esac +done + +case "$1" in + start) + . /etc/profile + + #default for USER + . /etc/default/xserver-nodm + echo "Starting Xserver" + if [ "$USER" != "root" ]; then + # 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 '/etc/xserver-nodm/Xserver &' $USER + # Wait for the desktop to say its finished loading + # before loading the rest of the system + # dbus-wait org.matchbox_project.desktop Loaded + ;; + + stop) + echo "Stopping XServer" + killproc xinit + sleep 1 + chvt 1 & + ;; + + restart) + $0 stop + $0 start + ;; + + *) + echo "usage: $0 { start | stop | restart }" + ;; +esac + +exit 0 diff --git a/external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in b/external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in new file mode 100644 index 00000000..4a9670d8 --- /dev/null +++ b/external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in @@ -0,0 +1,7 @@ +# common environment file for sysvinit and systemd + +XSERVER=/usr/bin/Xorg +DISPLAY=:0 +ARGS=" -br -pn @BLANK_ARGS@ @NO_CURSOR_ARG@ " +HOME=@HOME@ +USER=@USER@ diff --git a/external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in b/external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in new file mode 100644 index 00000000..87dc4f8f --- /dev/null +++ b/external/poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in @@ -0,0 +1,11 @@ +[Unit] +Description=Xserver startup without a display manager + +[Service] +EnvironmentFile=/etc/default/xserver-nodm +User=@USER@ +ExecStart=/etc/xserver-nodm/Xserver +Restart=always + +[Install] +Alias=display-manager.service -- cgit 1.2.3-korg