Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1466254
Summary: | 'xset fp rehash' does not work without X server running | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | David Kaspar // Dee'Kej <deekej> |
Component: | xorg-x11-server-utils | Assignee: | X/OpenGL Maintenance List <xgl-maint> |
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 25 | CC: | deekej, negativo17, peter.hutterer, xgl-maint |
Target Milestone: | --- | Flags: | deekej:
fedora_requires_release_note-
|
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-09-01 10:04:19 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1458840 |
Description
David Kaspar // Dee'Kej
2017-06-29 11:06:15 UTC
Any update on this, guys? Checking the source of xset fp rehash, it's three lines of code (ignoring error handling): currentList = XGetFontPath(dpy, (int *) &ncurrent); XSetFontPath(dpy, currentList, (int) ncurrent); XFreeFontPath(currentList); so this absolutely needs to have the server running because whatever happens in response to this is handled by the server alone, not by xset or Xlib. I admit I don't know much about fonts but isn't some combination of mkfontdir/mkfontscale sufficient there? Hello Peter, thank you very much for your response. So, digging into this a little bit more, I have found this in man pages: $ man mkfontdir ... FILES fonts.dir List of fonts in the directory and the files they are stored in. Created by mkfontdir. Read by the X server and font server each time the font path is set (see xset(1)). fonts.scale List of scalable fonts in the directory. Contents are copied to fonts.dir by mkfontdir. Can be created with mkfontscale(1). fonts.alias List of font name aliases. Read by the X server and font server each time the font path is set (see xset(1)). So I've looked at the xset(1) man page again: OPTIONS fp= path,... > The fp= sets the font path to the entries given in the path > argument. The entries are interpreted by the server, not by > the client. Typically they are directory names or font server > names, but the interpretation is server-dependent. fp default The default argument causes the font path to be reset to the server's default. fp rehash > The rehash argument resets the font path to its current value, > causing the server to reread the font databases in the current > font path. This is generally only used when adding new fonts > to a font directory (after running mkfontdir to recreate the > font database). So, the X server has to be running for xset to work, and IMO just using the mkfontdir/mkfontscale doesn't do the complete job, because during the font package installation I am adding the symlink into /etc/X11/fontpath.d/ folder, which points to the newly installed font directory (e.g. /usr/share/fonts/urw-base35/). I don't think that just adding the symlink will do the job. IMO that's why the arch linux wiki is saying to run the "xset fp rehash" command. I would say that running that command really doesn't matter in case the user is running the Fedora without GUI target enabled. Therefore, the question now remains - does the X server checks for newly added font paths during its startup? If it does, then everything is okay and we can close this bug. If it does not, then we have a all fonts-wide problem inside Fedora... :D Could you please check if X server checks for newly added/removed (updated) fonts paths in /etc/X11/fontpath.d/ when it starts? Thank you very much! :) Dee'Kej I wouldn't know why it would store this across invocations. And iirc the mkfont* are the only things we run after installing the other core fonts and that has been enough. (In reply to Peter Hutterer from comment #4) > I wouldn't know why it would store this across invocations. Are you trying to say that the X server automatically scans for new font paths when it starts? > And iirc the mkfont* are the only things we run after installing the other > core fonts and that has been enough. Yes, we use only mkfont* commands, but generally I get the feeling the fonts are quite a mess in Fedora (the FPG wiki for Fonts is mostly completely out of date), and that by itself does not guarantee we are doing it correctly... :) That's why I created this BZ, to try to sort it out. ;) (In reply to David Kaspar [Dee'Kej] from comment #5) > (In reply to Peter Hutterer from comment #4) > > I wouldn't know why it would store this across invocations. > > Are you trying to say that the X server automatically scans for new font > paths when it starts? I honestly don't know, sorry. (In reply to Peter Hutterer from comment #6) > (In reply to David Kaspar [Dee'Kej] from comment #5) > > (In reply to Peter Hutterer from comment #4) > > > I wouldn't know why it would store this across invocations. > > > > Are you trying to say that the X server automatically scans for new font > > paths when it starts? > > I honestly don't know, sorry. No problem. :) I will assume that is what is going on by default, because I do not have more time to poke into this. Anyway, thanks for your feedback. ;) |