Sunday, March 17, 2013

XFS: xorg font server simple server/client connect

a little outdated due to systems having TTF fonts and such, but was more curious to get this thing working.. anyways the below post shows you how to do a simple server/client connect with xorg font server

1) install the xfs server and utilities. stop the server and prepare the config for the server to service the protocol

yum install xorg-x11-xfs xorg-x11-xfs-utils
chkconfig xfs on (if you want xfs starting at boot)
service xfs stop
cd /etc/X11/fs
gvim config

<--- my config if you want to use --->
#no-listen = tcp
client-limit = 10
clone-self = on
default-point-size = 120
default-resolutions = 75,75,100,100
deferglyphs = 16
use-syslog = no
error-file = /var/log/xfs.log
port = 7100
#seems to only read symlinks
catalogue = catalogue:/home/fonts2


2) prepare to the server to serve the fonts. download from the url and prepare the files/directories(catalogue:) so the server/client can communicate with each other.

cd  /home  (or wherever you want to prepare the fonts)
mkdir /home/fonts
mkdir /home/fonts2
cd /home/fonts
(prepare the catalogue:)
ln -sv /home/fonts /home/fonts2
cd ../fonts2
ls -l
<start xfs manually>
netstat -atu (to verify *xfs is on)

NOTE: url where to find fonts and where I got the info to install the *.bdf fonts                                                  

3) on the client side test the font server to see if we have signs of life..

/usr/bin/fslsfonts -server

4) connect to the xorg font server. use xset to view what entries are there, then use xset to add the new font server, verify with xset and netstat. then use fslsfonts to pick a font to use through xterm.
xset -q      
xset fp+ tcp/  
xset -q
netstat -atu
fslsfonts -server
xterm -fn xterm -fn -fine-cursive-medium-i-normal--0-0-72-72-c-0-iso8859-1

view cursive fonts in the terminal!! isnt it cute! 

5) OPTIONAL: add a script to gdm to auto connect the client to the server.

cd /etc/gdm/PostLogin
gvim Default
init 3 / reboot

<--copy/paste or make your own -->

#add your ip and port number
X_CLIENT_XFS_START= /usr/bin/xset fp+ tcp/

if [ -z "$GDMSESSION" ]; then

NOTE: for wanting to connect before login(clients that depend on all fonts from the server) either disable gnome and use startx with xinitrc(add a startup in there), or (if you know gnome terms) create a script in:

No comments:

Post a Comment