The xfs that comes with XFree86 didn't work for me in the default configuration. The conf file /etc/conf.d/xfs defines XFS_PORT="-1" so it should only listen on unix-domain sockets. In practice, it seems specifying '-port -1' on the command line confuses xfs and he can't listen on _any_ socket. The -port switch is meant to apply only to tcp port numbers, and tcp listening is turned off by default in /etc/X11/fs/config. The following patch eliminates the -port switch if XFS_PORT is -1. *** /etc/init.d/xfs.r0 Sun May 18 22:23:59 2003 --- /etc/init.d/xfs Wed May 21 07:56:02 2003 *************** *** 272,286 **** setup_font_dirs fi ebegin "Starting X Font Server" if [ "`grep -e "^xfs:" /etc/passwd`" ] ; then start-stop-daemon --start --quiet --exec /usr/X11R6/bin/xfs \ -- -daemon -config /etc/X11/fs/config \ ! -droppriv -user xfs -port ${XFS_PORT} 1>&2 else start-stop-daemon --start --quiet --exec /usr/X11R6/bin/xfs \ -- -daemon -config /etc/X11/fs/config \ ! -port ${XFS_PORT} 1>&2 fi eend $? } --- 272,294 ---- setup_font_dirs fi + # xfs seems to choke on the bogus port number -1, which is also the + # default. + if [ "${XFS_PORT}" -le 0 ] ; then + xfs_port_switch="" + else + xfs_port_switch="-port ${XFS_PORT}" + fi + ebegin "Starting X Font Server" if [ "`grep -e "^xfs:" /etc/passwd`" ] ; then start-stop-daemon --start --quiet --exec /usr/X11R6/bin/xfs \ -- -daemon -config /etc/X11/fs/config \ ! -droppriv -user xfs ${xfs_port_switch} 1>&2 else start-stop-daemon --start --quiet --exec /usr/X11R6/bin/xfs \ -- -daemon -config /etc/X11/fs/config \ ! -${xfs_port_switch} 1>&2 fi eend $? }
Looks fine here: -------------------------------------------------------------- nosferatu root # lsof /tmp/.font-unix/fs-1 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME xfs 7457 xfs 3u unix 0xf6e994bc 7738 /tmp/.font-unix/fs-1 xfs 7457 xfs 5u unix 0xf5150d2c 9997 /tmp/.font-unix/fs-1 nosferatu root # ps aux --cols 220 | grep xfs xfs 7457 0.0 0.6 7264 5640 ? S May20 0:00 /usr/X11R6/bin/xfs -daemon -config /etc/X11/fs/config -droppriv -user xfs -port -1 root 32667 0.0 0.0 1576 484 pts/9 S 20:12 0:00 grep xfs nosferatu root #
Created attachment 12334 [details] shows xfsinfo at least can't work with std init.d/xfs or xfs -port -1 This log shows that xfs on my machine isn't usable from unix/:7100 when invoked with -port -1, at least by xfsinfo. I am also unable to use it from X when invoked that way. In the log, note that /etc/init.d/xfs.r0 is the original script, while .r1 had my submitted patch applied. Thanks, - Marsh
foser found this link -- please look at it: http://www.geocrawler.com/archives/3/69/2000/3/0/3377232/
Marsh, thoughts?
i'd say it's a permissions problem on your side, maybe /tmp has the wrong permissions or maybe you are using some security enhanced kernel that is in the way here ?
seems to me that both xfree and xfs are just opening the unix domain socket: /tmp/.font-unix/fsXXX for xfree: XXX is the *text* in 'Fontpath unix/:XXX' for xfs: XXX is the *text* in the '-port XXX' argument, but xfs defaults XXX to 7100 if the port arg not specified so...with current gentoo setup i.e. 'port -1' is used, then use unix:/:-1 in your xfree config. It works (without the patch). but yeah the terms '-1' '7100' and 'tcp default' are mentioned and mixed up in so many docs ... seems very confusing.... had me for a while. and as you say, when xfs man page says port argument is *only* for tcp, but it *does* affect which unix domain socket is used even if tcp not used. I assume most authors assumed tcp will be used when writing docs, but thats an assumption :)
PS: I'd also say an entry (even if commented out) of #FontPath "unix/:-1" should be in the XF86Config.example, as "unix/:7100" doesnt work. thats if the xfs script is *not* going to be changed of course :)
the commented entry in the example can be done, for sure
A followup to comment #2, which had incorrect syntax. It should be apparent that if xfs is configured to listen on port -1, it won't be listening on port 7100. # xfsinfo -server unix/:-1 name of server: unix/:-1 version number: 2 vendor string: The XFree86 Project (experimental version) vendor release number: 6600 maximum request size: 8192 longwords (32768 bytes) number of catalogues: 1 all Number of alternate servers: 0 number of extensions: 0
Fixed in 4.3.0-r6.