All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Hochstein <Tom.Hochstein@freescale.com>
To: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Cc: Sundararaj Prabhu <Prabhu.Sundararaj@freescale.com>,
	Otavio Salvador <otavio.salvador@ossystems.com.br>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH v2] weston-init: Use weston-launch for XWayland
Date: Thu, 10 Dec 2015 23:44:13 +0000	[thread overview]
Message-ID: <BN3PR03MB1415A9FC4E4B3D1B7773F618E8E90@BN3PR03MB1415.namprd03.prod.outlook.com> (raw)
In-Reply-To: <56659548.8090509@linux.intel.com>

Thanks Alex and Otavio.

I'm hopeful that I've found the guidance we need from the Weston man page:

http://manpages.ubuntu.com/manpages/saucy/man1/weston.1.html

In particular, the Examples section looks like this:

EXAMPLES
       Launch Weston with the DRM backend on a VT
              weston-launch

       Launch Weston with the DRM backend and XWayland support
              weston-launch -- --modules=xwayland.so

       Launch Weston (wayland-1) nested in another Weston instance (wayland-0)
              WAYLAND_DISPLAY=wayland-0 weston -Swayland-1

       From an X terminal, launch Weston with the x11 backend
              weston

XWayland support is specified in weston.ini, so the first two examples collapse to one case for the init script. The third example, nested Weston, is something the init script has never supported, so I propose continuing to not support it. The fourth condition I propose to support by checking for $DISPLAY. So you end up with something like this:
	
        # There are multiple ways to start weston.
        if [ "$WAYLAND_DISPLAY" ]; then
            echo -e "\aError: Weston is already running."
            echo "This script does not support launching Weston nested."
            exit 1
        else if [ "$DISPLAY" ]; then
            echo "Launching Weston with the x11 backend"
            openvt -s weston -- --log=/var/log/weston.log $OPTARGS
        else
            echo "Launching Weston with the DRM backend"
            export XDG_CONFIG_HOME=/etc
            openvt -v -- weston-launch -- --log=/var/log/weston.log $OPTARGS
        fi

I still need to test this (and apply the design in systemd), but I wanted your feedback on the approach.

Tom

-----Original Message-----
From: Alexander Kanavin [mailto:alexander.kanavin@linux.intel.com] 
Sent: Monday, December 07, 2015 8:19 AM
To: Hochstein Tom-R60874 <Tom.Hochstein@freescale.com>
Cc: Otavio Salvador <otavio.salvador@ossystems.com.br>; Sundararaj Prabhu-B36876 <Prabhu.Sundararaj@freescale.com>; openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v2] weston-init: Use weston-launch for XWayland

On 12/07/2015 04:13 PM, Otavio Salvador wrote:
>> We're wondering how best to fix this.
>>
>> The Weston website seems to give the answer for a run-time solution, which is basically 'if $DISPLAY is set use weston, otherwise use weston-launch'.
>>
>> http://wayland.freedesktop.org/building.html
>>
>> Is that the right approach? Another possibility is to make it a build-time solution where the bsp layer sets a variable controlling the selection.
>
> Runtime is always better, when possible.

I guess you need to dig deeper into what weston-launch actually does, and which are the scenarios when it should be used; the documentation isn't particularly helpful here, so maybe you need to ask the upstream developers.

Also, whatever fix you come up with, it should also be provided for the situation when a native systemd unit file is used instead of the init script (a patch for that has been posted here, and should show up in master shortly).

Alex


  reply	other threads:[~2015-12-10 23:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01 20:31 [PATCH v2] weston-init: Use weston-launch for XWayland Tom Hochstein
2015-12-01 22:21 ` alexander.kanavin
2015-12-07 13:19   ` Tom Hochstein
2015-12-07 14:13     ` Otavio Salvador
2015-12-07 14:18       ` Alexander Kanavin
2015-12-10 23:44         ` Tom Hochstein [this message]
2015-12-11 12:29           ` Alexander Kanavin
2015-12-11 12:34             ` Otavio Salvador

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=BN3PR03MB1415A9FC4E4B3D1B7773F618E8E90@BN3PR03MB1415.namprd03.prod.outlook.com \
    --to=tom.hochstein@freescale.com \
    --cc=Prabhu.Sundararaj@freescale.com \
    --cc=alexander.kanavin@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=otavio.salvador@ossystems.com.br \
    /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.
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.