Bug 206050

Summary: x11/slim: force use unix sockets
Product: Ports & Packages Reporter: rozhuk.im
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Many People CC: henry.hu.sh, rozhuk.im, vsevolod
Priority: --- Keywords: easy, needs-qa, patch
Version: LatestFlags: henry.hu.sh: maintainer-feedback+
Hardware: Any   
OS: Any   
Description Flags
replace ":0.0" to "unix:0.0" koobs: maintainer-approval? (henry.hu.sh)

Description rozhuk.im 2016-01-08 23:48:37 UTC
Created attachment 165285 [details]
replace ":0.0" to "unix:0.0"

By default slim call: XOpenDisplay(":0.0")
XOpenDisplay first try IPv4, then IPv6 and unix socket.
But if sysctl set:
net.inet.tcp.blackhole=2 # Do not send RST on segments to closed ports
then XOpenDisplay wait 30 seconds.
So after slim start it show black screen ~60 seconds.

Recommended slim config contain:
xserver_arguments   -nolisten tcp vt09
so XOpenDisplay will always wait/fail to connect by tcp.

Patch replace ":0.0" to "unix:0.0", so slim will always use unix sockets.

PS: Also here tip for config to increase xorg priority:
default_xserver		/usr/bin/nice
xserver_arguments	-n -15 /usr/local/bin/X -nolisten tcp vt09
Comment 1 Henry Hu 2016-01-16 23:00:41 UTC
I've tested the patch and it works well. Now we defaults to "-nolisten tcp", so this should not cause any problems. Please commit it.
Comment 2 commit-hook freebsd_committer 2016-02-04 18:08:25 UTC
A commit references this bug:

Author: vsevolod
Date: Thu Feb  4 18:08:22 UTC 2016
New revision: 408067
URL: https://svnweb.freebsd.org/changeset/ports/408067

  - Force use unix sockets

  PR:		206050
  Submitted by:	rozhuk.im at gmail.com
  Approved by:	maintainer

Comment 3 Vsevolod Stakhov freebsd_committer 2016-02-04 18:10:11 UTC
Committed, thank you!