[fink:package-submissions] #4970 xvfb-run fix for not needing previously run X11

Hanspeter Niederstrasser via Fink-tracker <[email protected]>
Newsgroups gmane.os.apple.fink.tracker
Message-ID </p/fink/package-submissions/4970/5ed78e8019015a07b68d732c71bf0671f6b806d0.package-submissions@fink.p.sourceforge.net>
Bah. This is only a very partial fix.  /tmp/.X11-unix is deleted on reboot, so anything that the PostInstScript creates is axed then and we're back to square one. The presence of /tmp/.X11-unix would need to be checked at xvfb-run runtime, and must somehow be done as root. I don't think we want to setuid xbvf-run to root to be able to create /tmp/.X11-unix if absent.


---

** [package-submissions:#4970] xvfb-run fix for not needing previously run X11**

**Status:** open
**Group:** Undergoing_Validation
**Labels:** x11 Updated Revision of Existing 
**Created:** Fri Aug 18, 2017 03:17 AM UTC by Hanspeter Niederstrasser
**Last Updated:** Fri Aug 18, 2017 03:17 AM UTC
**Owner:** Daniel Macks
**Attachments:**

- [xvfb-run.info](https://sourceforge.net/p/fink/package-submissions/4970/attachment/xvfb-run.info) (1.4 kB; application/octet-stream)


If you reboot, xvfb-run fails unless X11 has been run once (you can even quit X11 and xvfb-run will still work afterwards; it just needs that initial run). This run sets up /tmp/.X11-unix, where X stores its sockets.

Without the first run, xvfb-run fails with this error:
````
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
_XSERVTransSocketUNIXCreateListener: mkdir(/tmp/.X11-unix) failed, errno = 2
_XSERVTransMakeAllCOTSServerListeners: failed to create listener for local
````
If I manually create /tmp/.X11-unix, the error changes to:
````
_XSERVTransmkdir: ERROR: Mode of /tmp/.X11-unix must be set to 1777
_XSERVTransSocketUNIXCreateListener: mkdir(/tmp/.X11-unix) failed, errno = 1
_XSERVTransMakeAllCOTSServerListeners: failed to create listener for local
````
If I chmod /tmp/.X11-unix, then xvfb-run runs successfully.

This is the change to xvfb-run:
~~~~
--- xvfb-run.info	10 Sep 2015 21:02:21 -0000	1.1
+++ xvfb-run.info	18 Aug 2017 03:07:26 -0000
@@ -1,11 +1,11 @@
 Package: xvfb-run
 Version: 1.4.2
-Revision: 3
+Revision: 4
 Source: http://patch-tracker.debian.org/patch/debianonly/dl/xorg-server/2:%v-10.lenny4/debian-dir%%20only%%20changes
 SourceRename: xorg-server_%v-10.lenny4.debian-only-changes.diff
 Source-MD5: 6e67c13a732a29318330f9e605c6e2a8
 NoSourceDirectory: true
 Depends: <<
 	getoptbin,
 	x11
 <<
@@ -17,16 +17,24 @@
 <<
 CompileScript: #
 InstallScript: <<
 	mkdir -p %i/bin
 	install -m0755 debian/local/xvfb-run %i/bin
 	mkdir -p %i/share/man/man1
 	install -m0644 debian/local/xvfb-run.1 %i/share/man/man1
 <<
+PostInstScript: <<
+# /tmp/.X11-unix stores the sockets for the X11 server.
+# It needs to exist even if we're faking X11
+if [ ! -d /tmp/.X11-unix/ ]; then
+	/bin/mkdir -p /tmp/.X11-unix
+	/bin/chmod 1777 /tmp/.X11-unix
+fi
+<<
 DocFiles: debian/copyright
 DescPort: <<
 	darwin-specific patch from:
 	http://www.hexten.net/wiki/?title=Patch_xvfb-run_for_Mac_OS_X
 <<
 DescPackaging: <<
 	Script is apparently a debian add-on (various websites say
 	it's standard part of x.org?)
~~~~


---

Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/fink/package-submissions/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/fink/admin/package-submissions/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Fink-tracker mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.tracker
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.