[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH 7/7] Add xserver wrapper for XWayland.



Obviously only usefull together with an xserver with the xwayland patch set,
but don't hurt in any way without it.

Tested with an xserver and wayland/wlglamor ddx I built and pushed to:
deb http://apt.severinsson.net/debian experimental wayland
---
 debian/changelog           |    1 +
 debian/control             |    2 ++
 debian/local/xwayland      |    9 +++++++++
 debian/local/xwayland.conf |    5 +++++
 debian/rules               |    4 ++++
 debian/weston.install      |    2 ++
 6 filer ändrade, 23 tillägg(+)
 create mode 100755 debian/local/xwayland
 create mode 100644 debian/local/xwayland.conf

diff --git a/debian/changelog b/debian/changelog
index 0d6696f3..e1fb51b8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ weston (1.3.0-2) UNRELEASED; urgency=low
   * Enable X11 compositor support.
   * Enable XWayland support.
   * Add xwm-Redirect-root-window-subwindows.patch from upstream.
+  * Add xserver wrapper for XWayland.
 
  -- Jon Severinsson <jon@severinsson.net>  Sun, 13 Oct 2013 10:00:00 +0200
 
diff --git a/debian/control b/debian/control
index 0aa7715f..adfb13ac 100644
--- a/debian/control
+++ b/debian/control
@@ -56,6 +56,8 @@ Depends:
  ${misc:Depends},
 Recommends:
  libgl1-mesa-dri,
+ xserver-xorg-core (>= 2:1.14.3-4+wayland),
+ xserver-xorg-video-wlglamor | xserver-xorg-video-wayland,
 Description: reference implementation of a wayland compositor
  Part of the Wayland project is also the Weston reference implementation
  of a Wayland compositor. Weston can run as an X client or under Linux
diff --git a/debian/local/xwayland b/debian/local/xwayland
new file mode 100755
index 00000000..47a0f5aa
--- /dev/null
+++ b/debian/local/xwayland
@@ -0,0 +1,9 @@
+#!/bin/sh
+#
+# Don't use the default xorg.conf file, as Weston/XWayland sessions will
+# require a different configuration than plain old X11 sessions.
+#
+# To be able to run without root priviledges we must not use /var/log, so dump
+# the logfile in ${XDG_RUNTIME_DIR} instead.
+#
+exec /usr/bin/Xorg -config "/etc/X11/xwayland.conf" -logfile "${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY}.Xorg.log" "$@"
diff --git a/debian/local/xwayland.conf b/debian/local/xwayland.conf
new file mode 100644
index 00000000..cbbd339b
--- /dev/null
+++ b/debian/local/xwayland.conf
@@ -0,0 +1,5 @@
+Section "Device"
+	Identifier "XWayland"
+	Driver "wlglamor"
+#	Driver "wayland"
+EndSection
diff --git a/debian/rules b/debian/rules
index 2341aacb..556e2641 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,6 +7,7 @@ override_dh_auto_configure:
 		--enable-rdp-compositor \
 		--enable-x11-compositor \
 		--enable-xwayland \
+		--with-xserver-path=/usr/lib/X11/xwayland \
 		--with-cairo=gl
 
 override_dh_auto_test:
@@ -15,6 +16,9 @@ override_dh_auto_test:
 
 override_dh_auto_install:
 	dh_auto_install --destdir=debian/tmp
+	mkdir -p debian/tmp/usr/lib/X11 debian/tmp/etc/X11
+	install -m 0755 debian/local/xwayland debian/tmp/usr/lib/X11/
+	install -m 0644 debian/local/xwayland.conf debian/tmp/etc/X11/
 
 override_dh_install:
 	dh_install --fail-missing -X.la
diff --git a/debian/weston.install b/debian/weston.install
index 77d9d16a..a3049fd9 100644
--- a/debian/weston.install
+++ b/debian/weston.install
@@ -26,3 +26,5 @@ usr/share/man/man1/weston.1
 usr/share/man/man5/weston.ini.5
 usr/share/man/man7/weston-drm.7
 usr/share/weston
+usr/lib/X11/xwayland
+etc/X11/xwayland.conf
-- 
1.7.10.4


Reply to: