From: "Valery V. Inozemtsev" <shrek@freesource.info>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: [devel] XFS - кому он нужен? или продожение шрифтовой темы
Date: Wed, 22 Mar 2006 16:44:31 +0300
Message-ID: <200603221644.32207.shrek@freesource.info> (raw)
[-- Attachment #1: Type: text/plain, Size: 3001 bytes --]
Добрый день.
В очередно раз поднялся вопрос о потере иксами сокета фонт сервера при его
рестарте и в очередной раз я задумался над тем как от него отказаться с
минимальными потерями. на этот раз плодотворно.
На вопрос "кому он нужен" ответ однозначный - тем кто раздает шрифты с ОДНОГО
сервера по сети.
Вопрос второй - зачем загружать шрифты Х серверу? По большому счету незачем,
те приложения которые поддерживают fontconfig прекрасно обходятся и без
этого. Но пока существуют приложения не поддерживающие fontconfig, шрифты Х
серверу придется загружать.
Использовать для этого XFS совершенно не обязательно. Достаточно вот такого
скрипта:
/etc/X11/xinit.d/xfonts
-------------------------------------------------------------------
#!/bin/sh
XFS=
if [ -r /etc/sysconfig/xfs ]; then
source /etc/sysconfig/xfs
case "$XFS" in
yes|Yes|YES|true|True|TRUE|on|On|ON|Y|y|1)
exit 0
;;
esac
fi
FONTPATH=`chkfontpath -l | sed -ne 's,\(.*\):\ \(.*\),\2,p'`
[ -n "$FONTPATH" ] || exit 0
for F in $FONTPATH; do
xset fp+ "$F"
done
xdpyinfo | grep -q FontCache && xset fp rehash
-------------------------------------------------------------------
единственное что придется сделать - добавить один параметр
в /etc/sysconfig/xfs
Остается открытым вопрос как сделать так что бы шрифты были доступны
приложениям не поддерживающим fontconfig сразу после установки. это тоже
решается, например вот таким скриптом в %post
------------------------------------------------------------------------------
XFS=
if [ -r /etc/sysconfig/xfs ]; then
source /etc/sysconfig/xfs
case "$XFS" in
yes|Yes|YES|true|True|TRUE|on|On|ON|Y|y|1)
exit 0
;;
esac
fi
XPID=`pidof X`
FONTPATH=$1
[ -n "$FONTPATH" ] || exit 0
if [ -n "$XPID" ]; then
for N in $XPID; do
SERVER=`awk -F: '{print(substr($2,1,1))}' /proc/$N/cmdline`
[ -n "$SERVER" ] || continue
AUTH=`awk -F-auth '{print($2)}' /proc/$N/cmdline`
[ -n "$AUTH" ] || continue
export XAUTHORITY=$AUTH
if xset q | grep -q "$FONTPATH"; then
ACTION="-fp"
else
ACTION="fp+"
fi
xset -display :$SERVER $ACTION "$FONTPATH" > /dev/null 2>&1
xdpyinfo -display :$SERVER | grep -q FontCache &&
xset -display :$SERVER fp rehash
done
fi
------------------------------------------------------------------------------
хотя я не думаю что это так уж актуально
Хотелось бы услышать мнение заинтересованной общественности и в дальнейшем
прийти к консенсесу
P.S. Для того что бы иксы не теряли сокет xfs при его рестарте по моему будет
достаточно удалить 25-ю строку (rm -rf /tmp/.font-unix) в /etc/init.d/xfs
--
Valery V. Inozemtsev
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
next reply other threads:[~2006-03-22 13:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-22 13:44 Valery V. Inozemtsev [this message]
2006-03-22 14:13 ` Michael Shigorin
2006-03-22 14:30 ` Valery V. Inozemtsev
2006-03-22 14:39 ` Michael Shigorin
2006-03-22 18:38 ` Valery V. Inozemtsev
2006-03-22 19:35 ` Dmitry V. Levin
2006-03-22 20:55 ` Michael Shigorin
2006-03-24 8:20 ` Valery V. Inozemtsev
2006-03-24 9:58 ` Sergey Vlasov
2006-03-24 10:35 ` Valery V. Inozemtsev
2006-03-24 11:20 ` Sergey Vlasov
2006-03-22 20:09 ` Vitaly Lipatov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200603221644.32207.shrek@freesource.info \
--to=shrek@freesource.info \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git