* [PATCH v2] weston-init: Use weston-launch for XWayland
@ 2015-12-01 20:31 Tom Hochstein
2015-12-01 22:21 ` alexander.kanavin
0 siblings, 1 reply; 8+ messages in thread
From: Tom Hochstein @ 2015-12-01 20:31 UTC (permalink / raw)
To: openembedded-core; +Cc: Prabhu Sundararaj
From: Prabhu Sundararaj <prabhu.sundararaj@freescale.com>
When XWayland is configured, Weston must be started using the
weston-launch utility.
Signed-off-by: Tom Hochstein <tom.hochstein@freescale.com>
---
meta/recipes-graphics/wayland/weston-init/init | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-graphics/wayland/weston-init/init b/meta/recipes-graphics/wayland/weston-init/init
index 2e938f4..d1e902f 100644
--- a/meta/recipes-graphics/wayland/weston-init/init
+++ b/meta/recipes-graphics/wayland/weston-init/init
@@ -38,7 +38,15 @@ case "$1" in
chmod 0700 $XDG_RUNTIME_DIR
fi
- openvt -s weston -- $OPTARGS
+ # If weston-launch exists, we're configured for XWayland.
+ if [ -f /usr/bin/weston-launch ]; then
+ echo "Starting Weston in XWayland"
+ export XDG_CONFIG_HOME=/etc
+ openvt -v -- weston-launch -- --log=/var/log/weston.log $OPTARGS
+ else
+ echo "Starting Weston"
+ openvt -s weston -- --log=/var/log/weston.log $OPTARGS
+ fi
;;
stop)
--
2.1.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2] weston-init: Use weston-launch for XWayland
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
0 siblings, 1 reply; 8+ messages in thread
From: alexander.kanavin @ 2015-12-01 22:21 UTC (permalink / raw)
To: Tom Hochstein; +Cc: Prabhu Sundararaj, openembedded-core
> + # If weston-launch exists, we're configured for XWayland.
> + if [ -f /usr/bin/weston-launch ]; then
> + echo "Starting Weston in XWayland"
Nope. XWayland support and weston-launch support are configured
separately. One may be present and the other one absent, both ways.
Alex
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] weston-init: Use weston-launch for XWayland
2015-12-01 22:21 ` alexander.kanavin
@ 2015-12-07 13:19 ` Tom Hochstein
2015-12-07 14:13 ` Otavio Salvador
0 siblings, 1 reply; 8+ messages in thread
From: Tom Hochstein @ 2015-12-07 13:19 UTC (permalink / raw)
To: alexander.kanavin; +Cc: Sundararaj Prabhu, openembedded-core
Hi Alex,
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.
Thanks for your help.
Tom
-----Original Message-----
From: alexander.kanavin@linux.intel.com [mailto:alexander.kanavin@linux.intel.com]
Sent: Tuesday, December 01, 2015 4:21 PM
To: Hochstein Tom-R60874 <Tom.Hochstein@freescale.com>
Cc: openembedded-core@lists.openembedded.org; Sundararaj Prabhu-B36876 <Prabhu.Sundararaj@freescale.com>
Subject: Re: [OE-core] [PATCH v2] weston-init: Use weston-launch for XWayland
> + # If weston-launch exists, we're configured for XWayland.
> + if [ -f /usr/bin/weston-launch ]; then
> + echo "Starting Weston in XWayland"
Nope. XWayland support and weston-launch support are configured separately. One may be present and the other one absent, both ways.
Alex
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] weston-init: Use weston-launch for XWayland
2015-12-07 13:19 ` Tom Hochstein
@ 2015-12-07 14:13 ` Otavio Salvador
2015-12-07 14:18 ` Alexander Kanavin
0 siblings, 1 reply; 8+ messages in thread
From: Otavio Salvador @ 2015-12-07 14:13 UTC (permalink / raw)
To: Tom Hochstein; +Cc: Sundararaj Prabhu, openembedded-core
On Mon, Dec 7, 2015 at 11:19 AM, Tom Hochstein
<Tom.Hochstein@freescale.com> wrote:
> Hi Alex,
>
> 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.
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] weston-init: Use weston-launch for XWayland
2015-12-07 14:13 ` Otavio Salvador
@ 2015-12-07 14:18 ` Alexander Kanavin
2015-12-10 23:44 ` Tom Hochstein
0 siblings, 1 reply; 8+ messages in thread
From: Alexander Kanavin @ 2015-12-07 14:18 UTC (permalink / raw)
To: Tom Hochstein; +Cc: Sundararaj Prabhu, Otavio Salvador, openembedded-core
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] weston-init: Use weston-launch for XWayland
2015-12-07 14:18 ` Alexander Kanavin
@ 2015-12-10 23:44 ` Tom Hochstein
2015-12-11 12:29 ` Alexander Kanavin
0 siblings, 1 reply; 8+ messages in thread
From: Tom Hochstein @ 2015-12-10 23:44 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: Sundararaj Prabhu, Otavio Salvador, openembedded-core
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] weston-init: Use weston-launch for XWayland
2015-12-10 23:44 ` Tom Hochstein
@ 2015-12-11 12:29 ` Alexander Kanavin
2015-12-11 12:34 ` Otavio Salvador
0 siblings, 1 reply; 8+ messages in thread
From: Alexander Kanavin @ 2015-12-11 12:29 UTC (permalink / raw)
To: Tom Hochstein; +Cc: Sundararaj Prabhu, Otavio Salvador, openembedded-core
On 12/11/2015 01:44 AM, Tom Hochstein wrote:
> # 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.
I think this looks okay, but you obviously need to test that all three
scenarios works as expected. Also, systemd unit file language may not
support this logic (it's not a full programming language), so the above
snippet probably needs to be separated into a wrapper script.
Alex
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] weston-init: Use weston-launch for XWayland
2015-12-11 12:29 ` Alexander Kanavin
@ 2015-12-11 12:34 ` Otavio Salvador
0 siblings, 0 replies; 8+ messages in thread
From: Otavio Salvador @ 2015-12-11 12:34 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: openembedded-core, Sundararaj Prabhu
On Fri, Dec 11, 2015 at 10:29 AM, Alexander Kanavin
<alexander.kanavin@linux.intel.com> wrote:
> On 12/11/2015 01:44 AM, Tom Hochstein wrote:
>
>> # 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.
>
>
> I think this looks okay, but you obviously need to test that all three
> scenarios works as expected. Also, systemd unit file language may not
> support this logic (it's not a full programming language), so the above
> snippet probably needs to be separated into a wrapper script.
Agreed; the wrapper might make easier to integrate it on both, with less work.
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-12-11 12:34 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2015-12-11 12:29 ` Alexander Kanavin
2015-12-11 12:34 ` Otavio Salvador
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.