Bug 206050 - x11/slim: force use unix sockets
Summary: x11/slim: force use unix sockets
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
Keywords: easy, needs-qa, patch
Depends on:
Reported: 2016-01-08 23:48 UTC by rozhuk.im
Modified: 2016-02-04 18:10 UTC (History)
3 users (show)

See Also:
henry.hu.sh: maintainer-feedback+

replace ":0.0" to "unix:0.0" (276 bytes, patch)
2016-01-08 23:48 UTC, rozhuk.im
koobs: maintainer-approval? (henry.hu.sh)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!